Class: KnifeSpork::SporkDelete

Inherits:
Chef::Knife
  • Object
show all
Defined in:
lib/chef/knife/spork-delete.rb

Constant Summary collapse

ALL_NO_CONF =
'all_no_conf'.freeze
ALL_CONF =
'all_conf'.freeze
ONE_NO_CONF =
'one_no_conf'.freeze
ONE_CONF =
'one_conf'.freeze

Instance Method Summary collapse

Instance Method Details

#runObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/chef/knife/spork-delete.rb', line 35

def run
  self.class.send(:include, KnifeSpork::Runner)
  self.config = Chef::Config.merge!(config)
  config[:cookbook_path] ||= Chef::Config[:cookbook_path]

  if @name_args.empty?
    show_usage
    ui.error("You must specify the --all flag or at least one cookbook name")
    exit 1
  end

  delete
  @misc_output = @deleted_cookbook_string
  run_plugins(:after_delete)
end