Skip to content

Commit 1f5577d

Browse files
committed
add ruby and http lib version to user agent
1 parent 62f9b27 commit 1f5577d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Added the processor `:shopify_payments` to `Minfraud::Components::Payment`.
66
* Added the processor `:google_pay` to `Minfraud::Components::Payment`.
77
* Added the processor `:placetopay` to `Minfraud::Components::Payment`.
8+
* In addition to the minfraud gem version, the User-Agent now includes the
9+
version of Ruby and the version of the HTTP client in all HTTP requests.
810

911
## v2.2.0 (2022-03-28)
1012

lib/minfraud.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ def configure
7070

7171
private
7272

73+
7374
def make_http_client
7475
HTTP.basic_auth(
7576
user: @account_id,
7677
pass: @license_key,
7778
).headers(
7879
accept: 'application/json',
79-
user_agent: "minfraud-api-ruby/#{Minfraud::VERSION}",
80+
user_agent: "minfraud-api-ruby/#{Minfraud::VERSION} ruby/#{RUBY_VERSION} http/#{HTTP::VERSION}",
8081
)
8182
end
8283
end

0 commit comments

Comments
 (0)