summaryrefslogtreecommitdiff
path: root/lib/chef/provider_resolver.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-04-24 10:48:43 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-04-24 10:48:43 -0700
commit57cdbe124f63e47cab960e714572539d3979b90f (patch)
tree0b4687f9090de23502bea8c01aeb643290ec7ada /lib/chef/provider_resolver.rb
parent9e00864cce2ba88ca5a952c3cc98ee15d22f84f8 (diff)
downloadchef-57cdbe124f63e47cab960e714572539d3979b90f.tar.gz
Fix API break in 12.3.0.rc.0
provides? on a provider was passed the full resource. provides? on a resource class cannot be passed the resource and must be passed the declared_type instead. i tried to make them the same, but that would change the API on the provider.
Diffstat (limited to 'lib/chef/provider_resolver.rb')
-rw-r--r--lib/chef/provider_resolver.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/provider_resolver.rb b/lib/chef/provider_resolver.rb
index 867c3deca8..45122d7156 100644
--- a/lib/chef/provider_resolver.rb
+++ b/lib/chef/provider_resolver.rb
@@ -47,7 +47,9 @@ class Chef
def enabled_handlers
@enabled_handlers ||=
providers.select do |klass|
- klass.provides?(node, resource.resource_name)
+ # 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)
end.sort {|a,b| a.to_s <=> b.to_s }
end