From ebce481242edb883de6961a9b7fed43daaef065f Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 20 May 2019 15:14:57 +1000 Subject: [PATCH] fix: allow proxy env var to be used when fetching pacts Closes: https://github.com/pact-foundation/pact-support/issues/66 --- lib/pact/consumer_contract/pact_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pact/consumer_contract/pact_file.rb b/lib/pact/consumer_contract/pact_file.rb index 4288d0d..8e32201 100644 --- a/lib/pact/consumer_contract/pact_file.rb +++ b/lib/pact/consumer_contract/pact_file.rb @@ -81,7 +81,7 @@ def get_remote(uri, options) request = Net::HTTP::Get.new(uri) request.basic_auth(options[:username], options[:password]) if options[:username] request['Authorization'] = "Bearer #{options[:token]}" if options[:token] - Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http| + Net::HTTP.start(uri.host, uri.port, :ENV, use_ssl: uri.scheme == 'https') do |http| http.open_timeout = options[:open_timeout] || OPEN_TIMEOUT http.read_timeout = options[:read_timeout] || READ_TIMEOUT http.request(request)