lib/gitdocs.rb in gitdocs-0.1.1 vs lib/gitdocs.rb in gitdocs-0.1.2
- old
+ new
@@ -8,17 +8,21 @@
require 'growl'
require 'yajl'
require 'dante'
module Gitdocs
- def self.run(config_root = nil)
+ def self.run(config_root = nil, debug=false)
loop do
@config = Configuration.new(config_root)
+ puts "Using configuration root: '#{@config.config_root}'" if debug
+ puts "Watch paths: #{@config.paths.join(", ")}" if debug
@threads = @config.paths.map do |path|
t = Thread.new { Runner.new(path).run }
t.abort_on_exception = true
t
end
+ puts "Watch threads: #{@threads.map { |t| "Thread status: '#{t.status}', running: #{t.alive?}" }}" if debug
+ puts "Joined #{@threads.size} watch threads...running" if debug
@threads.each(&:join)
sleep(60)
end
end
end