Skip to content
Lightweight object mapper for Riak.
Ruby
Find file
Failed to load latest commit information.
config
lib Bump version.
spec Allow classes to specify a method to use for key generation.
.gitignore Add lock.
.rbenv-version Initial.
.rspec Initial.
.travis.yml Restrict to 1.9.2.
.yardopts Use redcarpet.
Gemfile Add tddium.
Gemfile.lock Bump version.
Guardfile Add yard guard.
LICENSE Add license and readme.
README.markdown Add contribution guidelines.
Rakefile Don't document private methods.
riik.gemspec Add tddium.

README.markdown

Riik

Lightweight object mapper for Riak.

Motivation

Riik doesn't support everything you would exepct from a full ORM. There are no validations, no callbacks, and no error handling, as the primary motivation was providing an extremely thin abstraction over RObject allowing you to map an objects serialized fields into keys. The benefits come from being able to work with a lightweight abstraction without dependencies on larger, external gems, such as activesupport and activemodel.

If you're building an entire site with Riak as the primary data store, you should be looking at Ripple.

If you're looking at building a gem or Ruby application that needs to write serialized objects directly to Riak without any overhead, look no further.

Usage

To define a class:

class Person
  include Riik::Document

  property :first_name
  property :last_name
end

To use:

p = Person.new(:first_name => 'Fat', :last_name => 'Mike')
p.save # => true
p.destroy # => true
Person.find(p.key) # => p

Contributing

  1. Fork the official repository.
  2. Make your changes in a topic branch (with tests, please).
  3. Send a pull request.
  4. Once accepted, you'll get a free limited-run Critical Pair t-shirt!

License

Riik is Copyright © 2011 Critical Pair. Riik is free software, and may be redistributed under the terms specified in the LICENSE file.

Something went wrong with that request. Please try again.