applicake/doorkeeper — pull request #122 by petergoldstein (2012-07-28 20:45:37+00:00)
Title: Mongoid 3.0.x support with backwards compatibility

This branch includes a number of changes to support Mongoid 3.0.x while preserving backwards compatibility with the significantly different Mongoid 2.4.x branch.

General changes included:

1. Logic to detect the active Mongoid version, and to change configuration as needed
2. Adding :inverse_of to :belongs_to relationships
3. Updating version of database_cleaner to get Mongoid 3.0.x support
4. Changing RSpec configuration to create indexes before every test
5. Changing the default Mongoid library to 3.0.x and updating the mongoid.yml for the dummy app appropriatly
6. Adding some Mongoid documentation to the Readme
7. Eliminating deprecation warnings by replacing update_attribute (see previous pull request)

For the Mongoid 3.0.x specific configuration these changes included:

1. Updating the index syntax to the Mongoid 3.0.x when using Mongoid 3.
2. Updating references to use Moped::BSON::ObjectId for Mongoid 3.0.x

I've included instructions in the Readme for running the Mongoid tests using Mongoid 2.4.x. Test run green with ActiveRecord, Mongoid 3.0.2, and Mongoid 2.4.12