lib/rconf/configurators/bundler_configurator.rb in rconf-0.6.25 vs lib/rconf/configurators/bundler_configurator.rb in rconf-0.6.30
- old
+ new
@@ -32,20 +32,20 @@
#
# === Return
# true:: Always return true
def run_linux
report_check("Checking for bundler #{version}")
- res = Command.execute('bundle', '--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('bundle', *options)
+ res = Command.execute_in_ruby('bundle', *options)
report_success
true
end
alias :run_darwin :run_linux
@@ -65,15 +65,15 @@
# true:: Always return true
#
# === Raise
# (Exception):: If bundler gem cannot be found or installed
def install_bundler
- res = Command.execute('bundle', '--version')
+ res = Command.execute_in_ruby('bundle', '--version')
exists = res.success? && res.output !~ /exec: bundle: not found/
if exists
report_check('Uninstalling existing versions of bundler')
- Command.execute('gem', 'uninstall', 'bundler', '-a', '-x')
+ Command.execute_in_ruby('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") ]
@@ -82,10 +82,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(*options)
+ res = Command.execute_in_ruby(*options)
report_success
true
end
end