Updates! * I have created a pull request that adds a --default flag to install. Installing as a default gem does mostly what rbinstall.rb does today, by dumping a specification+file list to GEM_HOME/specifications/default and unpacking only the bin scripts from the gem. It could additionally unpack ext and lib contents into the local stdlib, but that would be bonus work.
* JRuby has a default_gems branch where I'm working on this stuff. I have a stripped-down rbinstall.rb that does the above logic until we have RG support for it. * I filed a bug with ruby-core and started refactoring rbinstall.rb. - Charlie On Tue, Jun 4, 2013 at 8:00 AM, Charles Oliver Nutter <head...@headius.com> wrote: > So I finally updated JRuby master to RG2 and want to offload a bunch > of libraries as gems. Last time I looked at this was a couple months > ago, so I had to review how MRI is doing it. > > And what the heck...rbinstall.rb is not a lot of fun. As far as I can > read it, rbinstall.rb reads the list of default gems out of > defs/default_gems and reprocesses the associated specifications for RG > to pick up. There seems to be a big functionality gap here. I > attempted to just put specifications in the right location, but for a > normal install they don't include version number (required for default > gem stuff) and the filenames include version (appears to break default > gems because it can't find a simple name. > > So...I think there's logic needed here to make it easy for an > implementation fo specify a default gem. I'm willing to hack on it a > bit, but wanted to get some input. > > * Is the configuration setup for default gems set in stone? It would > be simpler if we could just use the installed specifications (version > in filename but not in spec) since there is no other way to get that > specification except for reprocessing. > > * Assuming the current format needs to stay, should this be a new > command? gem install --default <x> or gem default <x> to install the > given gem, reprocess specification, and put it in the right place? > > * Is there something I'm missing, or is the rbinstall.rb mechanism the > only way to properly set up the default gemspecs right now? > > Thanks y'all. We're hoping to get this out in JRuby 1.7.5, perhaps in > the next month or two. Short list of gems that we'll be using RG2 > defaults for: rake, rdoc, psych, krypt, openssl, minitest, json. There > may be others. > > - Charlie _______________________________________________ RubyGems-Developers mailing list http://rubyforge.org/projects/rubygems RubyGems-Developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers