Sha256: 45917eab23143d770c696ed0d9412b4fa6d3618b66ffd2aee8e7db648a292814
Contents?: true
Size: 910 Bytes
Versions: 3
Compression:
Stored size: 910 Bytes
Contents
require 'gitdocs/version' require 'gitdocs/configuration' require 'gitdocs/runner' require 'gitdocs/server' require 'gitdocs/cli' require 'thread' require 'rb-fsevent' require 'growl' require 'yajl' require 'dante' module Gitdocs def self.run(config_root = nil, debug=false) loop do @config = Configuration.new(config_root) puts "Gitdocs v#{VERSION}" if debug 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
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gitdocs-0.1.5 | lib/gitdocs.rb |
gitdocs-0.1.4 | lib/gitdocs.rb |
gitdocs-0.1.3 | lib/gitdocs.rb |