|
Re: New patch for 'gem contents' bug: msg#00028lang.ruby.gems.devel
Hi, I've attached a patch file (a context diff) for gem_commands.rb, made against the current source file in svn. The changes are all in the ContentsCommand class. This fixes three bugs: 1) 'gem contents' wouldn't work unless you explicitly specified a specification directory, 2) the '--version' option didn't work at all, because the version number you specified was treated as a gem name, and 3) when multiple versions of a gem were installed, the earliest was selected by default, rather than the most current. (Now the most recent is selected.) The fixes for (2) and (3) were each a one-word change on a single line. The code for the ContentsCommand#execute function could also be simplified a little, because there's always a list of specification directories now. My guess is that the '--version' bug arose because someone didn't want to use the VersionOption mixin in this class. I think that's probably because the descriptive text used in the option definition in VersionOption ("Specify version of gem to #{taskname}") assumes the command name is a transitive verb, like 'install', or 'list'. If the string were changed to something like "Specify version of gem for #{taskname}"), it might be appropriate for a command like 'contents', too, even if it doesn't sound as good for 'install'. Maybe you could simplify it further, to just "Specify version of gem"? In an any case, it would be nice if the VersionOption mixin could be used here. Thanks, TomP On Dec 8, 2006, at 2:04 PM, Eric Hodel wrote: I don't see any way to upload a new patch file to an existing
_______________________________________________ Rubygems-developers mailing list Rubygems-developers-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx http://rubyforge.org/mailman/listinfo/rubygems-developers
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: New patch for 'gem contents' bug, Tom Pollard |
|---|---|
| Next by Date: | Re: New patch for 'gem contents' bug, Tom Pollard |
| Previous by Thread: | Re: New patch for 'gem contents' bug, Eric Hodel |
| Next by Thread: | Re: New patch for 'gem contents' bug, Tom Pollard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |