pyromaniac/mongoid_orderable — pull request #18 by dblock (2013-10-22 17:40:49+00:00)
Title: Added support for Mongoid 4.x.

Mongoid 4.x has removed `Mongoid::Observer`, so we use that to test for the Mongoid version. There're two changes: `inc` takes a hash and `index_specifications` replaced `index_options`.

I did a bit of upgrading of default mongoid versions in Gemfile, ran all these:

```
rm Gemfile.lock ; MONGOID_VERSION=2 bundle install ; MONGOID_VERSION=2 bundle exec rspec spec/mongoid/orderable_spec.rb # also with Ruby 1.8.7
rm Gemfile.lock ; MONGOID_VERSION=3 bundle install ; MONGOID_VERSION=3 bundle exec rspec spec/mongoid/orderable_spec.rb
rm Gemfile.lock ; MONGOID_VERSION=4 bundle install ; MONGOID_VERSION=4 bundle exec rspec spec/mongoid/orderable_spec.rb
```