diff options
author | Prajakta Purohit <prajakta@opscode.com> | 2016-06-07 08:36:11 -0700 |
---|---|---|
committer | Prajakta Purohit <prajakta@opscode.com> | 2016-06-07 08:36:44 -0700 |
commit | 523d8902cfd48a4d6012ab1c9305bde0b1a89fd6 (patch) | |
tree | 128735ffbcef20741e0bc136b3dadc267708933f | |
parent | 9459891e47fff684f4ff304de980b913e58cc119 (diff) | |
download | chef-praj/s3cmd_test.tar.gz |
look for deprecated constants in the ancestors as wellpraj/s3cmd_test
-rw-r--r-- | lib/chef/provider.rb | 6 | ||||
-rw-r--r-- | lib/chef/resource.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb index 483f9923fe..e8c9d5232e 100644 --- a/lib/chef/provider.rb +++ b/lib/chef/provider.rb @@ -435,7 +435,7 @@ class Chef def register_deprecated_lwrp_class(provider_class, class_name) # Register Chef::Provider::MyProvider with deprecation warnings if you # try to access it - if Chef::Provider.const_defined?(class_name, false) + if Chef::Provider.const_defined?(class_name) Chef::Log.warn "Chef::Provider::#{class_name} already exists! Cannot create deprecation class for #{provider_class}" else deprecated_constants[class_name.to_sym] = provider_class @@ -444,9 +444,9 @@ class Chef private - @@deprecated_constants = {} + #@@deprecated_constants = {} def deprecated_constants - @@deprecated_constants + @deprecated_constants ||= {} end end extend DeprecatedLWRPClass diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index cd1743103e..446801e099 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -1531,7 +1531,7 @@ class Chef # @api private def self.register_deprecated_lwrp_class(resource_class, class_name) - if Chef::Resource.const_defined?(class_name, false) + if Chef::Resource.const_defined?(class_name) Chef::Log.warn "#{class_name} already exists! Deprecation class overwrites #{resource_class}" Chef::Resource.send(:remove_const, class_name) end @@ -1542,9 +1542,9 @@ class Chef end end - @@deprecated_constants = {} + #@@deprecated_constants = {} def deprecated_constants - @deprecated_constants + @deprecated_constants ||= {} end # @api private |