lib/pact/cli/run_pact_verification.rb in pact-1.6.0 vs lib/pact/cli/run_pact_verification.rb in pact-1.7.0

- old
+ new

@@ -51,10 +51,14 @@ end exit exit_code end def run_with_pact_uri - Pact::Provider::PactSpecRunner.new([options[:pact_uri]], pact_spec_options).run + pact_repository_uri_options = {} + pact_repository_uri_options[:username] = options[:pact_broker_username] if options[:pact_broker_username] + pact_repository_uri_options[:password] = options[:pact_broker_password] if options[:pact_broker_password] + pact_uri = ::Pact::Provider::PactURI.new(options[:pact_uri], pact_repository_uri_options) + Pact::Provider::PactSpecRunner.new([pact_uri], pact_spec_options).run end def run_with_configured_pacts pact_urls = Pact.provider_world.pact_urls raise "Please configure a pact to verify" if pact_urls.empty?