Touch Wrap

It's a tiny library to let you wrap the code with two file touches -- before execution of a block and after the successful finish. This is useful when you are monitoring code blocks with an external service, like Monit.

Usage

# Touch /tmp/task before the run, and /tmp/task.success upon completion
TouchWrap('/tmp/task') do
  # your code
end

# Touch /tmp/task before, and /tmp/task.done after
TouchWrap('/tmp/task', '/tmp/task.done') do
  # your code
end

License

Copyright (c) 2011 Aleksey Gureiev and Recess Mobile Inc.