From fc710c26a95e74aa66bf0bee8923ee104593c97a Mon Sep 17 00:00:00 2001 From: John Keiser Date: Wed, 6 May 2015 14:07:43 -0700 Subject: Narrow resolvers to only look at parts of the map we support --- lib/chef/platform/provider_priority_map.rb | 11 ++++++----- lib/chef/platform/resource_priority_map.rb | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/chef/platform') diff --git a/lib/chef/platform/provider_priority_map.rb b/lib/chef/platform/provider_priority_map.rb index 2d250b5006..0a6c8d8b4d 100644 --- a/lib/chef/platform/provider_priority_map.rb +++ b/lib/chef/platform/provider_priority_map.rb @@ -10,15 +10,16 @@ class Chef end def set_priority_array(resource_name, priority_array, *filter) - priority(resource_name.to_sym, Array(priority_array), *filter) + priority(resource_name.to_sym, priority_array, *filter) end - def priority(*args) - priority_map.set(*args) + def priority(resource_name, priority_array, *filter) + priority_map.set(resource_name.to_sym, Array(priority_array), *filter) end - def list(node, resource_name) - priority_map.list(node, resource_name).flatten(1).uniq + # @api private + def list_handlers(node, resource_name) + priority_map.list(node, resource_name.to_sym).flatten(1).uniq end private diff --git a/lib/chef/platform/resource_priority_map.rb b/lib/chef/platform/resource_priority_map.rb index e692cbb800..34f13529fe 100644 --- a/lib/chef/platform/resource_priority_map.rb +++ b/lib/chef/platform/resource_priority_map.rb @@ -17,7 +17,8 @@ class Chef priority_map.set(*args) end - def list(*args) + # @api private + def list_handlers(*args) priority_map.list(*args).flatten(1).uniq end -- cgit v1.2.1