[ANN] Gibbler 0.5

  • Thread starter Delano Mandelbaum
  • Start date
D

Delano Mandelbaum

Gibbler 0.5 ALPHA

Git-like hashes and history for Ruby objects.

Installation:
$ gem install gibbler

Examples:
require 'gibbler'

"kimmy".gibbler # => c8027100
:kimmy.gibbler # => 52be7494

config = {}
config.gibbler # => 4fdcadc6
config.gibbled? # => false

config[:server] = {
:users => [:dave, :ali],
:ports => [22, 80, 443]
}
config.gibbled? # => true
config.gibbler # => ef23d605

config[:server][:users] << :yanni

config.gibbler # => 4c558a56

config.gibbler.short # => 4c558a56


Gibbler can also keep track of the history of changes to an object. By
default Gibbler supports history for Hash, Array, and String objects.
The gibbler_commit method creates a clone of the current object and
stores it in an instance variable using the current hash digest as the
key.

require 'gibbler'
require 'gibbler/history'

a = { :magic => :eek:riginal }
a.gibbler_commit # => d7049916

a[:magic] = :updated
a.gibbler_commit # => b668098e

a[:magic] = :changed
a.gibbler_commit # => 0b11c377

a.gibbler_history # => d7049916, b668098e, 0b11c377

a.gibbler_revert! 'd7049916' # Return to a specific commit
a.gibbler # => d7049916
a # => { :magic => :eek:riginal }

a.delete :magic

a.gibbler_revert! # Return to the previous commit
a.gibbler # => 0b11c377
a # => { :magic => :changed }


a.gibbler_object 'b668098e' # => { :magic => :updated }
a.gibbler_stamp # => 2009-07-01 18:56:52 -0400


Codes: http://github.com/delano/gibbler/
RDocs: http://delano.github.com/gibbler/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,173
Messages
2,570,938
Members
47,474
Latest member
VivianStuk

Latest Threads

Top