summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-02-03 12:58:19 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-02-03 15:12:48 -0800
commit3a87159beb91315401a3b88ea847ae6821e0ab88 (patch)
tree6a982e97f0817702b8ed12c62697ccc38a3974e0 /lib/chef/resource
parent235622a134cecf6696bcb451038618dc682108cc (diff)
downloadchef-3a87159beb91315401a3b88ea847ae6821e0ab88.tar.gz
fix LWRP constant lookups
* providers had the same bug as CHEF-4117 on resources * removed the strict_const_defined method on Chef::Resource since ruby 1.8.7 deprecation made that method entirely trivial * added tests, verified the failure cases really work * todo added since i think we're leaking state in-between tests
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/lwrp_base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb
index 0a1253780c..ce72e98028 100644
--- a/lib/chef/resource/lwrp_base.rb
+++ b/lib/chef/resource/lwrp_base.rb
@@ -39,7 +39,7 @@ class Chef
rname = filename_to_qualified_string(cookbook_name, filename)
class_name = convert_to_class_name(rname)
- if Resource.strict_const_defined?(class_name)
+ if Resource.const_defined?(class_name, false)
Chef::Log.info("#{class_name} light-weight resource is already initialized -- Skipping loading #{filename}!")
Chef::Log.debug("Overriding already defined LWRPs is not supported anymore starting with Chef 12.")
resource_class = Resource.const_get(class_name)