lib/rconf/configurators/ruby_configurator.rb in rconf-0.9.12 vs lib/rconf/configurators/ruby_configurator.rb in rconf-0.9.17
- old
+ new
@@ -11,16 +11,10 @@
module RightConf
class RubyConfigurator
- # RVM version used to install rubies
- RVM_VERSION = '1.10.2'
-
- # RVM releases URL
- RVM_RELEASES_URL = 'https://rvm.beginrescueend.com/releases'
-
include Configurator
register :ruby
description "Installs ruby interpreter and rubygems.\n" +
@@ -30,10 +24,16 @@
:rubygems => 'Rubygems version, e.g. "1.3.7"',
:gemset => 'Gemset to be used for platforms supporting rvm'
validate_has_settings :version
+ # RVM version used to install rubies
+ RVM_VERSION = '1.10.2'
+
+ # RVM releases URL
+ RVM_RELEASES_URL = 'https://rvm.beginrescueend.com/releases'
+
# Let configurator run, it is idempotent
#
# === Return
# false:: Always return false
def check_linux
@@ -90,11 +90,11 @@
report_check("Switching to gemset #{gemset}")
Command.execute('rvm', version, 'exec', 'rvm', 'gemset', 'use', gemset,
:abort_on_failure => "Failed to switch to gemset '#{gemset}'")
report_success
report_check("Checking whether rconf is installed")
- res = Command.execute('rconf', '--version')
- if res.output =~ /VERSION/
+ res = Command.execute_in_ruby('rconf', '--version')
+ if res.output =~ /#{RightConf::VERSION}/
report_success
else
report_failure
report_check("Installing rconf")
Command.execute_in_ruby('gem', 'install', 'rconf', :abort_on_failure => "Failed to install rconf")