summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_version.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-22 14:37:55 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-22 14:37:55 -0700
commit6f0901d79d761e8b7cd23e9fb7e427dc97b3a183 (patch)
tree14c37f51fe530bb2e26a5e86bfc592b3e0619221 /lib/chef/cookbook_version.rb
parent37e9c14ec87abfae7277c948a84cd10963806280 (diff)
downloadchef-jk/cookbook-processor.tar.gz
Add CookbookProcessor to funnel all cookbook evaluation through one overrideable placejk/cookbook-processor
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r--lib/chef/cookbook_version.rb15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index 8d302eeec2..d87c707e18 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -213,20 +213,7 @@ class Chef
# called from DSL
def load_recipe(recipe_name, run_context)
- unless recipe_filenames_by_name.has_key?(recipe_name)
- raise Chef::Exceptions::RecipeNotFound, "could not find recipe #{recipe_name} for cookbook #{name}"
- end
-
- Chef::Log.debug("Found recipe #{recipe_name} in cookbook #{name}")
- recipe = Chef::Recipe.new(name, recipe_name, run_context)
- recipe_filename = recipe_filenames_by_name[recipe_name]
-
- unless recipe_filename
- raise Chef::Exceptions::RecipeNotFound, "could not find #{recipe_name} files for cookbook #{name}"
- end
-
- recipe.from_file(recipe_filename)
- recipe
+ run_context.load_recipe(recipe_name)
end
def segment_filenames(segment)