stove 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +13 -0
 - data/bin/stove +1 -0
 - data/features/plugins/community.feature +7 -7
 - data/features/plugins/git.feature +1 -1
 - data/features/step_definitions/community_steps.rb +2 -2
 - data/lib/stove.rb +2 -2
 - data/lib/stove/cli.rb +3 -3
 - data/lib/stove/cookbook.rb +3 -3
 - data/lib/stove/cookbook/metadata.rb +1 -1
 - data/lib/stove/error.rb +4 -3
 - data/lib/stove/plugins/git.rb +2 -0
 - data/lib/stove/plugins/supermarket.rb +18 -0
 - data/lib/stove/runner.rb +1 -1
 - data/lib/stove/{community.rb → supermarket.rb} +9 -9
 - data/lib/stove/version.rb +1 -1
 - data/spec/unit/error_spec.rb +4 -4
 - data/templates/errors/git_tagging_failed.erb +5 -0
 - data/templates/errors/{cookbook_already_exists.erb → supermarket_already_exists.erb} +0 -0
 - data/templates/errors/supermarket_key_validation_failed.erb +3 -0
 - data/templates/errors/{community_username_validation_failed.erb → supermarket_username_validation_failed.erb} +1 -1
 - metadata +9 -10
 - data/bin/bake +0 -6
 - data/lib/stove/plugins/community.rb +0 -18
 - data/templates/errors/community_key_validation_failed.erb +0 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 390277d48cb42db0d622b67242398c2356a64caa
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5d62fb5adb3ab6433d2dd3a2cae863833e52ebda
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 5434acb284472d0f408b3e14215942faa47acb190a88147b1d651a54520d19bdd7e55fa5c6932af26de61f4baadf37c676c7e3413bce4d24c834172789812906
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c9df46d77f1c1b61aa22e865ad1df556d8b34f87927019bdc877b3ec5ba0a0cb84459d0f94bc680c867a4a4a816ad5c9009fdf8f579126d205775c020e9cec15
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -2,6 +2,19 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            This is the Changelog for the Stove gem.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
      
 5 
     | 
    
         
            +
            ## v6.0.0
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ### Breaking Changes
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            - All references to the Community site have been renamed to Supermarket. This includes the name of the `community` plugin and all `Community` classes references within the code. This should not be a breaking change unless your developing against stove as a library.
         
     | 
| 
      
 10 
     | 
    
         
            +
            - The long ago deprecated `bake` command has been removed.
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            ### Other Changes
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            - Git tagging errors now include more useful error messaging.
         
     | 
| 
      
 15 
     | 
    
         
            +
            - The help command now better describes `--no-git` and `--endpoint` flags.
         
     | 
| 
      
 16 
     | 
    
         
            +
            - For developers running stove from the git repository, the application now properly loads stove from the repository instead of from an installed gem.
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
       5 
18 
     | 
    
         
             
            ## v5.2.0 (2017-05-12)
         
     | 
| 
       6 
19 
     | 
    
         | 
| 
       7 
20 
     | 
    
         
             
            - Support for uploading to Artifactory
         
     | 
    
        data/bin/stove
    CHANGED
    
    
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            Feature:  
     | 
| 
      
 1 
     | 
    
         
            +
            Feature: Supermarket
         
     | 
| 
       2 
2 
     | 
    
         
             
              Background:
         
     | 
| 
       3 
3 
     | 
    
         
             
                * I have a cookbook named "bacon"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
         @@ -13,25 +13,25 @@ Feature: Community 
     | 
|
| 
       13 
13 
     | 
    
         
             
                * it should fail with "requires a private key"
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
              Scenario: With the default parameters
         
     | 
| 
       16 
     | 
    
         
            -
                * the  
     | 
| 
      
 16 
     | 
    
         
            +
                * the supermarket has the cookbook:
         
     | 
| 
       17 
17 
     | 
    
         
             
                  | bacon | 1.2.3 |
         
     | 
| 
       18 
18 
     | 
    
         
             
                * I successfully run `stove --no-git`
         
     | 
| 
       19 
     | 
    
         
            -
                * the  
     | 
| 
      
 19 
     | 
    
         
            +
                * the supermarket will have the cookbooks:
         
     | 
| 
       20 
20 
     | 
    
         
             
                  | bacon | 0.0.0 |
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
              Scenario: Yanking a cookbook
         
     | 
| 
       23 
     | 
    
         
            -
                * the  
     | 
| 
      
 23 
     | 
    
         
            +
                * the supermarket has the cookbooks:
         
     | 
| 
       24 
24 
     | 
    
         
             
                  | bacon | 1.2.3 |
         
     | 
| 
       25 
25 
     | 
    
         
             
                * I successfully run `stove yank -l debug`
         
     | 
| 
       26 
     | 
    
         
            -
                * the  
     | 
| 
      
 26 
     | 
    
         
            +
                * the supermarket will not have the cookbooks:
         
     | 
| 
       27 
27 
     | 
    
         
             
                  | bacon | 1.2.3 |
         
     | 
| 
       28 
28 
     | 
    
         
             
                * the output should contain "Successfully yanked bacon!"
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
              Scenario: Yanking a cookbook by name
         
     | 
| 
       31 
     | 
    
         
            -
                * the  
     | 
| 
      
 31 
     | 
    
         
            +
                * the supermarket has the cookbooks:
         
     | 
| 
       32 
32 
     | 
    
         
             
                  | eggs | 4.5.6 |
         
     | 
| 
       33 
33 
     | 
    
         
             
                * I successfully run `stove yank eggs`
         
     | 
| 
       34 
     | 
    
         
            -
                * the  
     | 
| 
      
 34 
     | 
    
         
            +
                * the supermarket will not have the cookbooks:
         
     | 
| 
       35 
35 
     | 
    
         
             
                  | eggs | 4.5.6 |
         
     | 
| 
       36 
36 
     | 
    
         
             
                * the output should not contain "Successfully yanked bacon!"
         
     | 
| 
       37 
37 
     | 
    
         
             
                * the output should contain "Successfully yanked eggs!"
         
     | 
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            Given /^the  
     | 
| 
      
 1 
     | 
    
         
            +
            Given /^the supermarket has the cookbooks?:$/ do |table|
         
     | 
| 
       2 
2 
     | 
    
         
             
              table.raw.each do |name, version|
         
     | 
| 
       3 
3 
     | 
    
         
             
                version  ||= '0.0.0'
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
         @@ -10,7 +10,7 @@ Given /^the community server has the cookbooks?:$/ do |table| 
     | 
|
| 
       10 
10 
     | 
    
         
             
              end
         
     | 
| 
       11 
11 
     | 
    
         
             
            end
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
            Then /^the  
     | 
| 
      
 13 
     | 
    
         
            +
            Then /^the supermarket will( not)? have the cookbooks?:$/ do |negate, table|
         
     | 
| 
       14 
14 
     | 
    
         
             
              table.raw.each do |name, version|
         
     | 
| 
       15 
15 
     | 
    
         
             
                cookbook = CommunityZero::RSpec.store.find(name, version)
         
     | 
| 
       16 
16 
     | 
    
         | 
    
        data/lib/stove.rb
    CHANGED
    
    | 
         @@ -3,7 +3,7 @@ require 'pathname' 
     | 
|
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
            module Stove
         
     | 
| 
       5 
5 
     | 
    
         
             
              autoload :Artifactory, 'stove/artifactory'
         
     | 
| 
       6 
     | 
    
         
            -
              autoload : 
     | 
| 
      
 6 
     | 
    
         
            +
              autoload :Supermarket, 'stove/supermarket'
         
     | 
| 
       7 
7 
     | 
    
         
             
              autoload :Config,      'stove/config'
         
     | 
| 
       8 
8 
     | 
    
         
             
              autoload :Cookbook,    'stove/cookbook'
         
     | 
| 
       9 
9 
     | 
    
         
             
              autoload :Cli,         'stove/cli'
         
     | 
| 
         @@ -31,7 +31,7 @@ module Stove 
     | 
|
| 
       31 
31 
     | 
    
         
             
              module Plugin
         
     | 
| 
       32 
32 
     | 
    
         
             
                autoload :Artifactory, 'stove/plugins/artifactory'
         
     | 
| 
       33 
33 
     | 
    
         
             
                autoload :Base,        'stove/plugins/base'
         
     | 
| 
       34 
     | 
    
         
            -
                autoload : 
     | 
| 
      
 34 
     | 
    
         
            +
                autoload :Supermarket, 'stove/plugins/supermarket'
         
     | 
| 
       35 
35 
     | 
    
         
             
                autoload :Git,         'stove/plugins/git'
         
     | 
| 
       36 
36 
     | 
    
         
             
              end
         
     | 
| 
       37 
37 
     | 
    
         | 
    
        data/lib/stove/cli.rb
    CHANGED
    
    | 
         @@ -55,7 +55,7 @@ module Stove 
     | 
|
| 
       55 
55 
     | 
    
         
             
                  if @argv.first == 'yank'
         
     | 
| 
       56 
56 
     | 
    
         
             
                    name = @argv[1] || Cookbook.new(options[:path]).name
         
     | 
| 
       57 
57 
     | 
    
         | 
| 
       58 
     | 
    
         
            -
                    if  
     | 
| 
      
 58 
     | 
    
         
            +
                    if Supermarket.yank(name)
         
     | 
| 
       59 
59 
     | 
    
         
             
                      @stdout.puts "Successfully yanked #{name}!"
         
     | 
| 
       60 
60 
     | 
    
         
             
                      @kernel.exit(0)
         
     | 
| 
       61 
61 
     | 
    
         
             
                    else
         
     | 
| 
         @@ -101,14 +101,14 @@ module Stove 
     | 
|
| 
       101 
101 
     | 
    
         
             
                    opts.separator ''
         
     | 
| 
       102 
102 
     | 
    
         
             
                    opts.separator 'Plugins:'
         
     | 
| 
       103 
103 
     | 
    
         | 
| 
       104 
     | 
    
         
            -
                    opts.on('--no-git', 'Do not use the git plugin') do
         
     | 
| 
      
 104 
     | 
    
         
            +
                    opts.on('--no-git', 'Do not use the git plugin. Skips tagging if specified.') do
         
     | 
| 
       105 
105 
     | 
    
         
             
                      options[:no_git] = true
         
     | 
| 
       106 
106 
     | 
    
         
             
                    end
         
     | 
| 
       107 
107 
     | 
    
         | 
| 
       108 
108 
     | 
    
         
             
                    opts.separator ''
         
     | 
| 
       109 
109 
     | 
    
         
             
                    opts.separator 'Upload Options:'
         
     | 
| 
       110 
110 
     | 
    
         | 
| 
       111 
     | 
    
         
            -
                    opts.on('--endpoint [URL]', ' 
     | 
| 
      
 111 
     | 
    
         
            +
                    opts.on('--endpoint [URL]', 'Supermarket endpoint') do |v|
         
     | 
| 
       112 
112 
     | 
    
         
             
                      options[:endpoint] = v
         
     | 
| 
       113 
113 
     | 
    
         
             
                    end
         
     | 
| 
       114 
114 
     | 
    
         | 
    
        data/lib/stove/cookbook.rb
    CHANGED
    
    | 
         @@ -17,7 +17,7 @@ module Stove 
     | 
|
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                #
         
     | 
| 
       19 
19 
     | 
    
         
             
                # The name of the cookbook (must correspond to the name of the
         
     | 
| 
       20 
     | 
    
         
            -
                # cookbook on the  
     | 
| 
      
 20 
     | 
    
         
            +
                # cookbook on the Supermarket).
         
     | 
| 
       21 
21 
     | 
    
         
             
                #
         
     | 
| 
       22 
22 
     | 
    
         
             
                # @return [String]
         
     | 
| 
       23 
23 
     | 
    
         
             
                #
         
     | 
| 
         @@ -71,7 +71,7 @@ module Stove 
     | 
|
| 
       71 
71 
     | 
    
         
             
                end
         
     | 
| 
       72 
72 
     | 
    
         | 
| 
       73 
73 
     | 
    
         
             
                #
         
     | 
| 
       74 
     | 
    
         
            -
                # Deterine if this cookbook version is released on the  
     | 
| 
      
 74 
     | 
    
         
            +
                # Deterine if this cookbook version is released on the Supermarket
         
     | 
| 
       75 
75 
     | 
    
         
             
                #
         
     | 
| 
       76 
76 
     | 
    
         
             
                # @warn
         
     | 
| 
       77 
77 
     | 
    
         
             
                #   This is a fairly expensive operation and the result cannot be
         
     | 
| 
         @@ -82,7 +82,7 @@ module Stove 
     | 
|
| 
       82 
82 
     | 
    
         
             
                #   site, false otherwise
         
     | 
| 
       83 
83 
     | 
    
         
             
                #
         
     | 
| 
       84 
84 
     | 
    
         
             
                def released?
         
     | 
| 
       85 
     | 
    
         
            -
                   
     | 
| 
      
 85 
     | 
    
         
            +
                  Supermarket.cookbook(name, version)
         
     | 
| 
       86 
86 
     | 
    
         
             
                  true
         
     | 
| 
       87 
87 
     | 
    
         
             
                rescue ChefAPI::Error::HTTPNotFound
         
     | 
| 
       88 
88 
     | 
    
         
             
                  false
         
     | 
| 
         @@ -5,7 +5,7 @@ module Stove 
     | 
|
| 
       5 
5 
     | 
    
         
             
                # Borrowed and modified from:
         
     | 
| 
       6 
6 
     | 
    
         
             
                # {https://raw.github.com/opscode/chef/11.4.0/lib/chef/cookbook/metadata.rb}
         
     | 
| 
       7 
7 
     | 
    
         
             
                #
         
     | 
| 
       8 
     | 
    
         
            -
                # Copyright:: Copyright 2008- 
     | 
| 
      
 8 
     | 
    
         
            +
                # Copyright:: Copyright 2008-2017 Chef Software, Inc.
         
     | 
| 
       9 
9 
     | 
    
         
             
                #
         
     | 
| 
       10 
10 
     | 
    
         
             
                # Licensed under the Apache License, Version 2.0 (the "License");
         
     | 
| 
       11 
11 
     | 
    
         
             
                # you may not use this file except in compliance with the License.
         
     | 
    
        data/lib/stove/error.rb
    CHANGED
    
    | 
         @@ -38,15 +38,16 @@ module Stove 
     | 
|
| 
       38 
38 
     | 
    
         
             
                end
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
                class GitFailed < StoveError; end
         
     | 
| 
      
 41 
     | 
    
         
            +
                class GitTaggingFailed < StoveError; end
         
     | 
| 
       41 
42 
     | 
    
         
             
                class MetadataNotFound < StoveError; end
         
     | 
| 
       42 
43 
     | 
    
         
             
                class ServerUnavailable < StoveError; end
         
     | 
| 
       43 
44 
     | 
    
         
             
                class CookbookAlreadyExists < StoveError; end
         
     | 
| 
       44 
45 
     | 
    
         | 
| 
       45 
46 
     | 
    
         
             
                # Validations
         
     | 
| 
       46 
47 
     | 
    
         
             
                class ValidationFailed < StoveError; end
         
     | 
| 
       47 
     | 
    
         
            -
                class  
     | 
| 
       48 
     | 
    
         
            -
                class  
     | 
| 
       49 
     | 
    
         
            -
                class  
     | 
| 
      
 48 
     | 
    
         
            +
                class SupermarketCategoryValidationFailed < ValidationFailed; end
         
     | 
| 
      
 49 
     | 
    
         
            +
                class SupermarketKeyValidationFailed < ValidationFailed; end
         
     | 
| 
      
 50 
     | 
    
         
            +
                class SupermarketUsernameValidationFailed < ValidationFailed; end
         
     | 
| 
       50 
51 
     | 
    
         
             
                class GitCleanValidationFailed < ValidationFailed; end
         
     | 
| 
       51 
52 
     | 
    
         
             
                class GitRepositoryValidationFailed < ValidationFailed; end
         
     | 
| 
       52 
53 
     | 
    
         
             
                class GitUpToDateValidationFailed < ValidationFailed; end
         
     | 
    
        data/lib/stove/plugins/git.rb
    CHANGED
    
    | 
         @@ -34,11 +34,13 @@ module Stove 
     | 
|
| 
       34 
34 
     | 
    
         
             
                private
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
                def git(command, errors = true)
         
     | 
| 
      
 37 
     | 
    
         
            +
                  log.debug("the command matches")
         
     | 
| 
       37 
38 
     | 
    
         
             
                  log.debug("Running `git #{command}', errors: #{errors}")
         
     | 
| 
       38 
39 
     | 
    
         
             
                  Dir.chdir(cookbook.path) do
         
     | 
| 
       39 
40 
     | 
    
         
             
                    response = %x|git #{command}|
         
     | 
| 
       40 
41 
     | 
    
         | 
| 
       41 
42 
     | 
    
         
             
                    if errors && !$?.success?
         
     | 
| 
      
 43 
     | 
    
         
            +
                      raise Error::GitTaggingFailed.new(command: command) if command =~ /^tag/
         
     | 
| 
       42 
44 
     | 
    
         
             
                      raise Error::GitFailed.new(command: command)
         
     | 
| 
       43 
45 
     | 
    
         
             
                    end
         
     | 
| 
       44 
46 
     | 
    
         | 
| 
         @@ -0,0 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Stove
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Plugin::Supermarket < Plugin::Base
         
     | 
| 
      
 3 
     | 
    
         
            +
                id 'supermarket'
         
     | 
| 
      
 4 
     | 
    
         
            +
                description 'Publish the release to the Chef Supermarket'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                validate(:username) do
         
     | 
| 
      
 7 
     | 
    
         
            +
                  Config.username
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                validate(:key) do
         
     | 
| 
      
 11 
     | 
    
         
            +
                  Config.key
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                run('Publishing the release to the Chef Supermarket') do
         
     | 
| 
      
 15 
     | 
    
         
            +
                  Supermarket.upload(cookbook, options[:extended_metadata])
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/stove/runner.rb
    CHANGED
    
    
| 
         @@ -1,12 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require 'chef-api'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Stove
         
     | 
| 
       4 
     | 
    
         
            -
              class  
     | 
| 
      
 4 
     | 
    
         
            +
              class Supermarket
         
     | 
| 
       5 
5 
     | 
    
         
             
                include Mixin::Instanceable
         
     | 
| 
       6 
6 
     | 
    
         
             
                include Mixin::Optionable
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                #
         
     | 
| 
       9 
     | 
    
         
            -
                # The default endpoint where the  
     | 
| 
      
 9 
     | 
    
         
            +
                # The default endpoint where the Supermarket lives.
         
     | 
| 
       10 
10 
     | 
    
         
             
                #
         
     | 
| 
       11 
11 
     | 
    
         
             
                # @return [String]
         
     | 
| 
       12 
12 
     | 
    
         
             
                #
         
     | 
| 
         @@ -17,19 +17,19 @@ module Stove 
     | 
|
| 
       17 
17 
     | 
    
         
             
                # and version.
         
     | 
| 
       18 
18 
     | 
    
         
             
                #
         
     | 
| 
       19 
19 
     | 
    
         
             
                # @example Find a cookbook by name
         
     | 
| 
       20 
     | 
    
         
            -
                #    
     | 
| 
      
 20 
     | 
    
         
            +
                #   Supermarket.cookbook('apache2') #=> {...}
         
     | 
| 
       21 
21 
     | 
    
         
             
                #
         
     | 
| 
       22 
22 
     | 
    
         
             
                # @example Find a cookbook by name and version
         
     | 
| 
       23 
     | 
    
         
            -
                #    
     | 
| 
      
 23 
     | 
    
         
            +
                #   Supermarket.cookbook('apache2', '1.0.0') #=> {...}
         
     | 
| 
       24 
24 
     | 
    
         
             
                #
         
     | 
| 
       25 
25 
     | 
    
         
             
                # @example Find a non-existent cookbook
         
     | 
| 
       26 
     | 
    
         
            -
                #    
     | 
| 
      
 26 
     | 
    
         
            +
                #   Supermarket.cookbook('not-real') #=> Community::BadResponse
         
     | 
| 
       27 
27 
     | 
    
         
             
                #
         
     | 
| 
       28 
     | 
    
         
            -
                # @raise [ 
     | 
| 
       29 
     | 
    
         
            -
                #   if the given cookbook (or cookbook version) does not exist on the  
     | 
| 
      
 28 
     | 
    
         
            +
                # @raise [Supermarket::BadResponse]
         
     | 
| 
      
 29 
     | 
    
         
            +
                #   if the given cookbook (or cookbook version) does not exist on the Supermarket
         
     | 
| 
       30 
30 
     | 
    
         
             
                #
         
     | 
| 
       31 
31 
     | 
    
         
             
                # @param [String] name
         
     | 
| 
       32 
     | 
    
         
            -
                #   the name of the cookbook on the  
     | 
| 
      
 32 
     | 
    
         
            +
                #   the name of the cookbook on the Supermarket
         
     | 
| 
       33 
33 
     | 
    
         
             
                # @param [String] version (optional)
         
     | 
| 
       34 
34 
     | 
    
         
             
                #   the version of the cookbook to find
         
     | 
| 
       35 
35 
     | 
    
         
             
                #
         
     | 
| 
         @@ -63,7 +63,7 @@ module Stove 
     | 
|
| 
       63 
63 
     | 
    
         
             
                end
         
     | 
| 
       64 
64 
     | 
    
         | 
| 
       65 
65 
     | 
    
         
             
                #
         
     | 
| 
       66 
     | 
    
         
            -
                # Delete the given cookbook from the  
     | 
| 
      
 66 
     | 
    
         
            +
                # Delete the given cookbook from the supermarket.
         
     | 
| 
       67 
67 
     | 
    
         
             
                #
         
     | 
| 
       68 
68 
     | 
    
         
             
                # @param [String] name
         
     | 
| 
       69 
69 
     | 
    
         
             
                #   the name of the cookbook to delete
         
     | 
    
        data/lib/stove/version.rb
    CHANGED
    
    
    
        data/spec/unit/error_spec.rb
    CHANGED
    
    | 
         @@ -49,12 +49,12 @@ module Stove::Error 
     | 
|
| 
       49 
49 
     | 
    
         
             
                end
         
     | 
| 
       50 
50 
     | 
    
         
             
              end
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
              describe  
     | 
| 
      
 52 
     | 
    
         
            +
              describe SupermarketKeyValidationFailed do
         
     | 
| 
       53 
53 
     | 
    
         
             
                it 'raises an exception with the correct message' do
         
     | 
| 
       54 
54 
     | 
    
         
             
                  expect { raise described_class }.to raise_error { |error|
         
     | 
| 
       55 
55 
     | 
    
         
             
                    expect(error).to be_a(described_class)
         
     | 
| 
       56 
56 
     | 
    
         
             
                    expect(error.message).to eq <<-EOH.gsub(/^ {10}/, '')
         
     | 
| 
       57 
     | 
    
         
            -
                      You did not specify the path to a private key! The Chef  
     | 
| 
      
 57 
     | 
    
         
            +
                      You did not specify the path to a private key! The Chef Supermarket requires a private key for authentication:
         
     | 
| 
       58 
58 
     | 
    
         | 
| 
       59 
59 
     | 
    
         
             
                          stove --key ~/.chef/sethvargo.pem
         
     | 
| 
       60 
60 
     | 
    
         
             
                    EOH
         
     | 
| 
         @@ -62,12 +62,12 @@ module Stove::Error 
     | 
|
| 
       62 
62 
     | 
    
         
             
                end
         
     | 
| 
       63 
63 
     | 
    
         
             
              end
         
     | 
| 
       64 
64 
     | 
    
         | 
| 
       65 
     | 
    
         
            -
              describe  
     | 
| 
      
 65 
     | 
    
         
            +
              describe SupermarketUsernameValidationFailed do
         
     | 
| 
       66 
66 
     | 
    
         
             
                it 'raises an exception with the correct message' do
         
     | 
| 
       67 
67 
     | 
    
         
             
                  expect { raise described_class }.to raise_error { |error|
         
     | 
| 
       68 
68 
     | 
    
         
             
                    expect(error).to be_a(described_class)
         
     | 
| 
       69 
69 
     | 
    
         
             
                    expect(error.message).to eq <<-EOH.gsub(/^ {10}/, '')
         
     | 
| 
       70 
     | 
    
         
            -
                      You did not specify the username to authenticate with! The Chef  
     | 
| 
      
 70 
     | 
    
         
            +
                      You did not specify the username to authenticate with! The Chef Supermarket requires a username for authentication:
         
     | 
| 
       71 
71 
     | 
    
         | 
| 
       72 
72 
     | 
    
         
             
                          stove --username sethvargo
         
     | 
| 
       73 
73 
     | 
    
         
             
                    EOH
         
     | 
| 
         
            File without changes
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: stove
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 6.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Seth Vargo
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-09-13 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: chef-api
         
     | 
| 
         @@ -140,7 +140,6 @@ description: A utility for releasing Chef community cookbooks 
     | 
|
| 
       140 
140 
     | 
    
         
             
            email:
         
     | 
| 
       141 
141 
     | 
    
         
             
            - sethvargo@gmail.com
         
     | 
| 
       142 
142 
     | 
    
         
             
            executables:
         
     | 
| 
       143 
     | 
    
         
            -
            - bake
         
     | 
| 
       144 
143 
     | 
    
         
             
            - stove
         
     | 
| 
       145 
144 
     | 
    
         
             
            extensions: []
         
     | 
| 
       146 
145 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
         @@ -152,7 +151,6 @@ files: 
     | 
|
| 
       152 
151 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       153 
152 
     | 
    
         
             
            - README.md
         
     | 
| 
       154 
153 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       155 
     | 
    
         
            -
            - bin/bake
         
     | 
| 
       156 
154 
     | 
    
         
             
            - bin/stove
         
     | 
| 
       157 
155 
     | 
    
         
             
            - features/plugins/community.feature
         
     | 
| 
       158 
156 
     | 
    
         
             
            - features/plugins/git.feature
         
     | 
| 
         @@ -167,7 +165,6 @@ files: 
     | 
|
| 
       167 
165 
     | 
    
         
             
            - lib/stove.rb
         
     | 
| 
       168 
166 
     | 
    
         
             
            - lib/stove/artifactory.rb
         
     | 
| 
       169 
167 
     | 
    
         
             
            - lib/stove/cli.rb
         
     | 
| 
       170 
     | 
    
         
            -
            - lib/stove/community.rb
         
     | 
| 
       171 
168 
     | 
    
         
             
            - lib/stove/config.rb
         
     | 
| 
       172 
169 
     | 
    
         
             
            - lib/stove/cookbook.rb
         
     | 
| 
       173 
170 
     | 
    
         
             
            - lib/stove/cookbook/metadata.rb
         
     | 
| 
         @@ -181,10 +178,11 @@ files: 
     | 
|
| 
       181 
178 
     | 
    
         
             
            - lib/stove/packager.rb
         
     | 
| 
       182 
179 
     | 
    
         
             
            - lib/stove/plugins/artifactory.rb
         
     | 
| 
       183 
180 
     | 
    
         
             
            - lib/stove/plugins/base.rb
         
     | 
| 
       184 
     | 
    
         
            -
            - lib/stove/plugins/community.rb
         
     | 
| 
       185 
181 
     | 
    
         
             
            - lib/stove/plugins/git.rb
         
     | 
| 
      
 182 
     | 
    
         
            +
            - lib/stove/plugins/supermarket.rb
         
     | 
| 
       186 
183 
     | 
    
         
             
            - lib/stove/rake_task.rb
         
     | 
| 
       187 
184 
     | 
    
         
             
            - lib/stove/runner.rb
         
     | 
| 
      
 185 
     | 
    
         
            +
            - lib/stove/supermarket.rb
         
     | 
| 
       188 
186 
     | 
    
         
             
            - lib/stove/util.rb
         
     | 
| 
       189 
187 
     | 
    
         
             
            - lib/stove/validator.rb
         
     | 
| 
       190 
188 
     | 
    
         
             
            - lib/stove/version.rb
         
     | 
| 
         @@ -201,16 +199,17 @@ files: 
     | 
|
| 
       201 
199 
     | 
    
         
             
            - stove.gemspec
         
     | 
| 
       202 
200 
     | 
    
         
             
            - templates/errors/abstract_method.erb
         
     | 
| 
       203 
201 
     | 
    
         
             
            - templates/errors/artifactory_key_validation_failed.erb
         
     | 
| 
       204 
     | 
    
         
            -
            - templates/errors/community_key_validation_failed.erb
         
     | 
| 
       205 
     | 
    
         
            -
            - templates/errors/community_username_validation_failed.erb
         
     | 
| 
       206 
     | 
    
         
            -
            - templates/errors/cookbook_already_exists.erb
         
     | 
| 
       207 
202 
     | 
    
         
             
            - templates/errors/git_clean_validation_failed.erb
         
     | 
| 
       208 
203 
     | 
    
         
             
            - templates/errors/git_failed.erb
         
     | 
| 
       209 
204 
     | 
    
         
             
            - templates/errors/git_repository_validation_failed.erb
         
     | 
| 
      
 205 
     | 
    
         
            +
            - templates/errors/git_tagging_failed.erb
         
     | 
| 
       210 
206 
     | 
    
         
             
            - templates/errors/git_up_to_date_validation_failed.erb
         
     | 
| 
       211 
207 
     | 
    
         
             
            - templates/errors/metadata_not_found.erb
         
     | 
| 
       212 
208 
     | 
    
         
             
            - templates/errors/server_unavailable.erb
         
     | 
| 
       213 
209 
     | 
    
         
             
            - templates/errors/stove_error.erb
         
     | 
| 
      
 210 
     | 
    
         
            +
            - templates/errors/supermarket_already_exists.erb
         
     | 
| 
      
 211 
     | 
    
         
            +
            - templates/errors/supermarket_key_validation_failed.erb
         
     | 
| 
      
 212 
     | 
    
         
            +
            - templates/errors/supermarket_username_validation_failed.erb
         
     | 
| 
       214 
213 
     | 
    
         
             
            homepage: https://github.com/sethvargo/stove
         
     | 
| 
       215 
214 
     | 
    
         
             
            licenses:
         
     | 
| 
       216 
215 
     | 
    
         
             
            - Apache 2.0
         
     | 
| 
         @@ -231,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       231 
230 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       232 
231 
     | 
    
         
             
            requirements: []
         
     | 
| 
       233 
232 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       234 
     | 
    
         
            -
            rubygems_version: 2.6. 
     | 
| 
      
 233 
     | 
    
         
            +
            rubygems_version: 2.6.13
         
     | 
| 
       235 
234 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       236 
235 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       237 
236 
     | 
    
         
             
            summary: A command-line utility for releasing Chef community cookbooks
         
     | 
    
        data/bin/bake
    DELETED
    
    
| 
         @@ -1,18 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module Stove
         
     | 
| 
       2 
     | 
    
         
            -
              class Plugin::Community < Plugin::Base
         
     | 
| 
       3 
     | 
    
         
            -
                id 'community'
         
     | 
| 
       4 
     | 
    
         
            -
                description 'Publish the release to the Chef community site'
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
                validate(:username) do
         
     | 
| 
       7 
     | 
    
         
            -
                  Config.username
         
     | 
| 
       8 
     | 
    
         
            -
                end
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
                validate(:key) do
         
     | 
| 
       11 
     | 
    
         
            -
                  Config.key
         
     | 
| 
       12 
     | 
    
         
            -
                end
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                run('Publishing the release to the Chef community site') do
         
     | 
| 
       15 
     | 
    
         
            -
                  Community.upload(cookbook, options[:extended_metadata])
         
     | 
| 
       16 
     | 
    
         
            -
                end
         
     | 
| 
       17 
     | 
    
         
            -
              end
         
     | 
| 
       18 
     | 
    
         
            -
            end
         
     |