On Apr 4, 2009, at 07:57, Hector E. Gomez M wrote:
My name is Hector, I am a student from Mexico City in the last
days I worked on a proposal for this year Google Summer of Code.
The objective is the implementation of a gem installer for Gentoo,
mainly because the need to make changes to the gem before its
installation and to make it friendly to portage phases. A link to
the proposal is here:
http://hectoregm.lighthouseapp.c..., where I go in detail about
the needs for this functionality.
I think in general the idea of a stagged install could be of use
to the wider RubyGems users, in special a phase where one could
patch a gem before installation,
Currently RubyGems provides hooks for RubyGems packagers to add
functionality. You can add a rubygems/defaults/operating_system.rb
file and in it add pre/post install/uninstall hooks to RubyGems.
(This work was done for making RubyGems more friendly to
Debian/Ubuntu).
I'd rather not add platform-specific code to RubyGems itself if
I can avoid it, since it becomes difficult to maintain as I
primarily develop on OS X and sometimes FreeBSD, and rely on other
contributors for verification of bug fixes on Windows and other
operating systems.
another I can think from the top is to run of the tests inside
of gem before its installation and given a bad result of the test
abort the installation.
Currently RubyGems has this feature (gem install -t), but it is
test-unit focused. The upcoming 1.3.2 release supports plugins, so
perhaps an rspec plugin could be added and given to rspec. A
test-library attribute would probably need to be added to the
gemspec.
So this email is to get some input from you as Rubygems
maintainers about any ideas, about how you think this could be
approached and the possibility, given the proposal is accepted by
Gentoo, the code could be accepted upstream.
I would hope the defaults feature and the install hooks would be
enough for you to complete your installation task. If not, features
can certainly be added to RubyGems to support you (for example,
additional hooks).