diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-04-11 12:48:22 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-04-15 17:50:15 -0700 |
commit | e3a6565927e854cd5968bd3a6bd2248ec1245549 (patch) | |
tree | 590bfa3f9c3a4992096c0ccb679fcc7deda74243 /lib/chef/provider.rb | |
parent | a959404b15ba6bdc98063cfa0c70e6f9eec9ccee (diff) | |
download | chef-e3a6565927e854cd5968bd3a6bd2248ec1245549.tar.gz |
add resource_resolver and resource_priority_map
also wire them up through the Chef class.
Diffstat (limited to 'lib/chef/provider.rb')
-rw-r--r-- | lib/chef/provider.rb | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb index 680fe9782f..65a56cf726 100644 --- a/lib/chef/provider.rb +++ b/lib/chef/provider.rb @@ -22,7 +22,7 @@ require 'chef/mixin/convert_to_class_name' require 'chef/mixin/enforce_ownership_and_permissions' require 'chef/mixin/why_run' require 'chef/mixin/shell_out' -require 'chef/mixin/descendants_tracker' +require 'chef/mixin/provides' require 'chef/platform/service_helpers' require 'chef/node_map' @@ -30,26 +30,11 @@ class Chef class Provider include Chef::Mixin::WhyRun include Chef::Mixin::ShellOut - extend Chef::Mixin::DescendantsTracker + extend Chef::Mixin::Provides - class << self - def node_map - @node_map ||= Chef::NodeMap.new - end - - def provides(resource_name, opts={}, &block) - node_map.set(resource_name.to_sym, true, opts, &block) - end - - # provides a node on the resource (early binding) - def provides?(node, resource) - node_map.get(node, resource.resource_name) - end - - # supports the given resource and action (late binding) - def supports?(resource, action) - true - end + # supports the given resource and action (late binding) + def self.supports?(resource, action) + true end attr_accessor :new_resource |