lib/rconf/configurators/bundler_configurator.rb in rconf-1.0.4 vs lib/rconf/configurators/bundler_configurator.rb in rconf-1.0.5
- old
+ new
@@ -31,11 +31,11 @@
# === Return
# true:: If bundler is already installed
# false:: Otherwise
def check_linux
report_check("Checking for bundler #{version}")
- res = Command.execute_in_ruby('bundle', '--version')
+ res = Command.execute('bundle', '--version')
success = (res.output =~ /#{version}/)
report_result(success)
success
end
alias :check_darwin :check_linux
@@ -57,11 +57,11 @@
report_check('Installing gems')
options = [ "_#{version}_", 'install' ]
options << "--without=#{exclusions.delete(' ')}" 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)
+ res = Command.execute('bundle', *options)
report_success
true
end
alias :run_darwin :run_linux
@@ -81,15 +81,15 @@
# true:: Always return true
#
# === Raise
# (Exception):: If bundler gem cannot be found or installed
def install_bundler
- res = Command.execute_in_ruby('bundle', '--version')
+ 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_in_ruby('gem', 'uninstall', 'bundler', '-a', '-x')
+ 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") ]
@@ -98,10 +98,10 @@
bundler_file = [ 'bundler', '-v', version ]
end
options = [ 'gem','install' ]
options += bundler_file
options += [ '--no-ri', '--no-rdoc', { :abort_on_failure => 'Failed to install bundler' } ]
- res = Command.execute_in_ruby(*options)
+ res = Command.execute(*options)
report_success
true
end
end