active_utils 3.3.15 → 3.3.19
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/.travis.yml +2 -0
- data/CHANGELOG.md +10 -0
- data/CONTRIBUTING.md +1 -2
- data/active_utils.gemspec +2 -0
- data/lib/active_utils/connection.rb +8 -2
- data/lib/active_utils/country.rb +1 -1
- data/lib/active_utils/posts_data.rb +2 -0
- data/lib/active_utils/version.rb +1 -1
- data/lib/certs/cacert.pem +730 -870
- data/test/unit/connection_test.rb +6 -0
- data/test/unit/country_test.rb +1 -1
- data/test/unit/posts_data_test.rb +9 -0
- metadata +5 -5
@@ -49,6 +49,12 @@ class ConnectionTest < Minitest::Test
|
|
49
49
|
assert_equal 'success', response.body
|
50
50
|
end
|
51
51
|
|
52
|
+
def test_successful_patch_request
|
53
|
+
Net::HTTP.any_instance.expects(:patch).with('/tx.php', 'data', {}).returns(@ok)
|
54
|
+
response = @connection.request(:patch, 'data', {})
|
55
|
+
assert_equal 'success', response.body
|
56
|
+
end
|
57
|
+
|
52
58
|
def test_successful_delete_request
|
53
59
|
Net::HTTP.any_instance.expects(:delete).with('/tx.php', {}).returns(@ok)
|
54
60
|
response = @connection.request(:delete, nil, {})
|
data/test/unit/country_test.rb
CHANGED
@@ -72,7 +72,7 @@ class CountryTest < Minitest::Test
|
|
72
72
|
|
73
73
|
def test_change_to_countries_that_do_not_use_postalcodes_is_intentional
|
74
74
|
country_codes = Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES
|
75
|
-
assert_equal(country_codes.length,
|
75
|
+
assert_equal(country_codes.length, 31)
|
76
76
|
end
|
77
77
|
|
78
78
|
def test_canada_uses_postal_codes
|
@@ -61,4 +61,13 @@ class PostsDataTest < Minitest::Test
|
|
61
61
|
assert_equal @poster.proxy_address, 'http://proxy.example.com'
|
62
62
|
assert_equal @poster.proxy_port, '8888'
|
63
63
|
end
|
64
|
+
|
65
|
+
class HttpConnectionAbort < StandardError; end
|
66
|
+
|
67
|
+
def test_respecting_environment_proxy_settings
|
68
|
+
Net::HTTP.stubs(:new).with('example.com', 80, :ENV, nil).raises(PostsDataTest::HttpConnectionAbort)
|
69
|
+
assert_raises(PostsDataTest::HttpConnectionAbort) do
|
70
|
+
@poster.ssl_post('http://example.com', '')
|
71
|
+
end
|
72
|
+
end
|
64
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.19
|
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: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -126,7 +126,8 @@ files:
|
|
126
126
|
homepage: http://github.com/shopify/active_utils
|
127
127
|
licenses:
|
128
128
|
- MIT
|
129
|
-
metadata:
|
129
|
+
metadata:
|
130
|
+
allowed_push_host: https://rubygems.org
|
130
131
|
post_install_message:
|
131
132
|
rdoc_options: []
|
132
133
|
require_paths:
|
@@ -142,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
143
|
- !ruby/object:Gem::Version
|
143
144
|
version: '0'
|
144
145
|
requirements: []
|
145
|
-
|
146
|
-
rubygems_version: 2.7.6
|
146
|
+
rubygems_version: 3.2.20
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Common utils used by active_merchant, active_fulfillment, and active_shipping
|