alphagov/email-alert-api — pull request #44 by rboulton (2014-11-05 09:52:10+00:00)
Title: Safer xml generation

The XML messages to be sent to govdelivery were being generated by
performing string interpolation with some template messages. This was
prone to content injection, and also liable to generate invalid XML.

Using Nokogiri's XML builder should more reliably generate valid XML,
and the code to use it is pretty clear too.

This PR splits the request generation code into a separate file, changes it
to use Nokogiri, and adds some webmock-based tests of the GovDelivery
client (which include testing the generated request XML).

Story: https://www.pivotaltracker.com/story/show/81921620