maxmind-geoip2 0.6.0 → 0.7.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: 2825710c836cdc4f085ac2e89f88753aa972124ac307af9669866bb355c61f10
4
- data.tar.gz: c420943be58fd25b84afe0a51264333c4ef268259da7946b58cd7ef77dd8a46b
3
+ metadata.gz: 499989805675afe47c253b34e265f655f79988d6fdbbb26a15c6a1147f512462
4
+ data.tar.gz: e39f9567d2ad3e8a5ca07f5f3faa6476368d27359ae2283e23c6b2aa31f11844
5
5
  SHA512:
6
- metadata.gz: 30d7e6caeaeded96d60fb981bcc2c4ce518620e973f3dae47433cd1582265fa315706a826c1bc62d29dfce013d5cee78ab1fefff54f51ef858589a54075b24f0
7
- data.tar.gz: ca89534bc5f0572ad5b69c7c7b92be70089d6e7e600f962d71a38c8c073299d01ed141c6b1b5089cbca9694c6f49b5b8bcb77a45fb1d2ab668cf3f698c40abdb
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.
@@ -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.6.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.6.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-23 00:00:00.000000000 Z
11
+ date: 2021-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool