ministryofjustice/peoplefinder — pull request #27 by Najaf (2014-12-04 11:28:11+00:00)
Title: Upgrade to work with 4.2.0rc1

@threedaymonk @novotnyjakub

As per deprecation warnings, all calls to `deliver` have been changed to `deliver_now` or `deliver_later`, so we're automatically integrated with ActiveJob.

I've silenced some deprecation warnings:

* Using `_path` instead of `_url` helpers anywhere in an `ActionMailer` appears to trigger a warnings. We pass a `desired_path` around in parameters, which is probably vulnerable to an open redirect, but also isn't the failure mode this deprecation warning is trying to guard us against, so I ignored it.
* The other two appeared to be from library code that hasn't been fixed yet.

Silencing deprecations that we either can't fix or will probably be fixed by libraries later just feels horrible. It's problematic to do this from the engine because it's silencing them for wrapper applications too. Any suggestions for how to make this nicer would be appreciated.

## Why I didn't backport

`activejob_backport` doesn't implement the `deliver_later` integration with `ActionMailer`. My options then were to:

1. Re-implement `deliver_later`, and have to subsequently remove that implementation once we upgraded.
2. Create jobs or a generic job and change all instances of `deliver` to use it (the same or more amount of work as 1).

Since we're at rc1, I figured it would be less work overall just to go ahead with the upgrade.

Any feedback welcome!