Class: Gitgo::Server

Inherits:
Rack::Server
  • Object
show all
Defined in:
lib/gitgo/server.rb

Overview

Only for use by bin/gitgo; config.ru should be constructed differently to accomodate sessions.

Instance Method Summary collapse

Instance Method Details

#appObject



28
29
30
31
32
33
34
35
# File 'lib/gitgo/server.rb', line 28

def app
  # set the controller environment; this should propagate to
  # all the gitgo controllers + app
  Controller.set(:environment, options[:environment].to_sym)
  
  repo = Repo.init(options[:repo], options)
  Session.new(App, Repo::REPO => repo, Controller::MOUNT => options[:mount])
end

#default_optionsObject



37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/gitgo/server.rb', line 37

def default_options
  {
    :environment => "development",
    :pid         => nil,
    :Port        => 8080,
    :Host        => "0.0.0.0",
    :AccessLog   => [],
    
    # gitgo-specific
    :repo        => ".",
    :branch      => "gitgo",
    :mount       => nil
  }
end