lgs / mongoid_taggable_with_context

A tagging plugin for Mongoid that allows for custom tagging along dynamic contexts with real-time aggregation (pre-aggregated).
http://rubygems.org/gems/mongoid_taggable_with_context
MIT License
19 stars 20 forks source link

Support all mongoid versions (2, 3, 4) #17

Closed joe1chen closed 10 years ago

joe1chen commented 10 years ago

This pull request primarily adds back support for mongoid 2 and also fixes specs to pass with mongoid 4. Travis test matrix was added in order to test mongoid 2, 3, and 4 against ruby 1.9.x, 2.0, jruby, and rubinius 2.

All specs should be passing with the exception of mongoid 4 + rubinius 2 combo (which I'm allowing to fail in travis since mongoid 4 is still beta).

johnnyshields commented 10 years ago

@joe1chen thanks but I think this makes the code too messy--too many if statements everywhere for Mongoid 2 support. Would be glad to accept a PR which adds Mongoid 4 without Mongoid 2.