diff options
Diffstat (limited to 'lib/chef/cookbook/cookbook_collection.rb')
-rw-r--r-- | lib/chef/cookbook/cookbook_collection.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/cookbook/cookbook_collection.rb b/lib/chef/cookbook/cookbook_collection.rb index a9de718902..7fa30b66d1 100644 --- a/lib/chef/cookbook/cookbook_collection.rb +++ b/lib/chef/cookbook/cookbook_collection.rb @@ -30,15 +30,14 @@ class Chef # objects for lazily-loaded remote cookbooks), it gets transformed # into this. class CookbookCollection < Mash - # The input is a mapping of cookbook name to CookbookVersion objects. We # simply extract them - def initialize(cookbook_versions={}) + def initialize(cookbook_versions = {}) super() do |hash, key| raise Chef::Exceptions::CookbookNotFound, "Cookbook #{key} not found. " << "If you're loading #{key} from another cookbook, make sure you configure the dependency in your metadata" end - cookbook_versions.each{ |cookbook_name, cookbook_version| self[cookbook_name] = cookbook_version } + cookbook_versions.each { |cookbook_name, cookbook_version| self[cookbook_name] = cookbook_version } end # Validates that the cookbook metadata allows it to run on this instance. |