Directory_watcher 1.3.0

directory_watcher version 1.3.0
by Tim P.
http://codeforpeople.rubyforge.org/directory_watcher

== DESCRIPTION

DirectoryWatcher is a class for watching files within a directory and
generating events when those files change. This latest release adds
support
for Rev and EventMachine based file notifications. These libraries are
more
efficient than the default Ruby thread loop that polls the entire
directory
at a regular interval.

This example shows how to receive notifications for all ruby files in
the
current directory (and all its subdirectories) using the Rev library for
notifications.

dw = DirectoryWatcher.new(‘.’, :glob => ‘**/*.rb’, :scanner => :rev)
dw.add_observer {|*args| args.each {|event| puts event}}
dw.start

The supported :scanner options are:

:em => EventMachine
:rev => Rev
nil => default Ruby thread loop

== CHANGES

  • 2 major enhancements
    • added support for Rev based notifications
    • added support for EventMachine based notifications

== INSTALL

gem install directory_watcher

You will need to install the “eventmachine” and / or “rev” gems if you
wish to
use either for file notifications.

== LINKS

GitHub: GitHub - TwP/directory_watcher: Event notification for file system changes
Rubyforge: http://codeforpeople.rubyforge.org/directory_watcher

Blessings,
TwP