Commit 37f20fed authored by Jonathan Hartman's avatar Jonathan Hartman Committed by Ben Abrams
Browse files

Fix an incompatibility with Chef 13

Chef 13 was released today and seems to no longer be able to handle resource
classes from LWRP providers in the same way.

```
   ================================================================================
   Error executing action `install` on resource 'sumologic_collector[Install Sumo Logic collector]'
   ================================================================================

   NameError
   ---------
   uninitialized constant Chef::Resource::SumologicCollector

   Cookbook Trace:
   ---------------
   /tmp/kitchen/cache/cookbooks/sumologic-collector/providers/default.rb:10:in `load_current_resource'
```

This change is now documented under "DSL-based custom resources and providers
no longer get module constants" [here](https://docs.chef.io/release_notes.html).
parent 583f3fbd
......@@ -7,7 +7,7 @@ def whyrun_supported?
end
def load_current_resource
@current_resource = Chef::Resource::SumologicCollector.new(new_resource.dir)
@current_resource = Chef::Resource.resource_for_node(:sumologic_collector, node).new(new_resource.dir)
@current_resource.installed(installed?)
end
......
......@@ -7,7 +7,7 @@ def whyrun_supported?
end
def load_current_resource
@current_resource = Chef::Resource::SumologicCollectorInstaller.new(new_resource.dir)
@current_resource = Chef::Resource.resource_for_node(:sumologic_collector_installer, node).new(new_resource.dir)
end
action :install do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment