diff options
author | Thom May <thom@may.lt> | 2018-03-05 12:17:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 12:17:35 +0000 |
commit | 28926df5d373d3269a7ba41803f478f6e5e7448f (patch) | |
tree | d5e0330dba1b4dc4136a5169a9d1aec73bfef12b /lib/chef/resource | |
parent | 7cd945f8ef296b70b18ad12d5f656c7cb1bd50ad (diff) | |
parent | 2a3517c113b88696559dd3ba5665bc55e12fe741 (diff) | |
download | chef-28926df5d373d3269a7ba41803f478f6e5e7448f.tar.gz |
Merge pull request #6902 from chef/git_resource
Set properties in git resource using our resource DSL
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/git.rb | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/chef/resource/git.rb b/lib/chef/resource/git.rb index 9f1702f715..58200815d4 100644 --- a/lib/chef/resource/git.rb +++ b/lib/chef/resource/git.rb @@ -21,27 +21,14 @@ require "chef/resource/scm" class Chef class Resource class Git < Chef::Resource::Scm - description "Use the git resource to manage source control resources that exist"\ " in a git repository. git version 1.6.5 (or higher) is required to"\ " use all of the functionality in the git resource." - def initialize(name, run_context = nil) - super - @additional_remotes = Hash[] - end - - def additional_remotes(arg = nil) - set_or_return( - :additional_remotes, - arg, - :kind_of => Hash - ) - end + property :additional_remotes, Hash, default: {} alias :branch :revision alias :reference :revision - alias :repo :repository end end |