Module: Capitate::Plugins::Gem

Defined in:
lib/capitate/plugins/gem.rb

Instance Method Summary collapse

Instance Method Details

#install(gems) ⇒ Object

Install a gem.

Options

gems

List of gem names, or a single gem

Examples (in capistrano task)

gems.install("raspell") 
gems.install([ "raspell", "foo" ])


12
13
14
15
16
17
18
19
20
# File 'lib/capitate/plugins/gem.rb', line 12

def install(gems)
  # If a single object, wrap in array
  gems = [ gems ] unless gems.is_a?(Array)
  
  # Install one at a time because we may need to pass install args (e.g. mysql)
  gems.each do |gem|
    run_via "gem install --no-rdoc --no-ri --no-verbose #{gem}"
  end
end