Gibbler: Git-like Hashes and History for Ruby Objects

gibblerInspired by Git (the version control system), Delano Mandelbaum has come up with a library called Gibbler, which produces hashes and history for Ruby objects.

Calling the gibbler method on an object will produce a 40 byte git-like SHA1 hash (or you can use gibbler.short to get just the first 8 bytes).

my_object.gibbler.short # => 4c558a56

Gibbler can also track changes to an object. Every time you call gibbler_commit, it will create a clone of the current object and store it in an instance variable. And just like with git, you can view or revert to any version in the history. By default Gibbler supports history for Hashes, Arrays and Strings.

Get Gibbler and read the documentation on Github. Delano makes the disclaimer that his code is still very new and not particularly efficient (due to keeping everything in memory), but he invites others to play with it and submit patches.

Support from: Brightbox; – Europe’s leading provider of Ruby on Rails hosting. Now with Phusion Passenger support, each Brightbox server comes with access to a managed MySQL cluster and redundant SAN storage. Brightbox also provides managed services for large scale applications and dedicated clusters.

One Reply to “Gibbler: Git-like Hashes and History for Ruby Objects”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.