SquareSquash/ruby — pull request #4 by boourns (2013-04-16 19:17:38+00:00)
Title: Allow separate generation / transmission of exception notices

This refactors `Squash::Ruby.notify` into 3 methods:

`Squash::Ruby.generate_exception` takes the exception and user_data and generates the JSON notification.

`Squash::Ruby.transmit_exception` sends the exception blob on the wire

`Squash::Ruby.notify` uses the refactored methods to generate and send the exception.

This lets us generate the exception in the rescue block but send them to squash in a background job, freeing up our app workers sooner.