Module: CheckFiles

Defined in:
lib/check_files.rb,
lib/check_files/checker.rb,
lib/check_files/railtie.rb,
lib/check_files/version.rb,
lib/check_files/middleware.rb,
lib/check_files/notifiers/logging.rb,
lib/check_files/notifiers/restart.rb,
lib/check_files/notifiers/exception.rb

Defined Under Namespace

Modules: Notifiers Classes: Checker, Middleware, Railtie

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.check!Object



27
28
29
30
# File 'lib/check_files.rb', line 27

def self.check!
  change = checkers.find(&:changed?)
  config.notifier.call(change) if change
end

.checkersObject



19
20
21
# File 'lib/check_files.rb', line 19

def self.checkers
  @checkers ||= config.paths.map {|path| Checker.new(path) }
end

.configObject



15
16
17
# File 'lib/check_files.rb', line 15

def self.config
  Rails.application.config.check_files
end

.resetObject



23
24
25
# File 'lib/check_files.rb', line 23

def self.reset
  @checkers = nil
end