rubygems/rubygems — pull request #566 by headius (2013-06-04 17:09:48+00:00)
Title: Initial support for installing default gems.

The logic here is pulled from MRI's rbinstall.rb default gem logic
and the actual logic for installing gems. The combined logic works
as follows:

* The normal dependency chain is followed, unlike the rbinstall
logic.
* The gem's full specification (with complete file list) is dumped
to GEM_HOME/specifications/default/GEM_NAME.gemspec. This covers
the bulk of the rbinstall logic.
* Only the bin files from the gem are extracted to the normal gem
install location. This allows a stub binscript to boot from a
combination of gem's bin and stdlib's libraries, as in the
rbinstall logic.

Remaining work to do:

* Unpack gem lib and ext contents into appropriate location for
the stdlib. This will overwrite existing files, and is generally
intended to do a dev-time update of a given default gem's
contents in stdlib.
* Install a binstub that works with both stdlib (default gem)
libraries and installed gems, as in Ruby 2.0's rake, rdoc, ri
commands. Primarily, this binstub needs to fallback to just a
simple require when gem loading fails.