Permalink
Browse files

Merge pull request #16424 from gregors/remove_dead_code

remove dead file_watcher code
  • Loading branch information...
rafaelfranca committed Aug 7, 2014
2 parents 399f5f6 + 6c9669e commit 42c569e71eb587d6f375b209d354cc1075ca6817
Showing with 0 additions and 36 deletions.
  1. +0 −36 activesupport/lib/active_support/file_watcher.rb
@@ -1,36 +0,0 @@
-module ActiveSupport
- class FileWatcher
- class Backend
- def initialize(path, watcher)
- @watcher = watcher
- @path = path
- end
-
- def trigger(files)
- @watcher.trigger(files)
- end
- end
-
- def initialize
- @regex_matchers = {}
- end
-
- def watch(pattern, &block)
- @regex_matchers[pattern] = block
- end
-
- def trigger(files)
- trigger_files = Hash.new { |h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } }
-
- files.each do |file, state|
- @regex_matchers.each do |pattern, block|
- trigger_files[block][state] << file if pattern === file
- end
- end
-
- trigger_files.each do |block, payload|
- block.call payload
- end
- end
- end
-end

0 comments on commit 42c569e

Please sign in to comment.