[Rubygems-developers] LOCAL/REMOTE tokens are not printed for non-tty

Martin Krauskopf martin.krauskopf at gmail.com
Fri Aug 1 18:03:43 EDT 2008

Eric Hodel wrote:
>> Any chance the change will be reverted (e.g. in RubyGems 1.2.1), so the
>> output remains backward compatible for cases like this?
> The goal of the change is to make it easier to hook `gem` up to shell 
> scripts, for example:
> gem install rdoc
> gem list | xargs gem rdoc --ri --rdoc

That makes sense, thanks.

> Do you run this usually like `gem list -b`?

Now, the same 'parser' is used for `gem list {-b,-l,-r}` in the Gem 
Manager, but.....

> I could add a special case for that.

... if you would add this, it will be trivial to tweak our current code. 
So yes, it would be helpful.

It would be probably helpful for CLI usage as well. Since it would be 
easy to spot where the remote gems starts in the gem listing.

>> PS: I know that parsing of the output is poor solution, we are going to
>>    switch to pure one using RubyGems API in next versions of the Gem
>>    Manager
> Alternately, if you run `gem list -r` and `gem list -l` separately, you 
> shouldn't need to parse anything.

We are doing so {-l, -r} when only local, or remote, gems need to be 
read/reloaded, but first time we run with -b. Running two processes is 
slower with JRuby (not sure about Rubinius). Thus is 'last resort' solution.

BTW, shouldn't be trunk switched to 1.2.1 (or 1.3.0). Now if I install 
latest official stable release 1.2.0 and trunk version, it's hard to 
recognize what I'm running - particularly we had bug reported against 
1.2.0, but the user has trunk version[1].


[1] http://www.netbeans.org/issues/show_bug.cgi?id=141461

More information about the Rubygems-developers mailing list