wkranec/finance — pull request #21 by bramswenson (2013-07-16 18:56:05+00:00)
Title: Rails support

This pull request builds on previous work by @thadd and others. It also fully converts the test suite to use minitest/spec instead of shoulda. This branch adds activesupport as a development dependency as well. This was the primary way I was able to track down most of the issues regarding using this gem with rails.

A major note about this branch is that it removes the #years and #months monkey patches to Integer since ActiveSupport does something very different with the same method names. Since it was a convenience, I felt it was best to remove this feature in order to embrace rails support.

Another important thing about this branch is that it creates a convention of using #to_s rather than #to_d for inputs to DecNum since #to_d in rails land produces BigDecimal instances, again a convenience that was in the way (to be fair it was in the way of other convenience code, it just so happens that ActiveSupport is pretty common me thinks).

All the tests now pass, even with ActiveSupport fully loaded into the suite. This branch seems to be working well within Rails 3+ now :alien: