This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Travis Tilley (author)
Sun Dec 13 17:46:19 -0800 2009
fssm /
| name | age | message | |
|---|---|---|---|
| |
.document | Sun Aug 09 06:43:47 -0700 2009 | |
| |
.gitignore | Sun Dec 13 15:55:29 -0800 2009 | |
| |
LICENSE | Sun Aug 09 06:43:47 -0700 2009 | |
| |
README.markdown | Sat Aug 29 23:02:07 -0700 2009 | |
| |
Rakefile | Sun Dec 13 08:41:31 -0800 2009 | |
| |
VERSION.yml | Sun Dec 13 17:45:17 -0800 2009 | |
| |
example.rb | Sun Dec 13 17:26:33 -0800 2009 | |
| |
fssm.gemspec | Sun Dec 13 17:46:19 -0800 2009 | |
| |
lib/ | Sun Dec 13 17:44:24 -0800 2009 | |
| |
profile/ | Sun Dec 13 17:26:33 -0800 2009 | |
| |
spec/ | Sun Dec 13 17:26:33 -0800 2009 |
README.markdown
Monitor API
There are three ways you can run the monitor.
- call monitor with a path parameter, and define callbacks in a block
- call monitor with a block to configure multiple paths and callbacks
- create a monitor object and run each step manually
Monitor with path
This form watches one path, and enters the run loop automatically. The first parameter is the path to watch, and the second parameter is an optional glob pattern or array of glob patterns that a file must match in order to trigger a callback. The default glob, if ommitted, is '**/*'.
FSSM.monitor('/some/directory/', '**/*') do
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
Monitor with block
This form watches one or more paths, and enters the run loop automatically. The glob configuration call can be ommitted, and defaults to '**/*'.
FSSM.monitor do
path '/some/directory/' do
glob '**/*.yml'
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
path '/some/other/directory/' do
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
end
Monitor object
This form doesn't enter the run loop automatically.
monitor = FSSM::Monitor.new
monitor.path '/some/directory/' do
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
monitor.run







