Class: RocketFuel::Install::RecipeRun
- Inherits:
-
Object
- Object
- RocketFuel::Install::RecipeRun
- Defined in:
- lib/rocket_fuel/install/recipe_run.rb
Instance Method Summary collapse
- #cookbook_name ⇒ Object
-
#initialize(options = {}) ⇒ RecipeRun
constructor
A new instance of RecipeRun.
- #recipe_name ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ RecipeRun
Returns a new instance of RecipeRun.
4 5 6 |
# File 'lib/rocket_fuel/install/recipe_run.rb', line 4 def initialize( = {}) @options = end |
Instance Method Details
#cookbook_name ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rocket_fuel/install/recipe_run.rb', line 15 def cookbook_name if @options[:vagrant] || !RocketFuel::SystemDetails.platform_family?(:mac) 'linux' else 'osx' end end |
#recipe_name ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/rocket_fuel/install/recipe_run.rb', line 23 def recipe_name if @options[:vagrant] 'vagrant' else 'default' end end |
#run ⇒ Object
8 9 10 11 12 13 |
# File 'lib/rocket_fuel/install/recipe_run.rb', line 8 def run chdir_cmd = "cd #{RocketFuel::Install::RECIPE_PATH}" system("#{chdir_cmd} && sudo chef-solo " + "-c cookbooks/fueled-#{cookbook_name}-station/config.rb " + "-j cookbooks/fueled-#{cookbook_name}-station/roles/#{recipe_name}.json") end |