[holy ruby programmers batman!] Adding a configuration file to Utility Belt

Giles Bowkett gilesb at gmail.com
Mon Dec 24 13:35:55 EST 2007

> > PDI!
> Sorry?

PDI = please do investigate

> Anyway, I'm done, see attachment.


> Usage: After requiring utility belt in your .irbrc, you can use
> UtilityBelt.equip to define which gadgets you want to equip (a gadget
> being something like is_an, or pastie).
> Examples:
> UtilityBelt.equip( :all, :except => %w{amazon_upload_shortcut} ) #
> Loads everything except amazon_upload_shortcut
> UtilityBelt.equip( :all ) # Loads everything. Default, even if equip
> is never called
> UtilityBelt.equip( :none, :except => %w{amazon_upload_shortcut} ) #
> Loads only amazon_upload_shortcut
> UtilityBelt.equip( :none ) # Loads no gadgets at all.
> The patch depends on the "Move all non-needed global requires to their
> own respective files"-patch.
> Questions, Comments, Suggestions, Improvements?

It looks good. This is probably presumptuous of me but I think the
best thing to do with Wirble is fold it into the gadgets category so
that people can equip it or not as they choose, and further treat
Wirble's syntax coloring as an additional gadget, and fit that into
this gadgets system by just creating a "gadget" file in lib which just


and keep the Wirble.init in utility_belt.rb.

There's only a few things I'ld change, which is that I'd rather see
the UtilityBelt.equip calls in .irbrc as opposed to an additional
file, I think I'd go for a "best of" default rather than making :all
the default, and last but not least allowing people to specify their
:except gadgets as Strings, Symbols, or Arrays of either one. And last
but actually least, changing some of the indentation as well.

But I'm expecting to merge this in over the next few days.

Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

More information about the Utilitybelt-tinkering mailing list