stripe 5.41.0 → 5.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe/connection_manager.rb +22 -1
- data/lib/stripe/stripe_client.rb +12 -5
- data/lib/stripe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59ec737c599289ebecd1ba030eadd9a2ae4ab262f1495d1de5a5ed4757cc542a
|
4
|
+
data.tar.gz: dbc4cbf84351eec5c7fb641db3b00cf8b92b2605aedb8efc266733238cad4f6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08f077d4f908041fea497c83eb105713e3d324d39ff037067de53a4bc3f0d8bb9ba84f0c13d873c4b0a86d1d04345974ef67bb1a3051c53616368bd74f86c385'
|
7
|
+
data.tar.gz: 8cd83d8c0568b831e3aa17d74aa7ae81396215c98e0978f0c4ec930cd437f7d3784a9be4cce33f82454f6801607a38be9792aef0ec0242770094f059e368343f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.42.0 - 2021-12-13
|
4
|
+
* [#1022](https://github.com/stripe/stripe-ruby/pull/1022) Add connection manager logging and include object IDs in logging.
|
5
|
+
|
3
6
|
## 5.41.0 - 2021-11-16
|
4
7
|
* [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
|
5
8
|
* Add support for new resource `ShippingRate`
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.
|
1
|
+
5.42.0
|
@@ -103,13 +103,34 @@ module Stripe
|
|
103
103
|
headers
|
104
104
|
)
|
105
105
|
|
106
|
-
|
106
|
+
Util.log_debug("ConnectionManager starting request",
|
107
|
+
method_name: method_name,
|
108
|
+
path: path,
|
109
|
+
process_id: Process.pid,
|
110
|
+
thread_object_id: Thread.current.object_id,
|
111
|
+
connection_manager_object_id: object_id,
|
112
|
+
connection_object_id: connection.object_id,
|
113
|
+
log_timestamp: Util.monotonic_time)
|
114
|
+
|
115
|
+
resp = @mutex.synchronize do
|
107
116
|
# The block parameter is special here. If a block is provided, the block
|
108
117
|
# is invoked with the Net::HTTPResponse. However, the body will not have
|
109
118
|
# been read yet in the block, and can be streamed by calling
|
110
119
|
# HTTPResponse#read_body.
|
111
120
|
connection.request(request, body, &block)
|
112
121
|
end
|
122
|
+
|
123
|
+
Util.log_debug("ConnectionManager request complete",
|
124
|
+
method_name: method_name,
|
125
|
+
path: path,
|
126
|
+
process_id: Process.pid,
|
127
|
+
thread_object_id: Thread.current.object_id,
|
128
|
+
connection_manager_object_id: object_id,
|
129
|
+
connection_object_id: connection.object_id,
|
130
|
+
response_object_id: resp.object_id,
|
131
|
+
log_timestamp: Util.monotonic_time)
|
132
|
+
|
133
|
+
resp
|
113
134
|
end
|
114
135
|
|
115
136
|
#
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -585,7 +585,7 @@ module Stripe
|
|
585
585
|
handle_error_response(resp, context)
|
586
586
|
end
|
587
587
|
|
588
|
-
log_response(context, request_start, http_status, resp.body)
|
588
|
+
log_response(context, request_start, http_status, resp.body, resp)
|
589
589
|
notify_request_end(context, request_duration, http_status,
|
590
590
|
num_retries, user_data)
|
591
591
|
|
@@ -609,7 +609,7 @@ module Stripe
|
|
609
609
|
error_context = context.dup_from_response_headers(e.http_headers)
|
610
610
|
http_status = resp.code.to_i
|
611
611
|
log_response(error_context, request_start,
|
612
|
-
e.http_status, e.http_body)
|
612
|
+
e.http_status, e.http_body, resp)
|
613
613
|
else
|
614
614
|
log_response_error(error_context, request_start, e)
|
615
615
|
end
|
@@ -903,10 +903,13 @@ module Stripe
|
|
903
903
|
body: context.body,
|
904
904
|
idempotency_key: context.idempotency_key,
|
905
905
|
query: context.query,
|
906
|
-
config: config
|
906
|
+
config: config,
|
907
|
+
process_id: Process.pid,
|
908
|
+
thread_object_id: Thread.current.object_id,
|
909
|
+
log_timestamp: Util.monotonic_time)
|
907
910
|
end
|
908
911
|
|
909
|
-
private def log_response(context, request_start, status, body)
|
912
|
+
private def log_response(context, request_start, status, body, resp)
|
910
913
|
Util.log_info("Response from Stripe API",
|
911
914
|
account: context.account,
|
912
915
|
api_version: context.api_version,
|
@@ -921,7 +924,11 @@ module Stripe
|
|
921
924
|
body: body,
|
922
925
|
idempotency_key: context.idempotency_key,
|
923
926
|
request_id: context.request_id,
|
924
|
-
config: config
|
927
|
+
config: config,
|
928
|
+
process_id: Process.pid,
|
929
|
+
thread_object_id: Thread.current.object_id,
|
930
|
+
response_object_id: resp.object_id,
|
931
|
+
log_timestamp: Util.monotonic_time)
|
925
932
|
|
926
933
|
return unless context.request_id
|
927
934
|
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.42.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
14
14
|
for details.
|