Skip to content

Commit e0ea0ac

Browse files
committed
chore: set user-agent
Signed-off-by: JP-Ellis <josh@jpellis.me>
1 parent bce3203 commit e0ea0ac

5 files changed

Lines changed: 8 additions & 0 deletions

File tree

packaging/pact-broker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
$stderr.puts "WARN: This CLI is deprecated and no longer receiving updates. We recommend you upgrade to the latest CLI: https://docs.pact.io/implementation_guides/cli" unless ENV['PACT_DISABLE_DEPRECATION_WARNINGS'] == 'true'
22

33
require 'pact_broker/client/cli/broker'
4+
require_relative 'pact_standalone_user_agent'
45

56
if ENV['PACT_BROKER_DISABLE_SSL_VERIFICATION'] == 'true' || ENV['PACT_DISABLE_SSL_VERIFICATION'] == 'true'
67
require 'openssl'

packaging/pact-provider-verifier.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
end
1919

2020
require 'pact/provider_verifier/cli/verify'
21+
require_relative 'pact_standalone_user_agent'
2122

2223
class Thor
2324
module Base
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PACT_STANDALONE_VERSION = File.read(File.join(__dir__, 'VERSION')).strip
2+
3+
require 'pact_broker/client/user_agent'
4+
PactBroker::Client.tool_identifier = "pact-standalone/#{PACT_STANDALONE_VERSION}"

packaging/pactflow.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
$stderr.puts "WARN: This CLI is deprecated and no longer receiving updates. We recommend you upgrade to the latest CLI: https://docs.pact.io/implementation_guides/cli" unless ENV['PACT_DISABLE_DEPRECATION_WARNINGS'] == 'true'
22

33
require 'pactflow/client/cli/pactflow'
4+
require_relative 'pact_standalone_user_agent'
45

56
class Thor
67
module Base

tasks/package.rake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def create_package(version, source_target, package_target, os_type)
104104
sh "mkdir -p #{package_dir}/bin"
105105
sh "cp build/README.md #{package_dir}"
106106
sh "cp packaging/pact*.rb #{package_dir}/lib/app"
107+
sh "cp VERSION #{package_dir}/lib/app/"
107108

108109
# sh "cp -pR lib #{package_dir}/lib/app"
109110
sh "mkdir #{package_dir}/lib/ruby"

0 commit comments

Comments
 (0)