mattpolito/paratrooper — pull request #25 by bdmac (2013-03-30 23:28:07+00:00)
Title: Adds callback support and smart deploys

Added support for before_X callbacks that can short-circuit various
paratrooper deployment steps by returning false similar to
AS::Callbacks. This part could probably be enhanced by just using
AS::Callbacks but I didn't want to add any new requirements.

The second part of this commit adds a sample callback
PendingMigrationCallback that can be used to skip a few deployment steps
if there are no pending migrations to be run post-deploy.

This is functional and the tests pass but it should probably be viewed more
as a discussion point for something that could be added to paratrooper. If
desired I think the better move would be to just add full ActiveSupport::Callback
support so before/around/after callbacks can be injected into Paratrooper
deploys. Notifiers could probably be refactored as a sort of before callback
as well.