Sha256: f48582f29eebc954566d4bbe6ec440fe3732022b89bf92ce7cab9ff81d364b95

Contents?: true

Size: 485 Bytes

Versions: 126

Compression:

Stored size: 485 Bytes

Contents

require 'pact_broker/version'

module Rack
  module PactBroker
    class AddPactBrokerVersionHeader

      X_PACT_BROKER_VERSION = 'X-Pact-Broker-Version'.freeze

      def initialize app
        @app = app
      end

      def call env
        response = @app.call(env)
        [response[0], add_version_header(response[1]), response[2]]
      end

      def add_version_header headers
        headers.merge(X_PACT_BROKER_VERSION => ::PactBroker::VERSION)
      end
    end
  end
end

Version data entries

126 entries across 126 versions & 1 rubygems

Version Path
pact_broker-2.65.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.64.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.63.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.62.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.61.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.60.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.60.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.59.2 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.59.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.59.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.58.3 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.58.2 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.58.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.57.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.56.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.56.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.55.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.54.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.53.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.52.2 lib/rack/pact_broker/add_pact_broker_version_header.rb