Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Lightweight object mapper for Riak.

branch: master
Octocat-spinner-32 config Add tddium configuration. December 01, 2011
Octocat-spinner-32 lib Bump version. December 14, 2011
Octocat-spinner-32 spec Allow classes to specify a method to use for key generation. December 14, 2011
Octocat-spinner-32 .gitignore Add lock. December 06, 2011
Octocat-spinner-32 .rbenv-version Initial. November 25, 2011
Octocat-spinner-32 .rspec Initial. November 25, 2011
Octocat-spinner-32 .travis.yml Restrict to 1.9.2. November 26, 2011
Octocat-spinner-32 .yardopts Use redcarpet. November 26, 2011
Octocat-spinner-32 Gemfile Add tddium. December 10, 2011
Octocat-spinner-32 Gemfile.lock Bump version. December 14, 2011
Octocat-spinner-32 Guardfile Add yard guard. November 26, 2011
Octocat-spinner-32 LICENSE Add license and readme. November 25, 2011
Octocat-spinner-32 README.markdown Add contribution guidelines. December 29, 2011
Octocat-spinner-32 Rakefile Don't document private methods. November 26, 2011
Octocat-spinner-32 riik.gemspec Add tddium. December 10, 2011


Lightweight object mapper for Riak.


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.


To define a class:

class Person
  include Riik::Document

  property :first_name
  property :last_name

To use:

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


  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!


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.