class Lookbook::EventedFileUpdateChecker
def changed(modified, added, removed)
def changed(modified, added, removed) super Engine.files_changed(modified, added, removed) if updated? end
def initialize(files, dirs = {}, &block)
def initialize(files, dirs = {}, &block) super @core = Core.new(files, dirs) end
def watching?(file)
Patched to handle regex-style
def watching?(file) return true if super file = Pathname(file) name_parts = file.basename.to_s.split(".") ext = "." + name_parts.drop(1).join(".").to_s file.dirname.ascend do |dir| matching = @dirs.fetch(dir, []).map { |m| Regexp.new(m) } if matching.empty? || matching.find { |m| m.match?(ext) } break true elsif dir == @lcsp || dir.root? break false end end end