diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-08 13:44:57 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-08 13:44:57 -0800 |
commit | 5fbdf841ec3e4abce1e8dd05f46bddeb00492887 (patch) | |
tree | bf9e303f929dbcd853d051c5b999178c3664395d /lib/chef/platform | |
parent | e2c5935b818c8d1a74e24ba624de1ae489909fdb (diff) | |
download | chef-5fbdf841ec3e4abce1e8dd05f46bddeb00492887.tar.gz |
remove Chef::Platform::HandlerMaplcg/remove-chef-platform-handler-class
seems like an entirely unnecessary level of indirection
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/platform')
-rw-r--r-- | lib/chef/platform/handler_map.rb | 40 | ||||
-rw-r--r-- | lib/chef/platform/provider_handler_map.rb | 4 | ||||
-rw-r--r-- | lib/chef/platform/resource_handler_map.rb | 4 |
3 files changed, 4 insertions, 44 deletions
diff --git a/lib/chef/platform/handler_map.rb b/lib/chef/platform/handler_map.rb deleted file mode 100644 index da8f84237f..0000000000 --- a/lib/chef/platform/handler_map.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -# Author:: John Keiser (<jkeiser@chef.io>) -# Copyright:: Copyright 2015-2016, Chef Software Inc. -# License:: Apache License, Version 2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require "chef/node_map" - -class Chef - class Platform - class HandlerMap < Chef::NodeMap - # - # "provides" lines with identical filters sort by class name (ascending). - # - def compare_matchers(key, new_matcher, matcher) - cmp = super - if cmp == 0 - # Sort by class name (ascending) as well, if all other properties - # are exactly equal - if new_matcher[:value].is_a?(Class) && !new_matcher[:override] - cmp = compare_matcher_properties(new_matcher, matcher) { |m| m[:value].name } - end - end - cmp - end - end - end -end diff --git a/lib/chef/platform/provider_handler_map.rb b/lib/chef/platform/provider_handler_map.rb index 26acf150df..4f87a36d1d 100644 --- a/lib/chef/platform/provider_handler_map.rb +++ b/lib/chef/platform/provider_handler_map.rb @@ -17,12 +17,12 @@ # require "singleton" -require "chef/platform/handler_map" +require "chef/node_map" class Chef class Platform # @api private - class ProviderHandlerMap < Chef::Platform::HandlerMap + class ProviderHandlerMap < Chef::NodeMap include Singleton end end diff --git a/lib/chef/platform/resource_handler_map.rb b/lib/chef/platform/resource_handler_map.rb index be1b9c28f5..0aab04212f 100644 --- a/lib/chef/platform/resource_handler_map.rb +++ b/lib/chef/platform/resource_handler_map.rb @@ -17,12 +17,12 @@ # require "singleton" -require "chef/platform/handler_map" +require "chef/node_map" class Chef class Platform # @api private - class ResourceHandlerMap < Chef::Platform::HandlerMap + class ResourceHandlerMap < Chef::NodeMap include Singleton end end |