Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmeiklejohn/riik
Lightweight object mapper for Riak.
https://github.com/cmeiklejohn/riik
Last synced: about 2 months ago
JSON representation
Lightweight object mapper for Riak.
- Host: GitHub
- URL: https://github.com/cmeiklejohn/riik
- Owner: cmeiklejohn
- License: mit
- Created: 2011-11-26T04:11:29.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-29T21:09:48.000Z (almost 13 years ago)
- Last Synced: 2024-10-26T08:57:57.246Z (2 months ago)
- Language: Ruby
- Homepage: http://criticalpair.com
- Size: 178 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/seancribbs/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:
```ruby
class Person
include Riik::Documentproperty :first_name
property :last_name
end
```To use:
```ruby
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.