Class: Vito::Recipes::Ruby
- Inherits:
-
Vito::Recipe
- Object
- Vito::Recipe
- Vito::Recipes::Ruby
- Defined in:
- lib/vito/recipes/ruby.rb
Instance Method Summary collapse
Methods inherited from Vito::Recipe
#depends_on_recipe, #initialize, #program_version, #query, #run_command
Constructor Details
This class inherits a constructor from Vito::Recipe
Instance Method Details
#install_ruby ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/vito/recipes/ruby.rb', line 15 def install_ruby string = [] string << "rbenv install #{version}" string << "rbenv global #{version}" string << "rbenv rehash" string << "gem install bundler" run_command string.join(" && ") end |
#run ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/vito/recipes/ruby.rb', line 4 def run if ruby_exists? Vito::Log.write "Ruby version #{version} is already installed." else Vito::Log.write "Installing Ruby" install_os_dependencies depends_on_recipe(:rbenv) install_ruby end end |