Skip to content

Machinist adapters for MongoDB ORMs. - updated for machinist 2.0 and mongoid (only)

License

Notifications You must be signed in to change notification settings

juggy/machinist_mongo

 
 

Repository files navigation

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

About

Machinist adapters for MongoDB ORMs. - updated for machinist 2.0 and mongoid (only)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%