diff options
author | Chris Walters <cw@opscode.com> | 2010-06-04 11:42:15 -0700 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2010-06-15 17:03:55 -0700 |
commit | 2b6800bc8ab4deec4419e48da810bbe19f784d76 (patch) | |
tree | f532cb149015cad7a6515ecce79ca5c3a2367589 | |
parent | 3e4814c3ac314b126f877b332cdad15a99495fcc (diff) | |
download | chef-2b6800bc8ab4deec4419e48da810bbe19f784d76.tar.gz |
Fixing the look up of the latest version of a cookbook
-rw-r--r-- | chef/lib/chef/cookbook_version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chef/lib/chef/cookbook_version.rb b/chef/lib/chef/cookbook_version.rb index c692276d0e..8b29adbe8a 100644 --- a/chef/lib/chef/cookbook_version.rb +++ b/chef/lib/chef/cookbook_version.rb @@ -727,7 +727,7 @@ class Chef def self.cdb_load(name, version='latest', couchdb=nil) cdb = couchdb || Chef::CouchDB.new if version == "latest" || version == "_latest" - rs = cdb.get_view("cookbook_versions", "all_latest_version", :key => name, :descending => true, :group => true, :reduce => true)["rows"].first + rs = cdb.get_view("cookbooks", "all_latest_version", :key => name, :descending => true, :group => true, :reduce => true)["rows"].first cdb.load("cookbook_version", "#{rs["key"]}-#{rs["value"]}") else cdb.load("cookbook_version", "#{name}-#{version}") |