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
- Fork it ( https://github.com/kodnin/spara/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request