[Rake-devel] Observer mode: new option --observe

murphy murphy at rubychan.de
Wed Jan 31 15:17:37 EST 2007


hi list!

I've implemented a new feature to Rake that seems very useful to me.

You can use the --observe (-O) option and an optional interval to start
Rake in an endless loop, like this:

% rake -O compile

and it will check every second if something has changed (until you kill it.)

I use this to compile .textile files to .html for example, so I don't
need to switch from my editor to the terminal every time. Helps a lot.

Another variant is to "daemonize" it:

% rake --silent --observe task &
% rake -sO task &
(not -Os!)

I attached both a patch and the new rake.rb file. As you can see, I had
to tweak Task#invoke to allow them to be called repeatedly.

Hope it works for you :)
[murphy]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rake_observe.tar.gz
Type: application/x-gzip
Size: 18129 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rake-devel/attachments/20070131/1e4b615a/attachment-0001.gz 


More information about the Rake-devel mailing list