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
case in rubyforge.  What's the right thing to do here?

If you can't submit it to rubyforge, post it here.

Attachment: gem_commands.rb.patch
Description: Binary data


_______________________________________________
Rubygems-developers mailing list
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to