in scripts/docserver.rb [37:64]
def start_non_blocking
return if @listener
options = {
latency: 1.0,
wait_for_delay: 1.0
}
@listener = Listen.to(*@listen_paths.to_a, options) do |modified, added, removed|
changed = modified + added + removed
changed.each do |path|
pathname = Pathname.new(path).realpath
loop do
if @watch_paths.include?(pathname.to_s)
@block.call
break
end
break if pathname.root?
pathname = pathname.parent
end
end
end
@listener.start
end