Sha256: 40f995e6d43a4633671ac9c9c4c97199f4970a791c70126ff9cdca0fe632936e

Contents?: true

Size: 904 Bytes

Versions: 1

Compression:

Stored size: 904 Bytes

Contents

# -*- encoding : utf-8 -*-

require 'thread'
require 'dante'
require 'socket'
require 'shell_tools'
require 'guard'
require 'grit'
require 'rugged'
require 'table_print'

require 'gitdocs/version'
require 'gitdocs/configuration'
require 'gitdocs/runner'
require 'gitdocs/server'
require 'gitdocs/cli'
require 'gitdocs/manager'
require 'gitdocs/rendering'
require 'gitdocs/notifier'
require 'gitdocs/repository'
require 'gitdocs/repository/path'
require 'gitdocs/search'

module Gitdocs
  DEBUG = ENV['DEBUG']

  # Gitdocs.start(:config_root => "...", :debug => true)
  def self.start(options = {}, &blk)
    options = { debug: DEBUG, config_root: nil }.merge(options)
    @manager.stop if @manager
    @manager = Manager.new(options[:config_root], options[:debug], &blk)
    @manager.start(options[:port])
  end

  def self.restart
    @manager.restart
  end

  def self.stop
    @manager.stop
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitdocs-0.5.0.pre7 lib/gitdocs.rb