just finished doing some updates to my general pool of assorted tools
and decided it was about time to make it available to everyone:
i do this primarily because it includes two particularly neat scripts:
DBIze and ONI, both of which may very well become their own packages in
the future if there’s enough interest.
here’s the rundown on all the scripts included:
* PrettyXML - PrettyXML is a pretty printer for XML/XHTML. It has
definable indentation and makes for a good demonstration of REXML’s
stream parser, which is required. (this is also in REXML contrib)
* FetchFile - A simple library making it easy to fetch local and
* RubyLib - Useful modification Classes and Modules for Ruby itself,
such as #to_b for most classes to convert to true or false, extra
methods for NilClass so you get default values for things like #to_f
rather then an error, and a few others.
* REREXML - REREXML adds a few extra features to REXML, like
absolute xpaths, both relative and indexed, and a parser for
(non-standard) Namespace and Schema processing instructions.
* DBize - DBize may be the coolest tool I have ever had the
privilege of writing. Behold! The power of MIXINS! DBize is a mixin
module which practically gives instant database connectivity to any
object. Simply define a table in your database with field names
identical to the instance variables of you object, add a couple very
simple methods to it and mix-it-in! Like magic, you are blessed with
methods to load, insert, update, and delete that object’s data against
* ONI - Then again maybe ONI is the coolest tool I have ever had the
privilege of writing ONI stands for Object Networked Interface. It is
similiar to DRb and ROMP. But unlike these, ONI uses YAML to serialize
objects. Requires YAML4R.
There are no tutorials (most of it is pretty straight foward), but
RDoc’s are included to help figure things out. and you can always ask me
i have a couple more scripts coming soon too! Enjoy!