diff --git a/features/plugins/community.feature b/features/plugins/community.feature index 466d63c..91d2d32 100644 --- a/features/plugins/community.feature +++ b/features/plugins/community.feature @@ -18,24 +18,3 @@ Feature: Supermarket * I successfully run `stove --no-git` * the supermarket will have the cookbooks: | bacon | 0.0.0 | - - Scenario: Yanking a cookbook - * the supermarket has the cookbooks: - | bacon | 1.2.3 | - * I successfully run `stove yank -l debug` - * the supermarket will not have the cookbooks: - | bacon | 1.2.3 | - * the output should contain "Successfully yanked bacon!" - - Scenario: Yanking a cookbook by name - * the supermarket has the cookbooks: - | eggs | 4.5.6 | - * I successfully run `stove yank eggs` - * the supermarket will not have the cookbooks: - | eggs | 4.5.6 | - * the output should not contain "Successfully yanked bacon!" - * the output should contain "Successfully yanked eggs!" - - Scenario: Yanking a non-existent cookbook - * I run `stove yank ham` - * it should fail with "I could not find a cookbook named ham" diff --git a/lib/stove/cli.rb b/lib/stove/cli.rb index 420a298..09172d0 100644 --- a/lib/stove/cli.rb +++ b/lib/stove/cli.rb @@ -51,21 +51,6 @@ def execute! log.info("Options: #{options.inspect}") log.info("ARGV: #{@argv.inspect}") - # Yank command - if @argv.first == 'yank' - name = @argv[1] || Cookbook.new(options[:path]).name - - if Supermarket.yank(name) - @stdout.puts "Successfully yanked #{name}!" - @kernel.exit(0) - else - @stderr.puts "I could not find a cookbook named #{name}!" - @kernel.exit(1) - end - - return - end - # Make a new cookbook object - this will raise an exception if there is # no cookbook at the given path cookbook = Cookbook.new(options[:path]) diff --git a/lib/stove/supermarket.rb b/lib/stove/supermarket.rb index 69c814c..61864b1 100644 --- a/lib/stove/supermarket.rb +++ b/lib/stove/supermarket.rb @@ -62,23 +62,6 @@ def upload(cookbook, extended_metadata = false) }) end - # - # Delete the given cookbook from the supermarket. - # - # @param [String] name - # the name of the cookbook to delete - # - # @return [true, false] - # true if the cookbook was deleted, false otherwise - # - def yank(name) - connection.delete("/cookbooks/#{name}") - true - rescue ChefAPI::Error::HTTPBadRequest, - ChefAPI::Error::HTTPNotFound, - false - end - private #