Class: RightConf::BundlerConfigurator

Inherits:
Object
  • Object
show all
Includes:
Configurator
Defined in:
lib/rconf/configurators/bundler_configurator.rb

Constant Summary collapse

DEFAULT_GEM_PATH =
'vendor/system_gems/cache'

Instance Method Summary collapse

Methods included from Configurator

#[], included, #run, #validate

Methods included from ProgressReporter

included, report_to_file, report_to_stdout

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RightConf::Configurator

Instance Method Details

#run_linuxObject Also known as: run_darwin

Install bundler if needed and run bundle install

Return

true

Always return true



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rconf/configurators/bundler_configurator.rb', line 33

def run_linux
  report_check("Checking for bundler #{bundler_version}")
  res = Command.execute('bundle', '--version')
  success = (res.output =~ /#{bundler_version}/)
  report_result(success)
  install_bundler(res.success?) unless success
  report_check('Installing gems')
  res = Command.execute('bundle', 'install', :abort_on_failure => 'Failed to install gems')
  report_success
  true
end

#run_windowsObject

Not implemented on windows (no bundler gem there)

Raise

(Exception)

Always raise



50
51
52
# File 'lib/rconf/configurators/bundler_configurator.rb', line 50

def run_windows
  raise "Bundler is not supported on Windows!"
end