Created
January 22, 2015 18:39
-
-
Save brandocorp/3084c5b7f1a7ef5cd29f to your computer and use it in GitHub Desktop.
Stop include_recipe directive from actually loading the recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This keeps any cookbook aside from our target cookbook from actually loading recipes | |
class Chef | |
class CookbookVersion | |
alias_method :old_load_recipe, :load_recipe | |
def load_recipe(recipe_name, run_context) | |
old_load_recipe(recipe_name, run_context) if metadata.name == 'cookbook_name' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment