0.0
No commit activity in last 3 years
No release in over 3 years
Use inotify to watch for file system modifcations and take a configured action.'
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.0.4
>= 1.4.3
= 0.8.4
 Project Readme

Overview

file-watcher wraps some configuration around Ruby’s INotify library to allow configurable actions to be taken upon notification.

Usage

  user@host ~$ watcher -?? -??

Watcher Configuration

class ExampleWatch  < WatchJob
  
  new_watch_job do |watch_job|
    watch_job.watch_criteria = {
      :events => [:create],
      :file_glob => /.trigger$/,
      :target_dir  => "/tmp"
    }

    watch_job.watch_action =
      {:http =>
        {:method       => :post,
          :hostname    => "example.server.com",
          :port        => "443",
          :auth_user   => "username",
          :auth_pass   => "password",
          :uri         => "/some/http/interface",
          :ssl         => true,
          :body        => {:some => "form", :paramters => "expected", :by => "the target to be triggered"}
    }}
  end
end

Supported Watch Actions

Currently only a post over http is supported.

Authors

Josh m’fin Crean

Paul The Heart Santa Clara

Kylebot is watching you

License