Recliner is a Ruby ORM for interfacing with CouchDB (couchdb.apache.org/) databases.

It is designed to be familiar to users of ActiveRecord, but diverges where necessary to fit with the CouchDB document/view paradigm.

Example

class Article < Recliner::Document

property :title, String, :default => 'Untitled'
property :body, String
property :published_at, DateTime
property :approved, Boolean, :default => false
timestamps!

attr_protected :published_at, :approved

belongs_to :author, :class_name => 'User'

default_order :published_at

view :by_title, :order => :title
view :approved, :conditions => { :approved => true }

validates_presence_of :title, :body

before_save :set_published_at

end

article1 = Article.create(:title => “Recliner wins multiple awards!”,

   :body => "Actually, it hasn't happened yet",
   :approved => true)

article2 = Article.create(:title => “Recliner 1.0 released”,

    :body => "Yes, it's true!",
    :approved => false)