lib/rubygems_plugin.rb in faster_rubygems-0.12.5 vs lib/rubygems_plugin.rb in faster_rubygems-0.12.6
- old
+ new
@@ -1,14 +1,18 @@
Gem.post_install {
# accomodate for when they install more than one at a time...
# a straight require won't cut it...
- print 'because of new gem installation '
- load "faster_rubygems/create_cache_for_all.rb"
+ @recreate_proc ||= at_exit {
+ print 'because of new gem installation '
+ load "faster_rubygems/create_cache_for_all.rb"
+ }
}
Gem.post_uninstall {
- print 'because of gem uninstallation '
- load "faster_rubygems/create_cache_for_all.rb"
+ @recreate_proc ||= at_exit {
+ print 'because of gem uninstallation '
+ load "faster_rubygems/create_cache_for_all.rb"
+ }
}
Gem.pre_uninstall { |gem_installer_instance|
if gem_installer_instance.spec.name == 'faster_rubygems' && RUBY_VERSION[0..2] == '1.8'
puts 'removing faster_rubygems as the default for require rubygems...'
\ No newline at end of file