[Rubygems-developers] Customising Rubygems for Debian/Ubuntu.

Neil Wilson neil at brightbox.co.uk
Tue Jul 1 04:14:20 EDT 2008

2008/6/30 Eric Hodel <drbrain at segment7.net>:
> Ok.
> In r1829 I have added:
> Gem.pre_install
> Gem.post_install
> Gem.pre_uninstall
> Gem.post_uninstall
> each takes a block that is saved then called with the
> Gem::Installer/Gem::Uninstaller instance for the gem being
> installed/uninstalled at the appropriate time.  Multiple pre/post install
> hooks are supported.
> Gem.post_install do |installer|
>  puts "!!! #{installer.spec.full_name} INSTALLED !!!"
> end
> Gem.post_uninstall do |uninstaller|
>  puts "!!! #{uninstaller.spec.full_name} UNINSTALLED !!!"
> end

Thanks for that Eric. I'll have a play.

Do I define these in the 'operating_system.rb' file, or elsewhere? And
I presume they act on all gems installed/uninstalled on a system (ie
the hook isn't specific to a gem and stored in the gem package

Neil Wilson

More information about the Rubygems-developers mailing list