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

Markus Prinz markus.prinz at qsig.org
Sun Dec 23 13:04:24 EST 2007

Hello list,

I've been working on adding support for a ~/.utility_belt-file, which  
should allow you to ignore (that is, not 'require') certain parts of  
Utility Belt. Right now the implementation for that is very, very  
crude (I wouldn't recommend including it into Utility Belt just yet,  
and there are no specs for it anyway).

However, I wanted to know what you think about some of the ideas I've  
had to implement this thing:

.) Right now, Utility Belt requires everything in utility_belt.rb,  
including libraries that are only needed for certain parts of Utility  
Belt (e.g. the platform gem is only used in Mac Clipboard, Amazon  
Upload Shortcut and Pastie). I think it would be better if each part  
requires all the files it needs, and utility_belt.rb only requires the  
parts themselves (plus rubygems + wirble, of course).
.) Allow each part to store/retrieve their configuration from it (if  
they need one), e.g. the Amazon S3-Key
.) Would an additional environment variable make sense, to complement  
the .utility_belt?

Also, does anyone have an idea on how one might spec this? The only  
thing I came up with is to spoof ENV['HOME'] to a temp directory, and  
create a .utility_belt there.

regards, Markus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: crude_utility_belt_rc.patch
Type: application/octet-stream
Size: 792 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/utilitybelt-tinkering/attachments/20071223/2bb0e933/attachment.obj 
-------------- next part --------------

More information about the Utilitybelt-tinkering mailing list