Gittr.rb
Git as a key-value store! Build with Grit, it supports SET, GET, KEYS, and DELETE operations. In addition, we can also get the change history of key/values.
And since it's Git, we can easily enhance it to include other awesome Git features such as branches, diffs, reverting, and more!
Example:
@store = Gittr.new(:repo => File.expand_path('..', __FILE__))
@store.clear # Deletes all keys/values from the store
# SET
@store['lady'] = "gaga"
# GET
@store['lady'] #=> "gaga"
# KEYS
@store.keys #=> ['lady']
# DELETE
@store.delete('lady') #=> 'gaga'
# LOG
@store.log('key')
# Produces:
[
{"message"=>"all clear","committer"=>{"name"=>"Matt Sears", "email"=>"matt@mattsears.com"}, "committed_date"=>"..."},
{"message"=>"set 'lady' ", "committer"=>{"name"=>"Matt Sears", "email"=>"matt@mattsears.com"}, "committed_date"=>"..."}
{"message"=>"delete 'lady' ", "committer"=>{"name"=>"Matt Sears", "email"=>"matt@mattsears.com"}, "committed_date"=>"..."}
]
Nice one! A was thinking about creating same thing!