Sha256: 85e6f1fe91d7fddc3d274c306b0ede50d243486c8404f4d6c74b34d60cce006c
Contents?: true
Size: 830 Bytes
Versions: 34
Compression:
Stored size: 830 Bytes
Contents
require "pact_broker/logging" module PactBroker module Api module Middleware class Configuration include PactBroker::Logging def initialize(app, configuration) @app = app @configuration = configuration end def call(env) if (overrides = env["pactbroker.configuration_overrides"])&.any? dupped_configuration = configuration.dup dupped_configuration.override_runtime_configuration!(overrides) dupped_configuration.freeze PactBroker.set_configuration(dupped_configuration) app.call(env) else PactBroker.set_configuration(configuration) app.call(env) end end private attr_reader :app, :configuration end end end end
Version data entries
34 entries across 34 versions & 1 rubygems