thoughtbot/griddler — pull request #47 by lagartoflojo (2013-04-01 01:34:10+00:00)
Title: Add an adapter for Mandrill

I want to start using Griddler in our app, but we use Mandrill, for which there wasn't an adapter yet, so I wrote it.
I still would appreciate some feedback, though:
- Mandrill's requests could possibly contain more than one email, as they batch them up into one request, so `normalized_params` returns an array. For this to work, I made a new `Griddler::Email.process` method that takes a single hash or an array of hashes, instantiates a new `Griddler::Email` for each hash passed, and then calls `#process` on those instances. I don't know if that's the approach that you would like in this case, but it had the least impact on the public API.
- I wrote tests for the adapter (based on the tests that were there for another adapter), but I'm not sure where/how to test this new `process` method (I'm not very experienced with testing, and would appreciate some pointers).
- I had to add a new route, because Mandrill does a HEAD request at the endpoint to check if it's valid before letting a user add it to their system.