diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2017-04-03 17:23:10 -0500 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2017-04-03 17:23:10 -0500 |
commit | 9dc01eafb44618cb71169d8c891d3ce2792aed1f (patch) | |
tree | 21130bfc55193f42b6630387cdd458f34e0ee185 /lib/chef/resource.rb | |
parent | 1ffb0a0fa00f1ef359e42886def859df6fd3e48c (diff) | |
download | chef-9dc01eafb44618cb71169d8c891d3ce2792aed1f.tar.gz |
Try removing the const-ificiation of DSL-based resources/providers.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index bd966f9c79..ca6603c06a 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -1488,27 +1488,6 @@ class Chef self.class.resource_for_node(name, node).new("name", run_context).provider_for_action(action).class end - module DeprecatedLWRPClass - - # @api private - def register_deprecated_lwrp_class(resource_class, class_name) - if Chef::Resource.const_defined?(class_name, false) - Chef::Log.warn "#{class_name} already exists! Deprecation class overwrites #{resource_class}" - Chef::Resource.send(:remove_const, class_name) - end - - if !Chef::Config[:treat_deprecation_warnings_as_errors] - Chef::Resource.const_set(class_name, resource_class) - Chef::Resource.deprecated_constants[class_name.to_sym] = resource_class - end - end - - def deprecated_constants - raise "Deprecated constants should be called only on Chef::Resource" unless self == Chef::Resource - @deprecated_constants ||= {} - end - end - def self.remove_canonical_dsl if @resource_name remaining = Chef.resource_handler_map.delete_canonical(@resource_name, self) @@ -1517,7 +1496,6 @@ class Chef end end end - extend DeprecatedLWRPClass end end |