diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-30 14:55:41 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-30 14:56:04 -0700 |
commit | c8e2898fc8ca1cec5673b14489785d4daf62593f (patch) | |
tree | f0b79b5a4f7dec8b6e4101845e5c3600c7875965 /lib | |
parent | e01711824bcddb72c7898d257dbf4c4a3b804a5a (diff) | |
download | chef-c8e2898fc8ca1cec5673b14489785d4daf62593f.tar.gz |
Alias #latest_cookbooks.mcquin/Issue-2090
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/cookbook_version.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 73bff22a75..40aaaf1191 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -552,6 +552,11 @@ class Chef chef_server_rest.get_rest('cookbooks') end + # Alias latest_cookbooks as list + class << self + alias :latest_cookbooks :list + end + def self.list_all_versions chef_server_rest.get_rest('cookbooks?num_versions=all') end @@ -575,15 +580,6 @@ class Chef end end - # Get the newest version of all cookbooks - # Remove in Chef 13 - def self.latest_cookbooks - Chef::Log.warn("[DEPRECATED]: The method Chef::CookbookVersion#latest_cookbooks is deprecated in Chef 12" + - " and will be removed in future versions of Chef. Use method Chef::CookbookVersion#list for a list of" + - " available cookbooks and their latest version.") - self.list - end - def <=>(o) raise Chef::Exceptions::CookbookVersionNameMismatch if self.name != o.name # FIXME: can we change the interface to the Metadata class such |