diff options
author | tyler-ball <tyleraball@gmail.com> | 2014-10-16 10:07:40 -0500 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-10-16 10:33:02 -0500 |
commit | 72dd653d9481848a7489845a46851c66964c5a37 (patch) | |
tree | 82b3be7d0c343182ac9fc294459495ff2f70b911 /lib/chef/json_compat.rb | |
parent | 322eaf62464f306e2e3b3fec5b9fed15d17fc50b (diff) | |
download | chef-72dd653d9481848a7489845a46851c66964c5a37.tar.gz |
Refactoring ResourceCollection interface to be backwards compatiable, all specs continue to pass, removing ResourceSet and ResourceList from consumer knowledge
Diffstat (limited to 'lib/chef/json_compat.rb')
-rw-r--r-- | lib/chef/json_compat.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/json_compat.rb b/lib/chef/json_compat.rb index 3350da0c13..0796984ab2 100644 --- a/lib/chef/json_compat.rb +++ b/lib/chef/json_compat.rb @@ -39,6 +39,8 @@ class Chef CHEF_SANDBOX = "Chef::Sandbox".freeze CHEF_RESOURCE = "Chef::Resource".freeze CHEF_RESOURCECOLLECTION = "Chef::ResourceCollection".freeze + CHEF_RESOURCESET = "Chef::ResourceCollection::ResourceSet".freeze + CHEF_RESOURCELIST = "Chef::ResourceCollection::ResourceList".freeze class <<self @@ -145,6 +147,10 @@ class Chef Chef::Resource when CHEF_RESOURCECOLLECTION Chef::ResourceCollection + when CHEF_RESOURCESET + Chef::ResourceCollection::ResourceSet + when CHEF_RESOURCELIST + Chef::ResourceCollection::ResourceList when /^Chef::Resource/ Chef::Resource.find_subclass_by_name(json_class) else |