rubyrogues/ppwm-matcher — pull request #40 by joonty (2013-06-14 14:11:59+00:00)
Title: Email users on successful pairing

I'm not suggesting this is complete - best to look and talk it through before merging! Here's what it does:

* When the first user submits their code, they get no email
* When their mystery pair submits their code, an email (currently identical with names/emails swapped) is sent to each user
* The email gives the github username and email address of their pair
* It only sends these emails once

I've used an observer pattern to keep the mail stuff out of the way. It's using Pony, and I've added mailcatcher as a development dependency (because it's ace, apart from having a dependency on haml). There's a separate configuration for development/test and production environments, since production is going to use sendmail on heroku.

The email body can definitely be changed, I just put down what came to mind.

Thanks @rjackson for the suggestions of tools and things.