rubyist / guard-rake

guard-rake runs a rake task when files change
MIT License
94 stars 32 forks source link

add a new option, :failure_ok, to tolerate failures from rake tasks #26

Closed erikh closed 11 years ago

erikh commented 11 years ago

Hi!

I've added this option to allow me to use rake tasks which might fail -- my personal usage is a rake task that runs rdoc coverage -- if the coverage is not 100%, the rake task fails (which is what I want for release tasking and so forth).

This unfortunately results in the exception bubbling up and more or less crashing the guard-rake subsystem -- the first time this runs in guard will be the last, which isn't very great for adding documentation and testing coverage via rake tasks. :)

The option I've added swallows the exception and is off by default, allowing the existing behavior, but allowing me to also specify that a failure is ok here.

Let me know if you have any qualms! Thanks.

jeromelefeuvre commented 11 years ago

+1

erikh commented 11 years ago

I've been running it a while, and while I know "works on my workstation" isn't exactly bulletproof as far as endorsements go, it does seem to do the thing I expect it to.

rubyist commented 11 years ago

This should be covered by effebfd28f33ebbc280defa45e201a2caf3e3b34

erikh commented 11 years ago

works for me -- thanks.