hassox / dm-polymorphic

An initial repo for polymorphism in datamapper
MIT License
28 stars 8 forks source link

dm-core 1.0.2 compatibility #2

Closed 6twenty closed 9 years ago

6twenty commented 13 years ago

This is a new pull request after my previous one which I felt was a bit rushed.

All tests are passing.

The gem has been updated to work well with dm-core 1.0.2. The "old syntax" and some other superfluous files have been stripped out to keep things nice & simple. The core of the gem, associations.rb, has been merged into dm-polymorphic.rb and has been only slightly refactored (notably to use ActiveSupport instead of Extlib for the inflections). Additionally I've used Bundler for the gem management but this was a personal preference to again keep the gem nice & simple, and to allow Bundler to include the gem in projects before it is pushed to rubygems.

I've also updated the README to support these changes (notably removing the old syntax and adding a note regarding the use of dm-polymorphic with dm-constraints).

Cheers :)