Class: Busser::Command::SuiteCleanup

Inherits:
Thor::BaseGroup show all
Defined in:
lib/busser/command/suite_cleanup.rb

Overview

Suite cleanup command.

Author:

Instance Method Summary collapse

Methods included from UI

banner, die, info, run!, run_ruby_script!, status, warn

Methods included from Helpers

chef_apply, install_gem, root_path, suite_path, vendor_path

Instance Method Details

#cleanupObject



31
32
33
34
35
36
37
38
39
40
# File 'lib/busser/command/suite_cleanup.rb', line 31

def cleanup
  if suite_path.directory?
    Pathname.glob(suite_path + "*").each do |dir|
      info "Removing #{dir}"
      dir.rmtree
    end
  else
    info "Suite path directory #{suite_path} does not exist, skipping."
  end
end