diff --git a/lib/pact/provider/verification_results/publish.rb b/lib/pact/provider/verification_results/publish.rb index dff411fc..e424c199 100644 --- a/lib/pact/provider/verification_results/publish.rb +++ b/lib/pact/provider/verification_results/publish.rb @@ -107,7 +107,7 @@ def publish_verification_results if response.code.start_with?("2") new_resource_url = JSON.parse(response.body)['_links']['self']['href'] - $stdout.puts "INFO: Verification results published to #{new_resource_url}" + Pact.configuration.output_stream.puts "INFO: Verification results published to #{new_resource_url}" else raise PublicationError.new("Error returned from verification results publication #{response.code} #{response.body}") end diff --git a/lib/pact/tasks/task_helper.rb b/lib/pact/tasks/task_helper.rb index 92673379..47ec3a9c 100644 --- a/lib/pact/tasks/task_helper.rb +++ b/lib/pact/tasks/task_helper.rb @@ -1,3 +1,4 @@ +require 'pact/configuration' require 'pact/provider/pact_helper_locator' require 'rake/file_utils' require 'shellwords' @@ -36,7 +37,7 @@ def verify_command pact_helper, pact_uri, rspec_opts end def execute_cmd command - $stdout.puts command + Pact.configuration.output_stream.puts command temporarily_set_env_var 'PACT_EXECUTING_LANGUAGE', 'ruby' do temporarily_set_env_var 'PACT_INTERACTION_RERUN_COMMAND', PACT_INTERACTION_RERUN_COMMAND do exit_status = system(command) ? 0 : 1