Class: Ladder::Cookbooks::GitCookbook
- Defined in:
- lib/chef/ladder/cookbooks.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Cookbook
Instance Method Summary collapse
Methods inherited from Cookbook
Constructor Details
This class inherits a constructor from Ladder::Cookbooks::Cookbook
Instance Method Details
#fetch(directory) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/chef/ladder/cookbooks.rb', line 27 def fetch(directory) path = File.join(directory, @name) if Dir.exists?(path) Git.open(path).pull() else Git.clone(@source, path) end end |