jonlives/knife-spork — pull request #38 by gmcmillan (2012-11-07 17:08:38+00:00)
Title: Bugfix: List all remote cookbook versions when querying server side cookbooks.

This fixes a bug that occurs if you're uploading a cookbook that depends on a specific version of a cookbook that would only be found on the remote chef server.

The current call you are using (list) only returns the newest version of the cookbook when checking dependencies on the remote server. The list_all_versions method will return all versions to allow a proper dependency check:

https://github.com/opscode/chef/blob/master/lib/chef/cookbook_version.rb#L636-643

This is the same method knife uses now when you do a stock "knife cookbook upload":

https://github.com/opscode/chef/blob/master/lib/chef/knife/cookbook_upload.rb#L93-95