maxmind-geoip2 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/maxmind/geoip2/client.rb +12 -8
- data/maxmind-geoip2.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 499989805675afe47c253b34e265f655f79988d6fdbbb26a15c6a1147f512462
|
4
|
+
data.tar.gz: e39f9567d2ad3e8a5ca07f5f3faa6476368d27359ae2283e23c6b2aa31f11844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dcc366745377b4de4189813d2e264010e3f2794b67f6e10a404285d585dd65f76decd7c711accf0fbbe7ca2c68c1063e9e9a168fd73e1f7699cbcbd54c0699d
|
7
|
+
data.tar.gz: 8b76fb4b2e4217bbba2a9d21f108c604406f17c335cb90959acd83808d93f664d4825d7da1aa49e9d6d5fbf266c91473746ee79cbbeabb7b64d49e0e0a9e6fee
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.7.0 (2021-03-24)
|
4
|
+
|
5
|
+
* Ensured defaults are set when creating a `MaxMind::GeoIP2::Client` in the
|
6
|
+
case when args are explicitly passed in as `nil`. Pull Request by Manoj
|
7
|
+
Dayaram. GitHub #31.
|
8
|
+
|
3
9
|
## 0.6.0 (2021-03-23)
|
4
10
|
|
5
11
|
* Updated the `MaxMind::GeoIP2::Reader` constructor to support being called
|
data/README.md
CHANGED
@@ -342,7 +342,7 @@ This library uses [Semantic Versioning](https://semver.org/).
|
|
342
342
|
|
343
343
|
## Copyright and License
|
344
344
|
|
345
|
-
This software is Copyright (c) 2020 by MaxMind, Inc.
|
345
|
+
This software is Copyright (c) 2020-2021 by MaxMind, Inc.
|
346
346
|
|
347
347
|
This is free software, licensed under the [Apache License, Version
|
348
348
|
2.0](LICENSE-APACHE) or the [MIT License](LICENSE-MIT), at your option.
|
@@ -55,6 +55,8 @@ module MaxMind
|
|
55
55
|
# puts record.country.iso_code
|
56
56
|
class Client
|
57
57
|
# rubocop:disable Metrics/ParameterLists
|
58
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
59
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
58
60
|
|
59
61
|
# Create a Client that may be used to query a GeoIP2 Precision web service.
|
60
62
|
#
|
@@ -98,19 +100,21 @@ module MaxMind
|
|
98
100
|
)
|
99
101
|
@account_id = account_id
|
100
102
|
@license_key = license_key
|
101
|
-
@locales = locales
|
102
|
-
@host = host
|
103
|
-
@timeout = timeout
|
104
|
-
@proxy_address = proxy_address
|
105
|
-
@proxy_port = proxy_port
|
106
|
-
@proxy_username = proxy_username
|
107
|
-
@proxy_password = proxy_password
|
108
|
-
@pool_size = pool_size
|
103
|
+
@locales = locales || ['en']
|
104
|
+
@host = host || 'geoip.maxmind.com'
|
105
|
+
@timeout = timeout || 0
|
106
|
+
@proxy_address = proxy_address || ''
|
107
|
+
@proxy_port = proxy_port || 0
|
108
|
+
@proxy_username = proxy_username || ''
|
109
|
+
@proxy_password = proxy_password || ''
|
110
|
+
@pool_size = pool_size || 5
|
109
111
|
|
110
112
|
@connection_pool = ConnectionPool.new(size: @pool_size) do
|
111
113
|
make_http_client.persistent("https://#{@host}")
|
112
114
|
end
|
113
115
|
end
|
116
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
117
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
114
118
|
# rubocop:enable Metrics/ParameterLists
|
115
119
|
|
116
120
|
# This method calls the City web service.
|
data/maxmind-geoip2.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.files = Dir['**/*']
|
6
6
|
s.name = 'maxmind-geoip2'
|
7
7
|
s.summary = 'A gem for interacting with the GeoIP2 webservices and databases.'
|
8
|
-
s.version = '0.
|
8
|
+
s.version = '0.7.0'
|
9
9
|
|
10
10
|
s.description = 'A gem for interacting with the GeoIP2 webservices and databases. MaxMind provides geolocation data as downloadable databases as well as through a webservice.'
|
11
11
|
s.email = 'support@maxmind.com'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maxmind-geoip2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Storey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|