alexreisner/geocoder — pull request #265 by petergoldstein (2012-07-24 03:24:00+00:00)
Title: Update code to account for Mongoid 3.0.x changes with backwards compatibility

This is a set of minor changes to make geocoder compatible with the recent changes in Mongoid 3.0.x. It's a very small set of changes, and runs green with Mongoid 2.4.11 and 3.0.1.

Key changes are:

i) Update the index statement in Geocoder::Model::Mongoid to use the Mongoid 3.0.x syntax when the Mongoid version number is greater than 3.
ii) Update the mongoid_test_helper.rb to set the Mongoid logger appropriately based on the version of Mongoid in use.
ii) Update the call to the Mongoid selector in mongoid_test.rb to use a string key (Mongoid 3.0.x) or a symbol key (Mongoid 2.0.x) as appropriate.

I think this should be a very safe pull, and it preserves backwards compatibility with users who haven't updated to Mongoid 3.0.x. I have run the Geocoder tests with Mongoid 2.4.11 and Mongoid 3.0.1 and they both run green.