Module: Busser::Helpers

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

Class Method Summary collapse

Class Method Details

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



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

def chef_apply(config = {}, &block)
  require 'busser/chef_apply'
  ChefApply.new(config, &block).converge
end

.install_gem(gem, version = nil) ⇒ Object



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

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

.root_pathObject



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

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

.suite_path(name = nil) ⇒ Object



29
30
31
32
33
# File 'lib/busser/helpers.rb', line 29

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

.vendor_path(product = nil) ⇒ Object



35
36
37
38
39
# File 'lib/busser/helpers.rb', line 35

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