rconf 0.9.9 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.
data/bin/rconf CHANGED
@@ -139,8 +139,7 @@ where [options] are:
139
139
  rubies.each do |ruby|
140
140
  ruby =~ /(\s+| =>)([^ ]*)\s.*/
141
141
  ruby = Regexp.last_match(2)
142
- gemsets = Command.execute('rvm', ruby, 'exec', 'rvm', 'gemset', 'list',
143
- :env => { 'rvm_is_not_a_shell_function' => '0' }).output.split("\n")
142
+ gemsets = Command.execute('rvm', ruby, 'exec', 'rvm', 'gemset', 'list').output.split("\n")
144
143
  i = gemsets.index { |gs| gs =~ /^gemsets for #{ruby} / }
145
144
  if i
146
145
  gemsets = gemsets[i + 1..-1]
@@ -164,16 +163,14 @@ where [options] are:
164
163
  def update_rconf(version)
165
164
  run_in_all_gemsets do |ruby, gs|
166
165
  report_check("Checking rconf for #{ruby}@#{gs}")
167
- rconf = Command.execute('rvm', "#{ruby}@#{gs}", 'gem', 'list', 'rconf',
168
- :env => { 'rvm_is_not_a_shell_function' => '0' }).output
166
+ rconf = Command.execute('rvm', "#{ruby}@#{gs}", 'gem', 'list', 'rconf').output
169
167
  if rconf =~ /rconf \(#{version}/
170
168
  report_success
171
169
  elsif rconf =~ /^rconf /
172
170
  report_failure
173
171
  report_check("Updating rconf for #{ruby}@#{gs}")
174
172
  res = Command.execute('rvm', "#{ruby}@#{gs}", 'gem', 'install',
175
- 'rconf', '-v', version, '--no-ri', '--no-rdoc',
176
- :env => { 'rvm_is_not_a_shell_function' => '0' })
173
+ 'rconf', '-v', version, '--no-ri', '--no-rdoc')
177
174
  report_result(res.success?)
178
175
  else
179
176
  report('SKIPPED (no rconf)')
@@ -188,12 +185,10 @@ where [options] are:
188
185
  def remove
189
186
  ProgressReporter.report_to_stdout
190
187
  run_in_all_gemsets do |ruby, gs|
191
- rconf = Command.execute('rvm', "#{ruby}@#{gs}", 'gem', 'list', 'rconf',
192
- :env => { 'rvm_is_not_a_shell_function' => '0' }).output
188
+ rconf = Command.execute('rvm', "#{ruby}@#{gs}", 'gem', 'list', 'rconf').output
193
189
  if rconf =~ /^rconf /
194
190
  report_check("Removing rconf from #{ruby}@#{gs}")
195
- res = Command.execute('rvm', "#{ruby}@#{gs}", 'gem', 'uninstall', '-a', '-x', 'rconf',
196
- :env => { 'rvm_is_not_a_shell_function' => '0' })
191
+ res = Command.execute('rvm', "#{ruby}@#{gs}", 'gem', 'uninstall', '-a', '-x', 'rconf')
197
192
  report_result(res.success?)
198
193
  end
199
194
  end
data/lib/rconf/command.rb CHANGED
@@ -35,6 +35,8 @@ module RightConf
35
35
  # === Return
36
36
  # result(CommandResult):: Result of execution (output and exit status)
37
37
  def execute(command, *args)
38
+ ENV['rvm_is_not_a_shell_function'] = '0'
39
+ ENV['rvm_ignore_rvmrc'] = '1'
38
40
  opts = {}
39
41
  if !args.empty? && args[-1].is_a?(Hash)
40
42
  opts = args[-1]
@@ -76,6 +78,7 @@ module RightConf
76
78
  end
77
79
  args = commands + args
78
80
  ENV['rvm_is_not_a_shell_function'] = '0'
81
+ ENV['rvm_ignore_rvmrc'] = '1'
79
82
  execute('rvm', *args)
80
83
  end
81
84
 
@@ -59,7 +59,7 @@ module RightConf
59
59
  else
60
60
  report_failure
61
61
  report_check("Switching to #{version}")
62
- out = Command.execute('rvm', 'use', version, :env => { 'rvm_is_not_a_shell_function' => '0' }).output
62
+ out = Command.execute('rvm', 'use', version).output
63
63
  case out
64
64
  when /is not installed\./
65
65
  report_failure
@@ -87,6 +87,10 @@ module RightConf
87
87
  Command.execute('rvm', version, 'exec', 'rvm', 'gemset', 'create', gemset,
88
88
  :abort_on_failure => "Failed to create gemset '#{gemset}'")
89
89
  end
90
+ report_check("Switching to gemset #{gemset}")
91
+ Command.execute('rvm', version, 'exec', 'rvm', 'gemset', 'use', gemset,
92
+ :abort_on_failure => "Failed to switch to gemset '#{gemset}'")
93
+ report_success
90
94
  report_check("Checking whether rconf is installed")
91
95
  res = Command.execute('rconf', '--version')
92
96
  if res.output =~ /VERSION/
@@ -97,11 +101,6 @@ module RightConf
97
101
  Command.execute_in_ruby('gem', 'install', 'rconf', :abort_on_failure => "Failed to install rconf")
98
102
  report_success
99
103
  end
100
- report_check("Switching to gemset #{gemset}")
101
- Command.execute('rvm', version, 'exec', 'rvm', 'gemset', 'use', gemset,
102
- :abort_on_failure => "Failed to switch to gemset '#{gemset}'",
103
- :env => { 'rvm_is_not_a_shell_function' => '0' })
104
- report_success
105
104
  end
106
105
  if rubygems
107
106
  report_check("Checking whether rubygems #{rubygems} is installed")
data/lib/rconf/version.rb CHANGED
@@ -13,7 +13,7 @@ module RightConf
13
13
 
14
14
  MAJOR = 0
15
15
  MINOR = 9
16
- BUILD = 9
16
+ BUILD = 10
17
17
 
18
18
  VERSION = [MAJOR, MINOR, BUILD].map(&:to_s).join('.')
19
19
 
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 9
8
+ - 10
9
9
  segments_generated: true
10
- version: 0.9.9
10
+ version: 0.9.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Raphael Simon