Module: Busser::Helpers

Included in:
Thor::Base, Thor::BaseGroup
Defined in:
lib/busser/helpers.rb

Overview

Common methods used by subcommands.

Author:

Class Method Summary collapse

Class Method Details

.chef_apply(config = {}, &block) ⇒ Object



49
50
51
52
53
54
# File 'lib/busser/helpers.rb', line 49

def chef_apply(config = {}, &block)
  warn "Apologies, but Busser no longer supports the chef_apply helper," +
    " so the contents of this block will not be exectued. Please refactor" +
    " your code to use Thor actions, shell out commands or another" +
    " strategy"
end

.install_gem(gem, version = nil) ⇒ Object



56
57
58
# File 'lib/busser/helpers.rb', line 56

def install_gem(gem, version = nil)
  Busser::RubyGems.install_gem(gem, version)
end

.root_pathObject



45
46
47
# File 'lib/busser/helpers.rb', line 45

def root_path
  Pathname.new(ENV['BUSSER_ROOT'] || "/opt/busser")
end

.suite_path(name = nil) ⇒ Object



33
34
35
36
37
# File 'lib/busser/helpers.rb', line 33

def suite_path(name = nil)
  path = root_path + "suites"
  path += name if name
  path
end

.vendor_path(product = nil) ⇒ Object



39
40
41
42
43
# File 'lib/busser/helpers.rb', line 39

def vendor_path(product = nil)
  path = root_path + "vendor"
  path += product if product
  path
end