class Object

Public Instance Methods

pact_provider_request_headers_method_found() click to toggle source
# File lib/pact/provider_verifier/underscored_headers_monkeypatch.rb, line 23
def pact_provider_request_headers_method_found
  begin
    Pact::Provider::Request::Replayable.instance_method(:headers)
    true
  rescue NameError
    Pact.configuration.error_stream.puts "WARN: Could not find the Pact::Provider::Request::Replayable#headers method. The implementation must have changed. Cannot monkey patch the aforementioned method to ensure any underscores are retained in header names. You can ignore this warning if you use normal dasherized headers."
    false
  end
end
rack_reverse_proxy_headers_method_found() click to toggle source
# File lib/pact/provider_verifier/underscored_headers_monkeypatch.rb, line 13
def rack_reverse_proxy_headers_method_found
  begin
    RackReverseProxy::RoundTrip.instance_method(:headers)
    true
  rescue NameError
    Pact.configuration.error_stream.puts "WARN: Could not find the RackReverseProxy::RoundTrip#headers method. The implementation must have changed. Cannot monkey patch the aforementioned method to ensure any underscores are retained in header names. You can ignore this warning if you use normal dasherized headers."
    false
  end
end