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.79.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.79.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.78.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.78.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.77.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.76.2 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.76.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.76.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.75.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.74.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.74.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.73.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.72.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.71.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.70.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.69.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.68.1 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.68.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.67.0 lib/rack/pact_broker/add_pact_broker_version_header.rb
pact_broker-2.66.0 lib/rack/pact_broker/add_pact_broker_version_header.rb