lib/rconf/configurators/bundler_configurator.rb in rconf-1.0.5 vs lib/rconf/configurators/bundler_configurator.rb in rconf-1.0.6

- old
+ new

@@ -81,25 +81,18 @@ # true:: Always return true # # === Raise # (Exception):: If bundler gem cannot be found or installed def install_bundler - res = Command.execute('bundle', '--version') - exists = res.success? && res.output !~ /exec: bundle: not found/ - if exists && res.output !~ /#{version}/ - report_check('Uninstalling existing versions of bundler') - Command.execute('gem', 'uninstall', 'bundler', '-a', '-x') - report_success - end report_check("Installing bundler #{version}") if gem_path - bundler_file = [ File.join(gem_path, "bundler-#{version}.gem") ] - report_fatal("Missing bundler gem at #{bundler_file}") unless File.exist?(bundler_file) + version_or_file = [ File.join(gem_path, "bundler-#{version}.gem") ] + report_fatal("Missing bundler gem at #{version_or_file}") unless File.exist?(version_or_file) else - bundler_file = [ 'bundler', '-v', version ] + version_or_file = [ 'bundler', '-v', version ] end options = [ 'gem','install' ] - options += bundler_file + options += version_or_file options += [ '--no-ri', '--no-rdoc', { :abort_on_failure => 'Failed to install bundler' } ] res = Command.execute(*options) report_success true end