lib/stove/community.rb in stove-3.2.6 vs lib/stove/community.rb in stove-3.2.7

- old
+ new

@@ -8,11 +8,11 @@ # # The default endpoint where the community site lives. # # @return [String] # - DEFAULT_ENDPOINT = 'https://supermarket.getchef.com/api/v1' + DEFAULT_ENDPOINT = 'https://supermarket.chef.io/api/v1' # # Get and cache a community cookbook's JSON response from the given name # and version. # @@ -48,18 +48,18 @@ # Upload a cookbook to the community site. # # @param [Cookbook] cookbook # the cookbook to upload # - def upload(cookbook) + def upload(cookbook, extended_metadata = false) connection.post('cookbooks', { - 'tarball' => cookbook.tarball, + 'tarball' => cookbook.tarball(extended_metadata), # This is for legacy, backwards-compatability reasons. The new # Supermarket site does not require a category, but many of the testing # tools still assume a cookbook category is present. We just hardcode # "Other" here. - 'cookbook' => { 'category' => 'Other' }.to_json, + 'cookbook' => JSON.fast_generate(category: 'Other'), }) end # # Delete the given cookbook from the communit site.