summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_loader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/cookbook_loader.rb')
-rw-r--r--lib/chef/cookbook_loader.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/chef/cookbook_loader.rb b/lib/chef/cookbook_loader.rb
index 27e0bc5aaa..df5a475152 100644
--- a/lib/chef/cookbook_loader.rb
+++ b/lib/chef/cookbook_loader.rb
@@ -30,7 +30,6 @@ require "chef/cookbook/metadata"
#
class Chef
class CookbookLoader
-
attr_reader :cookbooks_by_name
attr_reader :merged_cookbooks
attr_reader :cookbook_paths
@@ -44,7 +43,7 @@ class Chef
@cookbooks_by_name = Mash.new
@loaded_cookbooks = {}
@metadata = Mash.new
- @cookbooks_paths = Hash.new {|h,k| h[k] = []} # for deprecation warnings
+ @cookbooks_paths = Hash.new { |h, k| h[k] = [] } # for deprecation warnings
@chefignores = {}
@repo_paths = repo_paths.map do |repo_path|
repo_path = File.expand_path(repo_path)
@@ -62,7 +61,7 @@ class Chef
def merged_cookbook_paths # for deprecation warnings
merged_cookbook_paths = {}
- @merged_cookbooks.each {|c| merged_cookbook_paths[c] = @cookbooks_paths[c]}
+ @merged_cookbooks.each { |c| merged_cookbook_paths[c] = @cookbooks_paths[c] }
merged_cookbook_paths
end
@@ -119,7 +118,7 @@ class Chef
alias :key? :has_key?
def each
- @cookbooks_by_name.keys.sort { |a,b| a.to_s <=> b.to_s }.each do |cname|
+ @cookbooks_by_name.keys.sort { |a, b| a.to_s <=> b.to_s }.each do |cname|
yield(cname, @cookbooks_by_name[cname])
end
end
@@ -177,6 +176,5 @@ class Chef
def cookbook_loaders_for(cookbook_name)
@loaders_by_name[cookbook_name.to_s]
end
-
end
end