active_utils 3.3.15 → 3.3.19
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c236e83dc0c4b35da1b23d174deee446185fa5ba2eebd342bf28f329c33823d
|
4
|
+
data.tar.gz: 0cbc00453c11d9fde11335b86c62413d41bd4b29998922875a0c34de844e47c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8b71761d493d48d0a774bfaeab6d9ad06a608cc4188307070bcdba77ede74ff4ab16bac8a4bad04f29dc74280864034eaba9c1f3008b173ccb300a86a792ac8
|
7
|
+
data.tar.gz: d744cab2ae63bff0abcee7e4b1f627d87bc5836f9e8df7483d7b3da9e2693311177406bac67c4dc9399b045074baaa10325ae58f4c05ca817bc67b45d899fc4a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# ActiveUtils changelog
|
2
2
|
|
3
|
+
### Version 3.3.19 (February 24, 2020)
|
4
|
+
- Support `net/http` default proxy settings from `ENV['http_proxy']`
|
5
|
+
- Support usage of custom ssl certificate with `ENV['SSL_CERT_FILE']`, default variable for Ruby
|
6
|
+
|
7
|
+
### Version 3.3.17 (February 24, 2020)
|
8
|
+
- Add support for PATCH HTTP method in `ActiveUtils#Connection`
|
9
|
+
|
10
|
+
### Version 3.3.16 (December 18, 2018)
|
11
|
+
- Add `VU` to `ActiveUtils::Country::COUNTRIES_THAT_DO_NOT_USE_POSTALCODES`
|
12
|
+
|
3
13
|
### Version 3.3.15 (November 29, 2018)
|
4
14
|
- Remove support to Ruby 1.9 and ActiveSupport `< 4`
|
5
15
|
- Remove the upperbound constraint on ActiveSupport
|
data/CONTRIBUTING.md
CHANGED
@@ -29,5 +29,4 @@ Final note: maybe you should also update the mirrored version in ActiveMerchant.
|
|
29
29
|
1. Check the [semantic versioning page](http://semver.org) for info on how to version the new release.
|
30
30
|
2. Update the `ActiveUtils::VERSION` constant in **lib/active_utils/version.rb**.
|
31
31
|
3. Add a `CHANGELOG.md` entry for the new release with the date.
|
32
|
-
4.
|
33
|
-
5. Release the gem to rubygems using ShipIt
|
32
|
+
4. Release the gem to rubygems using ShipIt (this will create tag/push during deploy)
|
data/active_utils.gemspec
CHANGED
@@ -21,6 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_development_dependency('minitest')
|
22
22
|
s.add_development_dependency('mocha')
|
23
23
|
|
24
|
+
s.metadata['allowed_push_host'] = 'https://rubygems.org'
|
25
|
+
|
24
26
|
s.files = `git ls-files`.split("\n")
|
25
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
26
28
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
@@ -11,9 +11,12 @@ module ActiveUtils
|
|
11
11
|
OPEN_TIMEOUT = 60
|
12
12
|
READ_TIMEOUT = 60
|
13
13
|
VERIFY_PEER = true
|
14
|
-
|
14
|
+
# allow using proxy for https calls by pointing to it's certificate
|
15
|
+
# SSL_CERT_FILE is variable used by Ruby to look for certificate for net/http
|
16
|
+
CA_FILE = ENV.fetch('SSL_CERT_FILE', File.dirname(__FILE__) + '/../certs/cacert.pem')
|
15
17
|
CA_PATH = nil
|
16
18
|
RETRY_SAFE = false
|
19
|
+
PROXY_ADDRESS = :ENV
|
17
20
|
RUBY_184_POST_HEADERS = { "Content-Type" => "application/x-www-form-urlencoded" }
|
18
21
|
|
19
22
|
attr_accessor :endpoint
|
@@ -45,7 +48,7 @@ module ActiveUtils
|
|
45
48
|
@max_retries = MAX_RETRIES
|
46
49
|
@ignore_http_status = false
|
47
50
|
@ssl_version = nil
|
48
|
-
@proxy_address =
|
51
|
+
@proxy_address = PROXY_ADDRESS
|
49
52
|
@proxy_port = nil
|
50
53
|
end
|
51
54
|
|
@@ -69,6 +72,9 @@ module ActiveUtils
|
|
69
72
|
when :put
|
70
73
|
debug body
|
71
74
|
http.put(endpoint.request_uri, body, headers)
|
75
|
+
when :patch
|
76
|
+
debug body
|
77
|
+
http.patch(endpoint.request_uri, body, headers)
|
72
78
|
when :delete
|
73
79
|
# It's kind of ambiguous whether the RFC allows bodies
|
74
80
|
# for DELETE requests. But Net::HTTP's delete method
|
data/lib/active_utils/country.rb
CHANGED
data/lib/active_utils/version.rb
CHANGED