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, #post_process, #run, #signature, #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



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rconf/configurators/bundler_configurator.rb', line 35

def run_linux
  report_check("Checking for bundler #{version}")
  res = Command.execute_in_ruby('bundle', '--version')
  success = (res.output =~ /#{version}/)
  report_result(success)
  install_bundler unless success
  report_check('Installing gems')
  options = [ "_#{version}_", 'install' ]
  options << "--without=#{exclusions}" unless exclusions.nil?
  options << "--path #{bundle_path}" unless bundle_path.nil?
  options << { :abort_on_failure => 'Failed to install gems' }
  res = Command.execute_in_ruby('bundle', *options)
  report_success
  true
end

#run_windowsObject

Not implemented on windows

Raise

(Exception)

Always raise



56
57
58
# File 'lib/rconf/configurators/bundler_configurator.rb', line 56

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