Project

cooper

0.0
No commit activity in last 3 years
No release in over 3 years
A revisioning database
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.6
~> 3.2
~> 0.31

Runtime

~> 1.9
~> 0.19
 Project Readme

Cooper

Code Climate Test Coverage Build Status Dependency Status

A schema-less revisioning database project built on Mongoid

Getting Started

Install cooper from the command prompt

gem install cooper

Usage

require 'cooper'

# Frameworks usually manage this step
Mongoid.load!('/path/to/config/mongoid.yml', :environment)

class Record
  include Cooper::Document

  revision_field :key
end

record = Record.new(key: 1)

record.save
p record.key
#=> 1

record.update_attributes(key: 2)
p record.key
#=> 2

record.checkout(id: 1)
p record.key
#=> 1

record.checkout(time: Time.now)
p record.key
#=> 2

Features

Cooper::Document behaves like a Mongoid::Document

It adds the capabilities of checking out declared revision fields

It uses Redis on port 6379 to get the current revision count

Road Map

  • Persist revision count from mongodb
  • Allow Redis configuration
  • Enable validation skipping on save

## Tests

rake will run all tests

rake spec:features will run against mongodb (configuration is located at spec/support/mongoid.yml)

rake spec:unit runs tests in isolation

License

The gem is available as open source under the terms of the MIT License.

Contributing

  1. Fork it ( https://github.com/floum/cooper/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request