HI,
With Chef 11 we had (and still have) in providers:
def load_current_resource
@current_resource = Chef::Resource::MyCookbookMyRes.new(@new_resource.name)
# ...
end
I want to make my cookbooks compatible both with Chef 11 and later versions. But with Chef 13 I have an error that constant Chef::Resource::MyCookbookMyRes is not defined.
if I do 'my_cookbook_my_res('foo').class' in chef-shell, it shows weird (and useless)
Custom resource my_res from cookbook my_cookbook
So the question: how to rewrite load_current_resource so it works both with Chef 11 and newer versions?