javan/whenever — pull request #471 by yob (2014-06-30 01:39:23+00:00)
Title: Remove runtime dependency on Active Support

**Note:** This includes https://github.com/javan/whenever/pull/470 - if that merges first then I'll rebase this onto master to remove the noise in the diff.

The only activesupport features that whenever uses are the Numeric extensions that help with durations - Numeric#{minutes,hours,etc}. If activesupport is available in the current environment (ie. in a rails app) then we should load the bits of activesupport that are needed. For environments where AS isn't available (ie. many non-rails projects) then fall back to our own Numeric extensions that provide most of the same functionality.

This means core classes are still being monkey-patched, but the surface area is as small as possible and there should be no breaking changes to the DSL.

There is one key difference between the AS extensions and our own - AS returns an ActiveSupport::Duration object and we return a plain old Fixnum. That's OK for whenever, but it does mean common rails patterns like `1.week.from_now` aren't possible.

There should be no impact for whenever users. See https://github.com/javan/whenever/pull/466 from some earlier discussion that lead to this PR.