johncarney/validates_timeliness — pull request #1 by johncarney (2014-07-16 07:23:54+00:00)
Title: Remove deprecated #setup method, which is deprecated in Rails 4.1.

Defining `#setup` on Validators is deprecated in Rails 4.1 and is planned to be removed altogether in Rails 4.2. In the meantime, defining `setup` causes deprecation warnings.

This patch is cribbed from a couple of suggested solutions discussed in issue #114 and suppresses deprecation warnings in Rails 4.1 and will work in Rails 4.2, as well as older versions.

I haven't included any tests because I couldn't figure out how to cleanly mimic the different behaviours of different Rails versions.