Permalink
Browse files

Use the new hooks to uninstall gems if they fail testing.

Bump the rubygems requirement to 1.5 to reflect above changes.
  • Loading branch information...
1 parent 4594942 commit 441aa6f88e56a2bb28670e67c87f4d9689a35df5 Erik Hollensbe committed Apr 17, 2011
Showing with 3 additions and 5 deletions.
  1. +1 −1 Rakefile
  2. +2 −3 lib/rubygems/on_install_test.rb
  3. +0 −1 test/test_execute.rb
View
@@ -32,7 +32,7 @@ spec = Hoe.spec 'rubygems-test' do
pluggable!
require_ruby_version ">= 1.8.7"
- require_rubygems_version ">= 1.3.6"
+ require_rubygems_version ">= 1.5.0"
extra_deps << ['rake', '>= 0.8.7']
@@ -3,7 +3,7 @@
Gem.autoload(:RakeNotFoundError, 'exceptions')
Gem.autoload(:TestError, 'exceptions')
-Gem.post_install do |gem|
+Gem.post_build do |gem|
options = Gem.configuration["test_options"] || { }
if options["auto_test_on_install"] or options["test_on_install"]
@@ -17,8 +17,7 @@
options["force_uninstall_on_failure"] or
gem.ui.ask_yes_no("Testing #{gem.spec.name} (#{gem.spec.version}) failed. Uninstall?", false)
- # FIXME ask drbrain how to do this more better.
- at_exit { Gem::Uninstaller.new(gem.spec.name, :version => gem.spec.version).uninstall }
+ false
end
end
end
View
@@ -81,5 +81,4 @@ def test_07_upload_results?
ensure
Gem.configuration.verbose = old_verbose
end
-
end

0 comments on commit 441aa6f

Please sign in to comment.