lib/rconf/configurators/ruby_configurator.rb in rconf-0.6.30 vs lib/rconf/configurators/ruby_configurator.rb in rconf-0.6.31

- old
+ new

@@ -12,11 +12,11 @@ module RightConf class RubyConfigurator # RVM version used to install rubies - RVM_VERSION = '1.2.6' + RVM_VERSION = '1.2.9' include Configurator register :ruby @@ -55,23 +55,22 @@ run return true when /^Using / report_success check_rvmrc - aborting(true) else report_fatal("Failed to use #{version}:\n#{out}") end end if gemset report_check("Checking whether gemset #{gemset} exists") res = Command.execute('rvm', version, 'gemset', 'list') - if res.output =~ /^#{gemset}$/ + if res.output =~ /^(\s+|=> )#{gemset}$/ report_success else report_failure - report_check("Creating gemset #{gemset} for #{version}") + report_check("Creating gemset #{gemset} for #{version}") Command.execute('rvm', version, 'gemset', 'create', gemset, :abort_on_failure => "Failed to create gemset '#{gemset}'") Command.execute_in_ruby('gem', 'install', 'rconf') report_success end @@ -141,11 +140,10 @@ end Dir.chdir(File.join(rvm_src, "rvm-#{version}")) do Command.execute('./install', :abort_on_failure => "Failed to install rvm #{version}") end report_success - aborting(true) end setup_bashrc true end @@ -215,9 +213,10 @@ f.puts "type -P rconf &>/dev/null && { rconf; }" f.puts "type -P rconf &>/dev/null || { echo 'rconf not installed, skipping (see .rvmrc)'; }" end report_success post_note "Configuration required switching the active ruby\nPlease run " + 'cd ..;cd -'.blue + ' to activate it and finish configuration'.green + aborting(true) rescue Exception => e report_failure report_error(e.message) end true