diff options
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-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 |