active_utils 3.4.2 → 3.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 749cb044fcb177e843182013d5caaf8a6a13efa33c1218644df2c1ffddecf0b5
4
- data.tar.gz: 35a1d31ebe872e755c590e3a3055c1c6b54b7672274f766774b21eca5d6c3016
3
+ metadata.gz: 6cb69c8f7a4335a1da1843d3bd397d876c333a3db37363eeee23b50a2b56e2a9
4
+ data.tar.gz: 1f1812202ee78f4eb51412e95c6c959a0ce78ca72cfbd933bf5313f61e0500fd
5
5
  SHA512:
6
- metadata.gz: 22ea40eaf40d232ad00f92c9460a139b59792df62fa9b9ca469adb6b32a66182bc5630f7f11bc90e75e38816a5d55ebca2dd7df746f9d652ef725e56bf3f54f7
7
- data.tar.gz: f29ec7086e81adf45ab458e388677ca07ce9c66fdf5e3779dfb94421237f39cc708653e3d6bdc16f5edf5eba149219defb39697783f17f7bbbacb5b38d79cd2b
6
+ metadata.gz: f6dc883ae82940c4d26a63ce03c58a1e7169817fc9e557a3c5d6fb4ebbe38722b6a75159b8733b7914f6d99088f28700bff5c97066c1f9a3587d37410be8d0e7
7
+ data.tar.gz: bc8b18eff03ed494e284f8286c17c2df58e0edabe2c9f5c0d6bed1f57e51c8f7c5369852903e5c410919f45d8c98029b2330a08e9972640d4b05abea35c583e2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # ActiveUtils changelog
2
2
 
3
+ ### Version 3.5.0 (February 04, 2025)
4
+ - Catch and raise `EHOSTUNREACH` and `EADDRNOTAVAIL` syscall errors as `ActiveUtils::ConnectionError`
5
+
3
6
  ### Version 3.4.2 (January 15, 2025)
4
7
  - Remove numeric as a required param for `ActiveUtils::Country`
5
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_utils (3.4.2)
4
+ active_utils (3.5.0)
5
5
  activesupport (>= 4.2)
6
6
  i18n
7
7
 
@@ -24,10 +24,10 @@ GEM
24
24
  base64 (0.2.0)
25
25
  benchmark (0.4.0)
26
26
  bigdecimal (3.1.9)
27
- concurrent-ruby (1.3.4)
27
+ concurrent-ruby (1.3.5)
28
28
  connection_pool (2.5.0)
29
29
  drb (2.2.1)
30
- i18n (1.14.6)
30
+ i18n (1.14.7)
31
31
  concurrent-ruby (~> 1.0)
32
32
  logger (1.6.5)
33
33
  minitest (5.22.3)
@@ -43,6 +43,7 @@ GEM
43
43
  PLATFORMS
44
44
  arm64-darwin-21
45
45
  arm64-darwin-23
46
+ arm64-darwin-24
46
47
  x86_64-linux
47
48
 
48
49
  DEPENDENCIES
@@ -7,7 +7,9 @@ module ActiveUtils
7
7
  Timeout::Error => "The connection to the remote server timed out",
8
8
  Errno::ETIMEDOUT => "The connection to the remote server timed out",
9
9
  SocketError => "The connection to the remote server could not be established",
10
- OpenSSL::SSL::SSLError => "The SSL connection to the remote server could not be established"
10
+ OpenSSL::SSL::SSLError => "The SSL connection to the remote server could not be established",
11
+ Errno::EHOSTUNREACH => "The remote server could not be reached",
12
+ Errno::EADDRNOTAVAIL => "The remote server address is not available"
11
13
  }
12
14
 
13
15
  DEFAULT_RETRY_ERRORS = {
@@ -1,3 +1,3 @@
1
1
  module ActiveUtils
2
- VERSION = "3.4.2"
2
+ VERSION = "3.5.0"
3
3
  end
@@ -32,6 +32,24 @@ class NetworkConnectionRetriesTest < Minitest::Test
32
32
  assert_equal "The remote server reset the connection", raised.message
33
33
  end
34
34
 
35
+ def test_ehostunreach_raises_correctly
36
+ raised = assert_raises(ActiveUtils::ConnectionError) do
37
+ retry_exceptions do
38
+ raise Errno::EHOSTUNREACH
39
+ end
40
+ end
41
+ assert_equal "The remote server could not be reached", raised.message
42
+ end
43
+
44
+ def test_eaddrnotavail_raises_correctly
45
+ raised = assert_raises(ActiveUtils::ConnectionError) do
46
+ retry_exceptions do
47
+ raise Errno::EADDRNOTAVAIL
48
+ end
49
+ end
50
+ assert_equal "The remote server address is not available", raised.message
51
+ end
52
+
35
53
  def test_timeout_errors_raise_correctly
36
54
  exceptions = [Timeout::Error, Errno::ETIMEDOUT]
37
55
  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.2
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-22 00:00:00.000000000 Z
10
+ date: 2025-02-05 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.6.2
148
+ rubygems_version: 3.6.3
149
149
  specification_version: 4
150
150
  summary: Common utils used by active_merchant, active_fulfillment, and active_shipping
151
151
  test_files: []