bin/rconf in rconf-0.6.22 vs bin/rconf in rconf-0.6.23

- old
+ new

@@ -53,10 +53,11 @@ FileUtils.mkdir_p(File.dirname(opts[:output])) rescue Exception => e Trollop::die :output, "Failed to initialize output file: #{e.message}" end end + Command.set_verbose if opts[:verbose] if opts[:configurators] new.list_configurators elsif opts[:update] new.update else @@ -117,21 +118,23 @@ # true:: Always return true def update_rconf(rubies, version) rubies.each do |ruby| ruby =~ /(\s+| =>)([^ ]*)\s.*/ ruby = Regexp.last_match(2) - report_check("Checking rconf for #{ruby}") - gemsets = Command.execute('rvm', 'gemset', 'list').output.split("\n")[2..-2] + [ 'global' ] - gemsets.each do |gemset| - rconf = Command.execute('rvm', "#{ruby}@#{gemset}", 'exec', 'gem', 'list', 'rconf').output - if rconf =~ /rconf \(#{version}\)/ + gemsets = Command.execute('rvm', ruby, 'gemset', 'list').output.split("\n") + i = gemsets.index { |gs| gs =~ /^gemsets for #{ruby} / } + gemsets = gemsets[i + 1..-1] + gemsets.each do |gs| + report_check("Checking rconf for #{ruby}@#{gs}") + rconf = Command.execute('rvm', "#{ruby}@#{gs}", 'exec', 'gem', 'list', 'rconf').output + if rconf =~ /rconf \(#{version}/ report_success next else report_failure - report_check("Updating rconf for #{ruby}@#{gemset}") - res = Command.execute('rvm', "#{ruby}@#{gemset}", 'exec', 'gem', 'install', 'rconf') + report_check("Updating rconf for #{ruby}@#{gs}") + res = Command.execute('rvm', "#{ruby}@#{gs}", 'exec', 'gem', 'install', 'rconf') report_result(res.success?) end end end end @@ -147,10 +150,9 @@ # true:: Always return true def configure(options) Profile.reset if options[:force] ProgressReporter.report_to_stdout ProgressReporter.report_to_file(options[:output]) if options[:output] - Command.set_verbose if options[:verbose] begin lang = Language.load(options[:config]) report_fatal("Validation of configuration file failed:\n -#{lang.validation_errors.join("\n -").map(&:red)}") unless lang.validation_errors.empty? aborted = false Dir.chdir(File.dirname(options[:config])) do