Abbey
A primitive JSON data store
Description
A simple persistence library with human-readable representation. Uses good 'ol filesystem. Features: basic operations & namespaces. To be used for prototyping and as a backend of more sophisticated/specific implementations.
Usage
Warning: Abbey intentionally uses JSON, therefore it inherits it's caveats. Most notably, symbols are serialized to strings.
require 'abbey'
abbey = Abbey::EntityStorage.new(Abbey::Settings.new('/var/myapp/data', [:users, :books]))
abbey.set_up! unless abbey.set_up?
abbey.save(:users, :admin, {:name => "John Smith"})
abbey.save(:users, :admin, {:name => "John Smith"})
abbey.get(:users, :admin)
abbey.update(:users, :admin, {:name => "John C. Smith"})
abbey.update(:users, :nonexistent, {:name => "Joe Black"})
abbey.list(:users)
abbey.get_all(:users)
abbey.delete(:users, :admin)
abbey.drop(:users)
abbey.exists?(:users, :admin)
abbey.settings.namespaces
abbey.settings.logger
License
MIT. See LICENSE.txt
Author
Pavel Kalvoda me@pavelkalvoda.com