Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Machinist adapters for MongoDB ORMs.

tag: v2.0.0.pre

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.textile

Machinist Mongo

It aims to replace machinist_mongomapper to provide Machinist adapters not just for MongoMapper but for all the others MongoDB ORMs too. Right now it supports Mongoid and MongoMapper, but we aim to support all mongoDB ORMs, so If you’re using something other than MongoMapper or Mongoid, please be sure to write a adapter for it.

Usage

Using Machinist MongoMapper is simple. Put this in your Gemfile:

gem 'machinist_mongo'

And run:

bundle install

Or — if you’re using Rails 2.x — put this in config/environment.rb:

config.gem 'machinist_mongo'

And run:

rake gems:install

Now create your spec/blueprints.rb or test/blueprints.rb file as you normally would, only using Mongoid or MongoMapper instead of ActiveRecord:

require 'machinist/mongo_mapper' # or mongoid
require 'sham'

Don’t forget to require the new blueprints.rb file in your spec_helper (or test_helper):

require File.expand_path(File.dirname(__FILE__) + "/blueprints")

And you’re all set. Be sure read Machinist’s README to find out how to create your objects and get this thing running.

Contributors

Something went wrong with that request. Please try again.