active_utils 3.5.0 → 3.6.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/.github/dependabot.yml +4 -0
- data/.github/workflows/.github/workflows/dependabot_auto_merge.yml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/CHANGELOG.md +34 -0
- data/Gemfile.lock +8 -8
- data/lib/active_utils/network_connection_retries.rb +2 -1
- data/lib/active_utils/version.rb +1 -1
- data/test/unit/network_connection_retries_test.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 573d4f872e7eb4088934db0121c99539f8e904c5e238f86cf75c80efdf5a6024
|
4
|
+
data.tar.gz: 83ba430d4ed0202d8676aeb88da792b3d063f8e1af8f20fc2e727ed0fce538de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 321c201934f5528369b2b7d9266aa372ecb37b04413f6b49c3c2cd8da810d4831473d6279bff890b12eb5b967a44591ac01679bd749da1d12e7696a53a97c6da
|
7
|
+
data.tar.gz: fe0f4497ba31a54aa6788c21f1e82484c0b4ca40a5591733520a181cef04f63d15ac7611b75a1dcd4253edfec144ce6d6edb9b6fc2635f1c4f87e8e4aab0acae
|
data/.github/dependabot.yml
CHANGED
@@ -11,6 +11,10 @@ registries:
|
|
11
11
|
username: ${{secrets.DEPENDENCIES_GITHUB_USER}}
|
12
12
|
password: ${{secrets.DEPENDENCIES_GITHUB_TOKEN}}
|
13
13
|
updates:
|
14
|
+
- package-ecosystem: github-actions
|
15
|
+
directory: "/"
|
16
|
+
schedule:
|
17
|
+
interval: weekly
|
14
18
|
- package-ecosystem: bundler
|
15
19
|
directory: "/"
|
16
20
|
schedule:
|
@@ -8,7 +8,7 @@ jobs:
|
|
8
8
|
steps:
|
9
9
|
- name: Dependabot metadata
|
10
10
|
id: metadata
|
11
|
-
uses: dependabot/fetch-metadata@v1.6.0
|
11
|
+
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # v1.6.0
|
12
12
|
with:
|
13
13
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
14
14
|
|
@@ -16,7 +16,7 @@ jobs:
|
|
16
16
|
id: check_ci_failure
|
17
17
|
continue-on-error: true
|
18
18
|
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.dependency-group == 'auto_merge' }}
|
19
|
-
uses: actions/github-script@v6
|
19
|
+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
|
20
20
|
with:
|
21
21
|
script: |
|
22
22
|
function sleep(ms) {
|
@@ -62,7 +62,7 @@ jobs:
|
|
62
62
|
core.setOutput("ci_state", ci_state)
|
63
63
|
- name: Send Slack notification if auto-merge failed
|
64
64
|
if: ${{ steps.check_ci_failure.outputs.ci_state == 'false' }}
|
65
|
-
uses: ruby/action-slack@v3.0.0
|
65
|
+
uses: ruby/action-slack@b6882ea6ef8f556f9f9af9ec1220d3f1ced74acf # v3.0.0
|
66
66
|
with:
|
67
67
|
payload: |
|
68
68
|
{
|
@@ -77,7 +77,7 @@ jobs:
|
|
77
77
|
|
78
78
|
- name: Approve and merge
|
79
79
|
if: ${{ steps.check_ci_failure.outputs.ci_state == 'true' && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.dependency-group == 'auto_merge') }}
|
80
|
-
uses: actions/github-script@v6
|
80
|
+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
|
81
81
|
with:
|
82
82
|
script: |
|
83
83
|
await github.rest.pulls.createReview({
|
data/.github/workflows/ci.yml
CHANGED
@@ -14,9 +14,9 @@ jobs:
|
|
14
14
|
matrix:
|
15
15
|
version: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]
|
16
16
|
steps:
|
17
|
-
- uses: actions/checkout@v4
|
17
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
18
18
|
- name: Set up Ruby ${{ matrix.version }}
|
19
|
-
uses: ruby/setup-ruby@v1
|
19
|
+
uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # v1.238.0
|
20
20
|
with:
|
21
21
|
ruby-version: ${{ matrix.version }}
|
22
22
|
bundler-cache: true
|
data/CHANGELOG.md
CHANGED
@@ -1,97 +1,131 @@
|
|
1
1
|
# ActiveUtils changelog
|
2
2
|
|
3
|
+
### Version 3.6.0 (September 15, 2025)
|
4
|
+
|
5
|
+
- Catch and raise `Errno::ENETUNREACH` syscall errors as `ActiveUtils::ConnectionError`
|
6
|
+
|
3
7
|
### Version 3.5.0 (February 04, 2025)
|
8
|
+
|
4
9
|
- Catch and raise `EHOSTUNREACH` and `EADDRNOTAVAIL` syscall errors as `ActiveUtils::ConnectionError`
|
5
10
|
|
6
11
|
### Version 3.4.2 (January 15, 2025)
|
12
|
+
|
7
13
|
- Remove numeric as a required param for `ActiveUtils::Country`
|
8
14
|
|
9
15
|
### Version 3.4.1 (APril 04, 2023)
|
16
|
+
|
10
17
|
- Fix depracated deprecated calling of `=~` on Object which is removed by ruby 3.2.0 as described here: https://bugs.ruby-lang.org/issues/15231
|
11
18
|
|
12
19
|
### Version 3.4.0 (February 23, 2022)
|
20
|
+
|
13
21
|
- Add AC and TA to `ActiveUtils::Country::COUNTRIES`
|
14
22
|
|
15
23
|
### Version 3.3.19 (February 24, 2020)
|
24
|
+
|
16
25
|
- Support `net/http` default proxy settings from `ENV['http_proxy']`
|
17
26
|
- Support usage of custom ssl certificate with `ENV['SSL_CERT_FILE']`, default variable for Ruby
|
18
27
|
|
19
28
|
### Version 3.3.17 (February 24, 2020)
|
29
|
+
|
20
30
|
- Add support for PATCH HTTP method in `ActiveUtils#Connection`
|
21
31
|
|
22
32
|
### Version 3.3.16 (December 18, 2018)
|
33
|
+
|
23
34
|
- Add `VU` to `ActiveUtils::Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES`
|
24
35
|
|
25
36
|
### Version 3.3.15 (November 29, 2018)
|
37
|
+
|
26
38
|
- Remove support to Ruby 1.9 and ActiveSupport `< 4`
|
27
39
|
- Remove the upperbound constraint on ActiveSupport
|
28
40
|
|
29
41
|
### Version 3.3.14 (November 28, 2018)
|
42
|
+
|
30
43
|
- Add `MW` to `ActiveUtils::Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES`
|
31
44
|
|
32
45
|
### Version 3.3.13 (November 26, 2018)
|
46
|
+
|
33
47
|
- Add support for custom retriable exceptions in `NetworkConnectionRetries#retry_exceptions`
|
34
48
|
|
35
49
|
### Version 3.3.12 (July 11, 2018)
|
50
|
+
|
36
51
|
- Update CA bundle
|
37
52
|
|
38
53
|
### Version 3.3.11 (March 14, 2018)
|
54
|
+
|
39
55
|
- Add the DigiCert Global Root G2 to the CA bundle
|
40
56
|
|
41
57
|
### Version 3.3.10 (February 28, 2018)
|
58
|
+
|
42
59
|
- Support ActiveSupport 5.2
|
43
60
|
|
44
61
|
### Version 3.3.9 (September 28, 2017)
|
62
|
+
|
45
63
|
- Add remaining currencies to `ActiveUtils::CurrencyCode::ISO_CURRENCIES`
|
46
64
|
- Update bundler in `travis.yml`
|
47
65
|
|
48
66
|
### Version 3.3.8 (August 15, 2017)
|
67
|
+
|
49
68
|
- Add `BO` to `ActiveUtils::Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES`
|
50
69
|
|
51
70
|
### Version 3.3.7 (June 26, 2017)
|
71
|
+
|
52
72
|
- Add `CVE` to `ActiveUtils::CurrencyCode::ISO_CURRENCIES`
|
53
73
|
|
54
74
|
### Version 3.3.6 (May 23, 2017)
|
75
|
+
|
55
76
|
- Add `South Sudan` country in `ActiveUtils::Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES`
|
56
77
|
|
57
78
|
### Version 3.3.5 (May 18, 2017)
|
79
|
+
|
58
80
|
- Add `South Sudan` and `Antarctica` countries in `ActiveUtils::Country::COUNTRIES`
|
59
81
|
|
60
82
|
### Version 3.3.4 (Apr. 18, 2017)
|
83
|
+
|
61
84
|
- Add `Ghana` country in `ActiveUtils::Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES`
|
62
85
|
|
63
86
|
### Version 3.3.3 (Apr. 7, 2017)
|
87
|
+
|
64
88
|
- Add the `Aland Islands` country in `ActiveUtils::Country::COUNTRIES`
|
65
89
|
|
66
90
|
### Version 3.3.2 (Mar. 28, 2017)
|
91
|
+
|
67
92
|
- Changed country name of "Libyan Arab Jamahiriya" to Libya, as per country name change in 2011.
|
68
93
|
|
69
94
|
### Version 3.3.1 (Mar. 28, 2017)
|
95
|
+
|
70
96
|
- Bump ActiveSupport requirement to **< 5.2.0**.
|
71
97
|
|
72
98
|
### Version 3.3.0 (Mar. 10, 2017)
|
99
|
+
|
73
100
|
- Reduced default PostsData open_timeout from 60 seconds to 2, and read_timeout from 60 seconds to 10. Subclasses can and should override those values.
|
74
101
|
- Replace Kosovo's alpha 2 and alpha 3 ISO codes from `KV` to `XK` and from `KSV` to `XKX`.
|
75
102
|
|
76
103
|
### Version 3.2.5 (Feb. 2, 2017)
|
104
|
+
|
77
105
|
- Add the `TMT` currency in the supported currency codes
|
78
106
|
|
79
107
|
### Version 3.2.4 (Dec. 16, 2016)
|
108
|
+
|
80
109
|
- Add the `Bonaire` country in `ActiveUtils::Country::COUNTRIES`
|
81
110
|
|
82
111
|
### Version 3.2.3 (Nov. 21, 2016)
|
112
|
+
|
83
113
|
- Add the `:delay` option in `ActiveUtils::NetworkConnectionRetries`
|
84
114
|
|
85
115
|
### Version 3.2.2 (Jul. 4, 2016)
|
116
|
+
|
86
117
|
- Add tests for Rails 5 support
|
87
118
|
|
88
119
|
### Version 3.2.1 (Oct. 26, 2015)
|
120
|
+
|
89
121
|
- Add the malaysian currency code "RM" in `ActiveUtils::CurrencyCode`
|
90
122
|
|
91
123
|
### Version 3.2.0 (Oct. 13, 2015)
|
124
|
+
|
92
125
|
- Add #uses_postal_codes? to `ActiveUtils::Country`
|
93
126
|
|
94
127
|
### Version 3.1.0 (Sept. 30, 2015)
|
128
|
+
|
95
129
|
- Use ActiveUtils::HTTPRequestError as base exception class
|
96
130
|
- Add proxy address and port configuration
|
97
131
|
- Add support for Sin Maarten
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
active_utils (3.
|
4
|
+
active_utils (3.6.0)
|
5
5
|
activesupport (>= 4.2)
|
6
6
|
i18n
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (7.1.5.
|
11
|
+
activesupport (7.1.5.2)
|
12
12
|
base64
|
13
13
|
benchmark (>= 0.3)
|
14
14
|
bigdecimal
|
@@ -21,15 +21,15 @@ GEM
|
|
21
21
|
mutex_m
|
22
22
|
securerandom (>= 0.3)
|
23
23
|
tzinfo (~> 2.0)
|
24
|
-
base64 (0.
|
25
|
-
benchmark (0.4.
|
26
|
-
bigdecimal (3.
|
24
|
+
base64 (0.3.0)
|
25
|
+
benchmark (0.4.1)
|
26
|
+
bigdecimal (3.2.3)
|
27
27
|
concurrent-ruby (1.3.5)
|
28
|
-
connection_pool (2.5.
|
29
|
-
drb (2.2.
|
28
|
+
connection_pool (2.5.4)
|
29
|
+
drb (2.2.3)
|
30
30
|
i18n (1.14.7)
|
31
31
|
concurrent-ruby (~> 1.0)
|
32
|
-
logger (1.
|
32
|
+
logger (1.7.0)
|
33
33
|
minitest (5.22.3)
|
34
34
|
mocha (2.1.0)
|
35
35
|
ruby2_keywords (>= 0.0.5)
|
@@ -9,7 +9,8 @@ module ActiveUtils
|
|
9
9
|
SocketError => "The connection to the remote server could not be established",
|
10
10
|
OpenSSL::SSL::SSLError => "The SSL connection to the remote server could not be established",
|
11
11
|
Errno::EHOSTUNREACH => "The remote server could not be reached",
|
12
|
-
Errno::EADDRNOTAVAIL
|
12
|
+
Errno::EADDRNOTAVAIL => "The remote server address is not available",
|
13
|
+
Errno::ENETUNREACH => "The destination network is unreachable"
|
13
14
|
}
|
14
15
|
|
15
16
|
DEFAULT_RETRY_ERRORS = {
|
data/lib/active_utils/version.rb
CHANGED
@@ -50,6 +50,15 @@ class NetworkConnectionRetriesTest < Minitest::Test
|
|
50
50
|
assert_equal "The remote server address is not available", raised.message
|
51
51
|
end
|
52
52
|
|
53
|
+
def test_enetunreach_raises_correctly
|
54
|
+
raised = assert_raises(ActiveUtils::ConnectionError) do
|
55
|
+
retry_exceptions do
|
56
|
+
raise Errno::ENETUNREACH
|
57
|
+
end
|
58
|
+
end
|
59
|
+
assert_equal "The destination network is unreachable", raised.message
|
60
|
+
end
|
61
|
+
|
53
62
|
def test_timeout_errors_raise_correctly
|
54
63
|
exceptions = [Timeout::Error, Errno::ETIMEDOUT]
|
55
64
|
if RUBY_VERSION >= '2.0.0'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activesupport
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
rubygems_version: 3.
|
148
|
+
rubygems_version: 3.7.2
|
149
149
|
specification_version: 4
|
150
150
|
summary: Common utils used by active_merchant, active_fulfillment, and active_shipping
|
151
151
|
test_files: []
|