rubygems-test 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/gems/test-gem-0.0.0.gem +0 -0
- data/lib/rubygems/commands/test_command.rb +20 -9
- data/test/helper.rb +3 -0
- metadata +3 -3
data/gems/test-gem-0.0.0.gem
CHANGED
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'
|
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
|
-
|
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
|
-
|
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
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
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
|
-
|
264
|
+
install_dependencies(spec)
|
255
265
|
|
256
|
-
|
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
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
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-
|
18
|
+
date: 2010-12-16 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|