Sha256: a0f9fe2dd8b6419b58837e3ea0ea1b6c39533aae7ad460c19a02f255d9440b3b

Contents?: true

Size: 412 Bytes

Versions: 28

Compression:

Stored size: 412 Bytes

Contents

module FSSM::Backends
  class Inotify
    def initialize
      @notifier = INotify::Notifier.new
    end

    def add_handler(handler, preload=true)
      @notifier.watch(handler.path.to_s, :all_events) do |event|
        handler.refresh(event.name)
      end

      handler.refresh(nil, true) if preload
    end

    def run
      begin
        @notifier.run
      rescue Interrupt
      end
    end

  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
compass-0.11.alpha.3 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.11.alpha.1 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.11.alpha.0 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.6 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.6.pre.1 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.5 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.5.pre.1 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.4 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.4.pre.4 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.4.pre.3 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.4.pre.2 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.3 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.3.pre.1 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.2 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.1 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.rc6 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.rc5 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.rc4 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.rc3 lib/vendor/fssm/fssm/backends/inotify.rb