Skip to content

Commit

Permalink
[CHEF-1587] Rollback Chef::Node#recipe? method to be consued from coo…
Browse files Browse the repository at this point in the history
…kbooks
  • Loading branch information
akzhan committed Oct 20, 2010
1 parent e48abd7 commit 5bf1a09
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions chef/lib/chef/node.rb
Expand Up @@ -326,12 +326,11 @@ def method_missing(symbol, *args)
# run_state[:seen_recipes], which is populated by include_recipe
# statements in the DSL (and thus would not be in the run list).
#
# NOTE: We believe this is dead code, but if it's not, please
# email chef-dev@opscode.com. [cw,timh]
# def recipe?(recipe_name)
# run_list.include?(recipe_name) || run_state[:seen_recipes].include?(recipe_name)
# end

# NOTE: It's used by cookbook authors
def recipe?(recipe_name)
run_list.include?(recipe_name) || run_state[:seen_recipes].include?(recipe_name)
end

# Returns true if this Node expects a given role, false if not.
def role?(role_name)
run_list.include?("role[#{role_name}]")
Expand Down

0 comments on commit 5bf1a09

Please sign in to comment.