Sha256: cf0a3875661c58e33ca6ee92348cd00cc146f525156b92bc6456f95aab181184

Contents?: true

Size: 488 Bytes

Versions: 81

Compression:

Stored size: 488 Bytes

Contents

module Pact
  module MockService
    module ControlServer
      class RequirePacticipantHeaders

        def initialize app
          @app = app
        end

        def call env
          if env['HTTP_X_PACT_CONSUMER'] && env['HTTP_X_PACT_PROVIDER']
            @app.call(env)
          else
            [500, {}, ["Please specify the consumer name and the provider name by setting the X-Pact-Consumer and X-Pact-Provider headers"]]
          end
        end
      end
    end
  end
end

Version data entries

81 entries across 81 versions & 2 rubygems

Version Path
pact-mock_service-3.12.3 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.12.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.12.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.12.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.11.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.11.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.11.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.10.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
hs-pact-mock_service-3.9.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.9.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.9.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.8.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.7.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.6.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.6.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.6.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.5.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.4.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.3.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-3.3.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb