2008/6/30 Eric Hodel <[EMAIL PROTECTED]>:
> 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
somewhere).


--
Neil Wilson
_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to