lib/rconf/configurators/bundler_configurator.rb in rconf-0.5.3 vs lib/rconf/configurators/bundler_configurator.rb in rconf-0.5.5
- old
+ new
@@ -19,23 +19,23 @@
register :bundler
description 'Installs bundler and runs "bundle install"'
- settings :bundler_version => 'Version of bundler gem, e.g. "1.0.10"',
- :bundler_gem_path => 'Path to bundler gem, e.g. "vendor/system_gems/cache"'
+ settings :version => 'Version of bundler gem, e.g. "1.0.10"',
+ :gem_path => 'Path to bundler gem, e.g. "vendor/system_gems/cache"'
- validate_has_settings :bundler_version
+ validate_has_settings :version
# Install bundler if needed and run bundle install
#
# === Return
# true:: Always return true
def run_linux
- report_check("Checking for bundler #{bundler_version}")
+ report_check("Checking for bundler #{version}")
res = Command.execute('bundle', '--version')
- success = (res.output =~ /#{bundler_version}/)
+ success = (res.output =~ /#{version}/)
report_result(success)
install_bundler unless success
report_check('Installing gems')
res = Command.execute('bundle', 'install', :abort_on_failure => 'Failed to install gems')
report_success
@@ -67,12 +67,12 @@
report_check('Uninstalling existing versions of bundler')
res = Command.execute('gem', 'uninstall', 'bundler', '-a', '-x',
:abort_on_failure => 'Failed to uninstall bundler')
report_success
end
- report_check("Installing bundler #{bundler_version}")
- bundler_gem_path DEFAULT_GEM_PATH unless bundler_gem_path
- bundler_file = File.join(bundler_gem_path, "bundler-#{bundler_version}.gem")
+ report_check("Installing bundler #{version}")
+ gem_path DEFAULT_GEM_PATH unless gem_path
+ bundler_file = File.join(gem_path, "bundler-#{version}.gem")
report_fatal("Missing bundler gem at #{bundler_file}") unless File.exist?(bundler_file)
res = Command.execute('gem','install', bundler_file, '--no-ri', '--no-rdoc',
:abort_on_failure => 'Failed to install bundler')
report_success
true