On 11/29/06, Chad Fowler <[EMAIL PROTECTED]> wrote: > On 11/28/06, Chad Woolley <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I'm writing a tool ("geminstaller" on RubyForge) which will > > automatically install all required gem versions for an app/server, > > based on a config file. This is inspired by the way Maven handles > > dependency auto-download for Java. > > > > Anyway, it's almost releasable, except for one hitch: I can't figure > > out how to programatically specify a platform for multiplatform/binary > > gems; I always get prompted with the list of platform/version choices. > > > > The crux of the problem seems to be in > > Gem::RemoteInstaller.find_gem_to_install. It appears to be hardcoded > > to prompt the user with a list of all gems if any binary gems exist, > > with no way to programatically specify an exact name + version + > > platform. > > > > I can hack around this by overriding this method, as well as the > > entire call stack up through InstallCommand, etc. I'm currently using > > GemRunner as my interface point to invoke RubyGems, because I want to > > avoid digging into the guts of RubyGems as much as possible. > > However, this approach would require me to override several methods > > (at least 4 I've found so far). I really don't like this, because > > it's asking for forward-compatibility problems when new releases of > > RubyGems are released. > > > > So, what is your advice? Am I missing some easy solution to this? If > > not, would you RubyGem developers be up for accepting a patch which > > adds platform-specifying capability to the current code (including an > > appropriate command line option)? If so, I'd like to contribute it. > > I'd still have to hack around it for backward compatibility with prior > > RubyGem releases, but it would be nice to know I wouldn't have to > > worry about forward compatibility. Plus I think it would be a nice > > feature :) > > > > Thanks, > > Chad > > > > P.S. Sorry if this has already been discussed in a prior thread, I > > just joined the group and was too lazy to search the archives. > > _______________________________________________ > > > Hi. You're right that this is a limitation. Jim and I discussed it > at length at the recent Rails Edge conference. We have a solution in > mind, but we haven't started hacking yet. > > Chad
Hi Chad, Great! Let me know when you guys start, and if I beat you to it I'll let you know. Like I said, I've got to hack backward compatibility first, then I'll try to take a look at it. Thanks, Chad _______________________________________________ Rubygems-developers mailing list Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers