module Busser::Helpers

Common methods used by subcommands.

@author Fletcher Nichol <fnichol@nichol.ca>

Public Instance Methods

chef_apply(config = {}, &block) click to toggle source
# File lib/busser/helpers.rb, line 48
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) click to toggle source
# File lib/busser/helpers.rb, line 55
def install_gem(gem, version = nil)
  Busser::RubyGems.install_gem(gem, version)
end
root_path() click to toggle source
# File lib/busser/helpers.rb, line 44
def root_path
  Pathname.new(ENV['BUSSER_ROOT'] || "/opt/busser")
end
suite_path(name = nil) click to toggle source
# File lib/busser/helpers.rb, line 32
def suite_path(name = nil)
  path = root_path + "suites"
  path += name if name
  path.expand_path
end
vendor_path(product = nil) click to toggle source
# File lib/busser/helpers.rb, line 38
def vendor_path(product = nil)
  path = root_path + "vendor"
  path += product if product
  path.expand_path
end