summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-02-22 20:47:57 -0800
committerTim Smith <tsmith@chef.io>2018-02-22 20:47:57 -0800
commit2a3517c113b88696559dd3ba5665bc55e12fe741 (patch)
tree9ce0e4799e11ef0a596cd8534f730fa90cb9427b
parentb3a3fbaab35da9e7927a0cb1ae5e379f28ecc000 (diff)
downloadchef-git_resource.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>
-rw-r--r--lib/chef/resource/git.rb15
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