diff options
-rw-r--r-- | lib/chef/provider/lwrp_base.rb | 4 | ||||
-rw-r--r-- | lib/chef/resource/lwrp_base.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/chef/provider/lwrp_base.rb b/lib/chef/provider/lwrp_base.rb index 135a3f6b7c..121abf5fdb 100644 --- a/lib/chef/provider/lwrp_base.rb +++ b/lib/chef/provider/lwrp_base.rb @@ -92,10 +92,8 @@ class Chef provider_class = Chef::Provider.const_get(class_name) else provider_class = Class.new(self) - provider_class.class_from_file(filename) - - class_name = convert_to_class_name(provider_name) Chef::Provider.const_set(class_name, provider_class) + provider_class.class_from_file(filename) Chef::Log.debug("Loaded contents of #{filename} into a provider named #{provider_name} defined in Chef::Provider::#{class_name}") end diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb index a4606be842..20d177f507 100644 --- a/lib/chef/resource/lwrp_base.rb +++ b/lib/chef/resource/lwrp_base.rb @@ -46,11 +46,11 @@ class Chef else resource_class = Class.new(self) + Chef::Resource.const_set(class_name, resource_class) resource_class.resource_name = rname resource_class.run_context = run_context resource_class.class_from_file(filename) - Chef::Resource.const_set(class_name, resource_class) Chef::Log.debug("Loaded contents of #{filename} into a resource named #{rname} defined in Chef::Resource::#{class_name}") end |