Deprecate "args_for_retry" instead of removing it

Preserve backwards compatibility for gem-users that have overridden the
"args_for_retry" method.

Also, ensure that the tests for "args_for_retry", "retry_args" and
"retry_args_for_exception" are not overcomplicated, all we care about is
that they are hit.
In theory it would only show up in the resque log, but it's probably worth
prefixing it anyways

On Friday, June 27, 2014, Luke Antins <notifications@github.com> wrote:

> In lib/resque/plugins/retry.rb:
>
> > @@ -155,7 +155,14 @@ def retry_job_delegate
> >        #
> >        # @api public
> >        def retry_args(*args)
> > -        args
> > +        # Here for backwards compatibility. If an "args_for_retry" method exists
> > +        # invoke it, but warn that it is deprecated
> > +        if respond_to?(:args_for_retry)
> > +          warn '[DEPRECATION] `args_for_retry` is deprecated, use `retry_args`'
>
> If this was triggered in a large code base, would you know its reference
> resque-retry? Wondering if we need to prefix the message with the gem name.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/lantins/resque-retry/pull/107/files#r14300751>.
>