Class: Pact::MockService::RequestHandlers::App

Inherits:
Rack::Cascade
  • Object
show all
Defined in:
lib/pact/mock_service/request_handlers.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, logger, session, options) ⇒ App

Returns a new instance of App.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/pact/mock_service/request_handlers.rb', line 24

def initialize name, logger, session, options
  super [
    Options.new(name, logger, options[:cors_enabled]),
    SessionDelete.new(name, logger, session),
    MissingInteractionsGet.new(name, logger, session),
    VerificationGet.new(name, logger, session),
    InteractionPost.new(name, logger, session, Pact::SpecificationVersion.new(options.fetch(:pact_specification_version))),
    InteractionsPut.new(name, logger, session, Pact::SpecificationVersion.new(options.fetch(:pact_specification_version))),
    InteractionDelete.new(name, logger, session),
    LogGet.new(name, logger),
    PactPost.new(name, logger, session),
    IndexGet.new(name, logger),
    InteractionReplay.new(name, logger, session, options[:cors_enabled], options[:stub_pactfile_paths])
  ]
end