diff options
author | Tim Smith <tsmith@chef.io> | 2018-02-22 20:47:57 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-02-22 20:47:57 -0800 |
commit | 2a3517c113b88696559dd3ba5665bc55e12fe741 (patch) | |
tree | 9ce0e4799e11ef0a596cd8534f730fa90cb9427b /lib/chef/resource | |
parent | b3a3fbaab35da9e7927a0cb1ae5e379f28ecc000 (diff) | |
download | chef-2a3517c113b88696559dd3ba5665bc55e12fe741.tar.gz |
Set properties in git resource using our resource DSLgit_resource
Modernize how we define this resource
Signed-off-by: Tim Smith <tsmith@chef.io>
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 |