Build Status

Spara

A simple key-value database written in Ruby.

Installation

Add this line to your application's Gemfile:

gem 'spara'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spara

Usage

Require the gem in your project or irb, instantiate a new key-value database, set and get values using keys:

require 'spara'
# => true
db = SparaDisk.new('test.db')
# => #<SparaDisk>
db.set('name', 'kodnin')
# => 'kodnin'
db.get('name')
# => 'kodnin'

SparaDisk writes the data to disk (using PStore), SparaMem keeps the data in memory.

Contributing

  1. Fork it ( https://github.com/kodnin/spara/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request