Skip to content
A Git-Backed Key/Value Store
Find file
New pull request
Latest commit 3531b3f @mattsears Add License
Failed to load latest commit information.
test Ensure that a custom committer, if given, makes it into the git commit.
.gitignore Initial commit of classes, tests, and supporting gems
Gemfile Add Options header
Rakefile Initial commit of classes, tests, and supporting gems
gaga.gemspec Added new link to homepage


Gaga is a Git-backed key/value store written in Ruby. Built with Grit, it supports SET, GET, KEYS, and DELETE operations. And since it's Git, we can easily enhance it to include other awesome Git features such as branches, diffs, reverting, and more!


@gaga = => File.expand_path('..', __FILE__))

@gaga['lady'] = "gaga"

@gaga['lady'] #=> "gaga"

@gaga.keys  #=> ['lady']

@gaga.delete('lady') #=> 'gaga'

# Remove all items from the store


You can always store key/values in separate branches. Just specify the branch option parameter:

@gaga = => path_to_repo, :branch => 'config')

Though not recommended, Gaga can store the identical key in different branches.


Gaga keeps a history of key/value saves.


Returns an array of commit messages along with meta data about each key/value save.

 {"message"=>"all clear","committer"=>{"name"=>"Matt Sears", "email"=>""}, "committed_date"=>"2011-09-05..."},
 {"message"=>"set 'lady' ", "committer"=>{"name"=>"Matt Sears", "email"=>""}, "committed_date"=>"2011-09-05..."}
 {"message"=>"delete 'lady' ", "committer"=>{"name"=>"Matt Sears", "email"=>""}, "committed_date"=>"2011-09-05..."}


Custom commit options can be set globally when creating a new Gaga instance, or passed in with calls to #set, #delete, or #clear.


# Global options
store1 =
    :repo => '/path/to/repo/',
    :branch => :example,
    :author => {
        :name => 'Jim Bob',
        :email => ''
    :committer => {
        :name => 'Jane Doe',
        :email => ''

# Custom message when storing a key/value
store1.set('key_1', 'Hello World', {:message => 'This is a custom commit log message'})

store2 = => '/path/to/repo/', :branch => :example)

# Assigns an author when storing a key/value
store2.set('key_1', 'Goodbye', {
    :message => 'Another custom log message',
    :author => {
        :name => 'Sally',
        :email => ''

# Delete operations can also have a custom message
store2.delete('key_1', {:message => 'Farewell message'})

Installing Gaga

$ gem install gaga


Once you've made your great commits:

  1. Fork Gaga
  2. Create a topic branch - git checkout -b my_branch
  3. Push to your branch - git push origin my_branch
  4. Create a Pull Request from your branch
  5. That's it!


Matt Sears :: @mattsears

Something went wrong with that request. Please try again.