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 | |
parent | e01711824bcddb72c7898d257dbf4c4a3b804a5a (diff) | |
download | chef-c8e2898fc8ca1cec5673b14489785d4daf62593f.tar.gz |
Alias #latest_cookbooks.mcquin/Issue-2090
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | lib/chef/cookbook_version.rb | 14 |
2 files changed, 5 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a4272b21db..197d537d74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,7 +141,6 @@ * Add homebrew provider for package resource, use it by default on OS X (Issue #1709) * Add escape_glob method to PathHelper, update glob operations. * Verify x509 properties of certificates in the :trusted_certs_dir during knife ssl check. -* Deprecate CookbookVersion#latest_cookbooks ## Last Release: 11.14.2 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 |