rubygems-test 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -133,7 +133,7 @@ class Gem::Commands::TestCommand < Gem::Command
133
133
 
134
134
  def upload_results(yaml)
135
135
  begin
136
- results_url = config["upload_service_url"] || 'http://gem-testers.org/test_results' # FIXME
136
+ results_url = config["upload_service_url"] || 'http://gem-testers.org/test_results'
137
137
  url = URI.parse(results_url)
138
138
  response = Net::HTTP.post_form url, {:results => yaml}
139
139
  rescue Errno::ECONNREFUSED => e
@@ -192,7 +192,7 @@ class Gem::Commands::TestCommand < Gem::Command
192
192
  exit_status = nil
193
193
 
194
194
  if spec.files.include?(".gemtest")
195
- Open3.popen3(rake_path, "test", '--trace') do |stdin, stdout, stderr, thr|
195
+ open_proc = proc do |stdin, stdout, stderr, thr|
196
196
  loop do
197
197
  if stdout.eof? and stderr.eof?
198
198
  break
@@ -213,7 +213,16 @@ class Gem::Commands::TestCommand < Gem::Command
213
213
  print buf
214
214
  end
215
215
 
216
- exit_status = thr.value
216
+ unless RUBY_VERSION =~ /^1.8/
217
+ exit_status = thr.value
218
+ end
219
+ end
220
+
221
+ if RUBY_VERSION =~ /^1.8/
222
+ Open3.popen3(rake_path, "test", '--trace', &open_proc)
223
+ exit_status = $?
224
+ else
225
+ Open3.popen3(rake_path, "test", '--trace', &open_proc)
217
226
  end
218
227
 
219
228
  if config["upload_results"] or
@@ -246,14 +255,16 @@ class Gem::Commands::TestCommand < Gem::Command
246
255
  (get_all_gem_names rescue [options[:name]]).each do |name|
247
256
  spec = find_gem(name, version)
248
257
 
249
- # we find rake and the rakefile first to eliminate needlessly installing
250
- # dependencies.
251
- find_rakefile(spec)
252
- rake_path = find_rake
258
+ if spec.files.include?('.gemtest')
259
+ # we find rake and the rakefile first to eliminate needlessly installing
260
+ # dependencies.
261
+ find_rakefile(spec)
262
+ rake_path = find_rake
253
263
 
254
- install_dependencies(spec)
264
+ install_dependencies(spec)
255
265
 
256
- run_tests(spec, rake_path)
266
+ run_tests(spec, rake_path)
267
+ end
257
268
  end
258
269
  rescue Exception => e
259
270
  if @on_install
data/test/helper.rb CHANGED
@@ -69,4 +69,7 @@ class Test::Unit::TestCase::Interactive < Test::Unit::TestCase
69
69
  puts "----- This test is interactive -----"
70
70
  puts
71
71
  end
72
+
73
+ def test_01_null
74
+ end
72
75
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Erik Hollensbe
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-15 00:00:00 -05:00
18
+ date: 2010-12-16 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency