Class | Ramaze::GemSetup
In: | lib/ramaze/setup.rb
Parent: | Object

Class responsible for installing and loading all the gems.

@author Michael Fellinger (manveru) @since 19-05-2009

### Methods

gem install_gem new run setup setup_gem temp_argv

### Public Class methods

new(options = {}, &block)

Creates a new instance of the class and saves the parameters that were set.

@author Michael Fellinger (manveru) @since 19-05-2009 @param [Hash] options Hash containing various options to pass to the

     GemSetup class.

@option options :verbose When set to true Ramaze will log

     various actions such as messages about the installation process.

@yield block

### Public Instance methods

gem(name, version = nil, options = {})

Adds the given gem to the list of required gems.

@example

     gem('json', '>=1.5.1')

@author Michael Fellinger (manveru) @since 19-05-2009 @param [String] name The name of the gem to load. @param [String] version The version of the gem. @param [Hash] options Additional options to use when loading the gem. @option options :lib The name to load the gem as.

install_gem(name, options)

Tell Rubygems to install a gem.

@author Michael Fellinger (manveru) @since 19-05-2009 @param [String] name The name of the gem to activate. @param [Hash] options The options to use for installing the gem.

run(&block)

Executes the data inside the block, loading all the gems and optionally installing them.

@author Michael Fellinger (manveru) @since 19-05-2009 @param [Proc] block A block containing all the calls to gem().

setup()

Tries to install all the gems.

@author Michael Fellinger (manveru) @since 19-05-2009

setup_gem(name, options)

First try to activate, install and try to activate again if activation fails the first time.

@author Michael Fellinger (manveru) @since 19-05-2009 @param [String] name The name of the gem to activate. @param [Hash] options The options from GemSetup#initialize.

temp_argv(extconf) {|| ...}

Prepare ARGV for rubygems installer

@author Michael Fellinger (manveru) @since 19-05-2009 @param [String] extconf

[Validate]