rubygems-test 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.3.2 / 2011-02-05
2
+
3
+ * Trap sigint and refuse to upload
4
+
1
5
  === 0.3.1 / 2011-02-03
2
6
 
3
7
  * Formatted upload results output differently. Thanks postmodern.
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ Hoe.spec 'rubygems-test' do
12
12
 
13
13
  # doin' it wrong because we're a gem plugin
14
14
  # that means I can be "special"!
15
- self.version = '0.3.1'
15
+ self.version = '0.3.2'
16
16
 
17
17
  self.rubyforge_name = nil
18
18
 
@@ -328,14 +328,23 @@ class Gem::Commands::TestCommand < Gem::Command
328
328
  Dir.chdir(spec.full_gem_path) do
329
329
  rake_args = get_rake_args(rake_path, 'test')
330
330
 
331
+ @trapped = false
332
+ ::Kernel.trap("INT") { @trapped = true }
333
+
331
334
  output, exit_status = platform_reader(rake_args)
332
335
 
333
- if upload_results?
336
+ ::Kernel.trap("INT", "DEFAULT")
337
+
338
+ if !@trapped and upload_results?
334
339
  upload_results(gather_results(spec, output, exit_status.exitstatus == 0))
335
340
  end
336
341
 
337
342
  if exit_status.exitstatus != 0
338
- alert_error "Tests did not pass. Examine the output and report it to the author!"
343
+ if @trapped
344
+ alert_error "You interrupted the test! Test runs are not valid unless you let them complete!"
345
+ else
346
+ alert_error "Tests did not pass. Examine the output and report it to the author!"
347
+ end
339
348
 
340
349
  raise Gem::TestError, "tests failed"
341
350
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rubygems-test
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.1
5
+ version: 0.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Erik Hollensbe
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-02-04 00:00:00 -05:00
14
+ date: 2011-02-05 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency