easypost 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/easypost/connection.rb +3 -2
- 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: 80b21caf35b36c26582451d01113e423da031f0a8dd4ab3e86bc02e40113f2ef
|
4
|
+
data.tar.gz: adc284c07d8e9f8650bbbbba486997b6c252d364f489982e9cc2b41af1a822a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d771d5798aefff39d456db171bf206db492c90b0bdbb8bbf8471d7112de25ec5ce433c7f8c73f90f6c14bc9b55d0af5016677ba3a70c5d053e5fdeb496da214
|
7
|
+
data.tar.gz: 74ed0c9883907b041c05baf185644be0db456c1350fb08db63071b5188b5391260d1be6d1f4851e430d587c79de6fd32ec3653c28f7699b630680bdcb63e1c44
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.1.
|
1
|
+
4.1.1
|
data/lib/easypost/connection.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
EasyPost::Connection = Struct.new(:uri, :config, keyword_init: true) do
|
4
|
-
attr_reader :connection
|
4
|
+
attr_reader :connection, :mutex
|
5
5
|
|
6
6
|
def initialize(uri:, config:)
|
7
7
|
super
|
8
8
|
|
9
|
+
@mutex = Mutex.new
|
9
10
|
@connection =
|
10
11
|
if config[:proxy]
|
11
12
|
proxy_uri = URI(config[:proxy])
|
@@ -56,7 +57,7 @@ EasyPost::Connection = Struct.new(:uri, :config, keyword_init: true) do
|
|
56
57
|
EasyPost.default_headers.each_pair { |h, v| request[h] = v }
|
57
58
|
request['Authorization'] = EasyPost.authorization(api_key) if api_key
|
58
59
|
|
59
|
-
response = connection.request(request)
|
60
|
+
response = mutex.synchronize { connection.request(request) }
|
60
61
|
|
61
62
|
EasyPost.parse_response(
|
62
63
|
status: response.code.to_i,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- EasyPost Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|