Module: Busser::Helpers
- Included in:
- Thor::Base, Thor::BaseGroup
- Defined in:
- lib/busser/helpers.rb
Overview
Common methods used by subcommands.
Class Method Summary collapse
- .chef_apply(config = {}, &block) ⇒ Object
- .install_gem(gem, version = nil) ⇒ Object
- .root_path ⇒ Object
- .suite_path(name = nil) ⇒ Object
- .vendor_path(product = nil) ⇒ Object
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_path ⇒ Object
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 |