summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/mixin/provides.rb1
-rw-r--r--lib/chef/provider_resolver.rb4
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/mixin/provides.rb b/lib/chef/mixin/provides.rb
index bc25af62b2..e5bb2c2005 100644
--- a/lib/chef/mixin/provides.rb
+++ b/lib/chef/mixin/provides.rb
@@ -25,7 +25,6 @@ class Chef
# provides a node on the resource (early binding)
def provides?(node, resource_name)
- resource_name = resource_name.resource_name if resource_name.is_a?(Chef::Resource)
node_map.get(node, resource_name)
end
end
diff --git a/lib/chef/provider_resolver.rb b/lib/chef/provider_resolver.rb
index 45122d7156..867c3deca8 100644
--- a/lib/chef/provider_resolver.rb
+++ b/lib/chef/provider_resolver.rb
@@ -47,9 +47,7 @@ class Chef
def enabled_handlers
@enabled_handlers ||=
providers.select do |klass|
- # NB: this is different from resoruce_resolver which must pass a resource_name
- # FIXME: deprecate this and normalize on passing resource_name here
- klass.provides?(node, resource)
+ klass.provides?(node, resource.resource_name)
end.sort {|a,b| a.to_s <=> b.to_s }
end