javan/whenever — pull request #300 by jeroenj (2013-01-17 16:55:09+00:00)
Title: Makes sure capistrano cd's to the right directory when executing a deploy:rollback

Right now, if you would manually execute a `cap deploy:rollback`, it would result in a failure because of the whenever recipe. It would try to `cd` into the wrong directory: `latest_release` instead of `previous_release`.

The `on_rollback` block inside the recipe is only called when another recipe fails and the current changes have to be rolled back. It isn't called when you manually invoke a rollback.

There is some duplication in the code which might be cleaned up.