Sha256: 6ec3a9d52ca3ad3e0fb890a15dd4ab8973006ad1ba4c0623e52ff4bfe4fca5b6

Contents?: true

Size: 310 Bytes

Versions: 17

Compression:

Stored size: 310 Bytes

Contents

module Rack
  module PactBroker
    class StoreBaseURL
      def initialize app
        @app = app
      end

      def call(env)
        Thread.current[:pact_broker_thread_data].base_url ||= (ENV['PACT_BROKER_BASE_URL'] || ::Rack::Request.new(env).base_url)
        @app.call(env)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pact_broker-2.45.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.44.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.43.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.42.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.41.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.40.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.39.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.38.1 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.38.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.37.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.36.1 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.36.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.35.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.34.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.33.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.32.0 lib/rack/pact_broker/store_base_url.rb
pact_broker-2.31.0 lib/rack/pact_broker/store_base_url.rb