active_utils 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
N2Q0YTc3Y2QxM2M5N2FiMzJhMzk5NWZmMjY3ZjMxYjIzMjIwMzljOQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c6b630a34ea73ba2891b97742823b62856bd532b
|
4
|
+
data.tar.gz: 27c652fccd8be0d20dfd462efb0c7f36afc5d6a3
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MzMzNzU3YTU3NzczNWY5NzhjYjczMWU3YmE5ZTQ5OGRlNzhmZjkxOTA0MzMy
|
11
|
-
N2NiNzNmNGNlNTRkNGVjYTVkNjM3ODg3ZjFjYzJkMjRkODIxOGQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
OTg3OTZhODY2ZTFmNjE4NGQzYzE5ZTI0YmI2ZGIzZWZjYjJiOTNiNjJlN2Iw
|
14
|
-
N2NkY2ViMzliYTM1MDZiZjI4NzVlYWVmNWQ2ZDY5NjE2MjAwMDQ4YzQ4MWQw
|
15
|
-
MjhlNTYzN2ZmNDdiOThlMmE1Yjk0OGU1OTU3ZmYwNGFiZWYyNDU=
|
6
|
+
metadata.gz: f6a173be5591946ed8679e8010b2c008a49228d3789581a1f360f74dc29b5d77d1a8d0734ad7e4401aba9dc68efe5c2702b8d82242057548ee87523578915219
|
7
|
+
data.tar.gz: 4338b8518c3673270d7cd469c489e0b9af4a2d7d8c951cc2f441babb1691f27ccfe877be561bc3d4816e141a39e081f0efa37ce6ff3cf8ab02947376848daa6e
|
@@ -23,6 +23,8 @@ module ActiveMerchant
|
|
23
23
|
rescue OpenSSL::X509::CertificateError => e
|
24
24
|
NetworkConnectionRetries.log(options[:logger], :error, e.message, options[:tag])
|
25
25
|
raise ActiveMerchant::ClientCertificateError, "The remote server did not accept the provided SSL certificate"
|
26
|
+
rescue Zlib::BufError => e
|
27
|
+
raise ActiveMerchant::InvalidResponseError, "The remote server replied with an invalid response"
|
26
28
|
rescue *connection_errors.keys => e
|
27
29
|
raise ActiveMerchant::ConnectionError, connection_errors[e.class]
|
28
30
|
end
|
@@ -47,7 +49,7 @@ module ActiveMerchant
|
|
47
49
|
log_with_retry_details(options[:logger], initial_retries-retries, Time.now.to_f - request_start, e.message, options[:tag])
|
48
50
|
retry unless retries.zero?
|
49
51
|
raise ActiveMerchant::ConnectionError, e.message
|
50
|
-
rescue ActiveMerchant::ConnectionError => e
|
52
|
+
rescue ActiveMerchant::ConnectionError, ActiveMerchant::InvalidResponseError => e
|
51
53
|
retries -= 1
|
52
54
|
log_with_retry_details(options[:logger], initial_retries-retries, Time.now.to_f - request_start, e.message, options[:tag])
|
53
55
|
retry if (options[:retry_safe] || retry_safe) && !retries.zero?
|
data/lib/active_utils/version.rb
CHANGED
@@ -22,6 +22,14 @@ class NetworkConnectionRetriesTest < Test::Unit::TestCase
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
def test_invalid_response_error
|
26
|
+
assert_raises(ActiveMerchant::InvalidResponseError) do
|
27
|
+
retry_exceptions do
|
28
|
+
raise Zlib::BufError
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
25
33
|
def test_unrecoverable_exception_logged_if_logger_provided
|
26
34
|
@logger.expects(:info).once
|
27
35
|
assert_raises(ActiveMerchant::ConnectionError) do
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.3.11
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.3.11
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: i18n
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mocha
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description:
|
@@ -109,17 +109,17 @@ require_paths:
|
|
109
109
|
- lib
|
110
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - '>='
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - '>='
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project: active_utils
|
122
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.0.3
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: Common utils used by active_merchant, active_fulfillment, and active_shipping
|