Class: PactBroker::UI::App

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/ui/app.rb

Instance Method Summary collapse

Constructor Details

#initializeApp

Returns a new instance of App.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/pact_broker/ui/app.rb', line 28

def initialize
  @app = ::Rack::Builder.new do

    map "/ui/relationships" do
      run PactBroker::UI::Controllers::Index
    end

    map "/pacticipants" do
      run PactBroker::UI::Controllers::Groups
    end

    map "/doc" do
      run PactBroker::Doc::Controllers::App
    end

    map "/matrix" do
      use PathInfoFixer
      run PactBroker::UI::Controllers::Matrix
    end

    map "/pacticipants/" do
      use PathInfoFixer
      run PactBroker::UI::Controllers::CanIDeploy
    end

    map "/pacts/" do
      use PathInfoFixer
      run PactBroker::UI::Controllers::Pacts
    end

    map "/test/error" do
      use PathInfoFixer
      run PactBroker::UI::Controllers::ErrorTest
    end

    map "/dashboard" do
      use PathInfoFixer
      run PactBroker::UI::Controllers::Dashboard
    end

    map "/" do
      use PathInfoFixer
      run PactBroker::UI::Controllers::Index
    end
  end
end

Instance Method Details

#call(env) ⇒ Object



75
76
77
# File 'lib/pact_broker/ui/app.rb', line 75

def call env
  @app.call(env)
end