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-0.10.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.10.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.9.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.8.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.8.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.8.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.7.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.7.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.7.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.6.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.5.5 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.5.4 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.5.3 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.5.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.5.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.5.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.4.2 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.4.1 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.4.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb
pact-mock_service-0.3.0 lib/pact/mock_service/control_server/require_pacticipant_headers.rb