A better rubygems lister

I’m in the process of teaching myself ruby – first by dealing with the language core and stdlib by just writing ruby (no frameworks) to replace my myriad of crappy shell scripts that I’m using for various things. I can do a lot more quickly in a ruby (or perl or even php) than I can in any of the shell languages. And it’s a great way to learn ruby.

One of the first things I’m doing is fixing a huge annoyance I have with rubygems – namely that the

command has no terse output. A standard gem list gives you something like:

And I could give a flying rip what each does after I’ve read the descriptions the first time. So I’m taking advantage of a cool thing in rubygems – that it’s a modular library implemented as a rubygem itself – and reverse-engineering things a bit with it to give me something like:

Here’s what I ended up with:

Not completely bad for only my third day or so poking at ruby for replacing my system/service scripts (I’m actually using this in a comprehensive script to mail me periodic information about the configuration for each of my servers. This is actually an offshoot of a script to compare installed gems with a expected list of gems and versions – which I’ll post later)