summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-05-06 14:07:43 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-02 09:53:39 -0700
commitfc710c26a95e74aa66bf0bee8923ee104593c97a (patch)
treeb41e2ed1f80fa139d8b9c171b8e11eb4eed82c5f /lib/chef/resource.rb
parent9028823f7b046c4c081b1cb1df005d61fbfa1db2 (diff)
downloadchef-fc710c26a95e74aa66bf0bee8923ee104593c97a.tar.gz
Narrow resolvers to only look at parts of the map we support
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 686b212e49..caced28721 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -1104,11 +1104,16 @@ class Chef
end
def self.provides(name, opts={}, &block)
- result = super
+ priority_map = Chef::Platform::ResourcePriorityMap.instance
+ result = priority_map.priority(name, self, opts, &block)
Chef::DSL::Resources.add_resource_dsl(name)
result
end
+ def self.provides?(node, resource)
+ Chef::ResourceResolver.new(node, resource).provided_by?(self)
+ end
+
# Helper for #notifies
def validate_resource_spec!(resource_spec)
run_context.resource_collection.validate_lookup_spec!(resource_spec)