maxmind-geoip2 1.3.0 → 1.5.1

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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +2 -2
  4. data/lib/maxmind/geoip2/model/insights.rb +14 -0
  5. data/lib/maxmind/geoip2/record/anonymizer.rb +105 -0
  6. data/lib/maxmind/geoip2/record/traits.rb +45 -0
  7. data/lib/maxmind/geoip2/version.rb +1 -1
  8. metadata +56 -94
  9. data/Gemfile +0 -5
  10. data/Gemfile.lock +0 -114
  11. data/README.dev.md +0 -4
  12. data/Rakefile +0 -15
  13. data/maxmind-geoip2.gemspec +0 -38
  14. data/test/data/LICENSE-APACHE +0 -202
  15. data/test/data/LICENSE-MIT +0 -17
  16. data/test/data/MaxMind-DB-spec.md +0 -573
  17. data/test/data/README.md +0 -11
  18. data/test/data/bad-data/README.md +0 -7
  19. data/test/data/bad-data/libmaxminddb/libmaxminddb-offset-integer-overflow.mmdb +0 -0
  20. data/test/data/bad-data/maxminddb-golang/cyclic-data-structure.mmdb +0 -0
  21. data/test/data/bad-data/maxminddb-golang/invalid-bytes-length.mmdb +0 -1
  22. data/test/data/bad-data/maxminddb-golang/invalid-data-record-offset.mmdb +0 -0
  23. data/test/data/bad-data/maxminddb-golang/invalid-map-key-length.mmdb +0 -0
  24. data/test/data/bad-data/maxminddb-golang/invalid-string-length.mmdb +0 -1
  25. data/test/data/bad-data/maxminddb-golang/metadata-is-an-uint128.mmdb +0 -1
  26. data/test/data/bad-data/maxminddb-golang/unexpected-bytes.mmdb +0 -0
  27. data/test/data/bad-data/maxminddb-python/bad-unicode-in-map-key.mmdb +0 -0
  28. data/test/data/cmd/write-test-data/main.go +0 -68
  29. data/test/data/go.mod +0 -13
  30. data/test/data/go.sum +0 -16
  31. data/test/data/pkg/writer/decoder.go +0 -178
  32. data/test/data/pkg/writer/geoip2.go +0 -184
  33. data/test/data/pkg/writer/ip.go +0 -39
  34. data/test/data/pkg/writer/maxmind.go +0 -246
  35. data/test/data/pkg/writer/nestedstructures.go +0 -73
  36. data/test/data/pkg/writer/writer.go +0 -61
  37. data/test/data/source-data/GeoIP-Anonymous-Plus-Test.json +0 -175
  38. data/test/data/source-data/GeoIP2-Anonymous-IP-Test.json +0 -55
  39. data/test/data/source-data/GeoIP2-City-Test.json +0 -13272
  40. data/test/data/source-data/GeoIP2-Connection-Type-Test.json +0 -127
  41. data/test/data/source-data/GeoIP2-Country-Test.json +0 -15978
  42. data/test/data/source-data/GeoIP2-DensityIncome-Test.json +0 -14
  43. data/test/data/source-data/GeoIP2-Domain-Test.json +0 -457
  44. data/test/data/source-data/GeoIP2-Enterprise-Test.json +0 -1110
  45. data/test/data/source-data/GeoIP2-IP-Risk-Test.json +0 -31
  46. data/test/data/source-data/GeoIP2-ISP-Test.json +0 -12605
  47. data/test/data/source-data/GeoIP2-Precision-Enterprise-Sandbox-Test.json +0 -296
  48. data/test/data/source-data/GeoIP2-Precision-Enterprise-Test.json +0 -3189
  49. data/test/data/source-data/GeoIP2-Static-IP-Score-Test.json +0 -2147
  50. data/test/data/source-data/GeoIP2-User-Count-Test.json +0 -2855
  51. data/test/data/source-data/GeoLite2-ASN-Test.json +0 -4120
  52. data/test/data/source-data/GeoLite2-City-Test.json +0 -12969
  53. data/test/data/source-data/GeoLite2-Country-Test.json +0 -11369
  54. data/test/data/test-data/GeoIP-Anonymous-Plus-Test.mmdb +0 -0
  55. data/test/data/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
  56. data/test/data/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb +0 -0
  57. data/test/data/test-data/GeoIP2-City-Test-Invalid-Node-Count.mmdb +0 -0
  58. data/test/data/test-data/GeoIP2-City-Test.mmdb +0 -0
  59. data/test/data/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
  60. data/test/data/test-data/GeoIP2-Country-Test.mmdb +0 -0
  61. data/test/data/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
  62. data/test/data/test-data/GeoIP2-Domain-Test.mmdb +0 -0
  63. data/test/data/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
  64. data/test/data/test-data/GeoIP2-IP-Risk-Test.mmdb +0 -0
  65. data/test/data/test-data/GeoIP2-ISP-Test.mmdb +0 -0
  66. data/test/data/test-data/GeoIP2-Precision-Enterprise-Test.mmdb +0 -0
  67. data/test/data/test-data/GeoIP2-Static-IP-Score-Test.mmdb +0 -0
  68. data/test/data/test-data/GeoIP2-User-Count-Test.mmdb +0 -0
  69. data/test/data/test-data/GeoLite2-ASN-Test.mmdb +0 -0
  70. data/test/data/test-data/GeoLite2-City-Test.mmdb +0 -0
  71. data/test/data/test-data/GeoLite2-Country-Test.mmdb +0 -0
  72. data/test/data/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb +0 -0
  73. data/test/data/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
  74. data/test/data/test-data/MaxMind-DB-test-broken-pointers-24.mmdb +0 -0
  75. data/test/data/test-data/MaxMind-DB-test-broken-search-tree-24.mmdb +0 -0
  76. data/test/data/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
  77. data/test/data/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
  78. data/test/data/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
  79. data/test/data/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
  80. data/test/data/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
  81. data/test/data/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
  82. data/test/data/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
  83. data/test/data/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
  84. data/test/data/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
  85. data/test/data/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
  86. data/test/data/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
  87. data/test/data/test-data/MaxMind-DB-test-nested.mmdb +0 -0
  88. data/test/data/test-data/MaxMind-DB-test-pointer-decoder.mmdb +0 -0
  89. data/test/data/test-data/README.md +0 -42
  90. data/test/data/test-data/maps-with-pointers.raw +0 -0
  91. data/test/data/tidyall.ini +0 -5
  92. data/test/test_client.rb +0 -442
  93. data/test/test_model_country.rb +0 -96
  94. data/test/test_model_names.rb +0 -47
  95. data/test/test_reader.rb +0 -575
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d6ddb183c97df1041a902a1f2f98dec87e640b5907ae19b080bdd03c87bc03f
4
- data.tar.gz: 8f0e58e55e605576bc4214e878c28aaab3bb6c0dbd065bb1281ac5f0db65e69e
3
+ metadata.gz: 101e87b30523d5d5ff9649bb1d379d0ea3d198a11ea4d989750c62bb15872cb2
4
+ data.tar.gz: 5c2580f874e9902dff611d5c408521f9486074db67d99ed68cbeb6d631ebe606
5
5
  SHA512:
6
- metadata.gz: 2c6d5e20fd3bef3aacde30acb0c22695c8a903626747db02b58067adcaeafd9d2673f9be8189fad8d6a53869028ff15bf9536ce66a435a2da6e86fb4126cf06b
7
- data.tar.gz: 8c79484d19313833856f91deabceed833f2dae00fb1cd4993d57b973b1747541cf83122e07043c1b4925a2f291172195ab024988be39501a922a751c7808cde1
6
+ metadata.gz: 609a302c0c3f4d7087df0531ce26c643412a2c7c4c2d92366ebe8cf26fae8b5bd04b8b15bc6b6a0f5285fcf15e3b74dbd92cc3e63e697e308431c9660598904f
7
+ data.tar.gz: 91115ba0d2bf0868bec4644c58ac12c26f94e5ee1b55b63592e05fb7e1a3461251ab078fa709f684cc3166db3509737f68edc67a3f536674d2b235325cad61b4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.5.1 (2026-01-19)
4
+
5
+ * Re-release with a fix to the release process. This includes a bump of the
6
+ gem's version in `Gemfile.lock`.
7
+
8
+ ## 1.5.0 (2026-01-19)
9
+
10
+ * Unnecessary files were removed from the published .gem. Pull request by
11
+ Orien Madgwick. GitHub #131.
12
+ * Updated `connection_pool` dependency to allow version 3+. Reported by
13
+ Igor Kasyanchuk. GitHub #140.
14
+
15
+ ## 1.4.0 (2025-11-20)
16
+
17
+ * Ruby 3.2+ is now required. If you're using Ruby 3.0 or 3.1, please use
18
+ version 1.3.0 of this gem.
19
+ * A new `anonymizer` object has been added to the `MaxMind::GeoIP2::Model::Insights`
20
+ model. This object indicates whether the IP address is part of an anonymizing
21
+ network, including VPN confidence scoring, provider name detection, and network
22
+ last seen date. This is only available from the GeoIP2 Insights web service.
23
+ * A new `ip_risk_snapshot` method has been added to `MaxMind::GeoIP2::Record::Traits`.
24
+ This field contains the risk associated with the IP address, ranging from 0.01 to
25
+ 99 (a higher score indicates a higher risk). This is only available from the GeoIP2
26
+ Insights web service.
27
+ * The `anonymous?`, `anonymous_vpn?`, `hosting_provider?`, `public_proxy?`,
28
+ `residential_proxy?`, and `tor_exit_node?` methods in
29
+ `MaxMind::GeoIP2::Record::Traits` have been deprecated. Please use the
30
+ corresponding methods in the `anonymizer` object from the GeoIP2 Insights
31
+ response instead.
32
+
33
+
3
34
  ## 1.3.0 (2025-05-06)
4
35
 
5
36
  * Support for the GeoIP Anonymous Plus database has been added. To do a
data/README.md CHANGED
@@ -347,7 +347,7 @@ client API, please see [our support page](https://www.maxmind.com/en/support).
347
347
 
348
348
  ## Requirements
349
349
 
350
- This code requires Ruby version 3.0 or higher.
350
+ This code requires Ruby version 3.2 or higher.
351
351
 
352
352
  ## Contributing
353
353
 
@@ -360,7 +360,7 @@ This library uses [Semantic Versioning](https://semver.org/).
360
360
 
361
361
  ## Copyright and License
362
362
 
363
- This software is Copyright (c) 2020-2025 by MaxMind, Inc.
363
+ This software is Copyright (c) 2020-2026 by MaxMind, Inc.
364
364
 
365
365
  This is free software, licensed under the [Apache License, Version
366
366
  2.0](LICENSE-APACHE) or the [MIT License](LICENSE-MIT), at your option.
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'maxmind/geoip2/model/city'
4
+ require 'maxmind/geoip2/record/anonymizer'
4
5
 
5
6
  module MaxMind
6
7
  module GeoIP2
@@ -10,6 +11,19 @@ module MaxMind
10
11
  # See https://dev.maxmind.com/geoip/docs/web-services?lang=en for more
11
12
  # details.
12
13
  class Insights < City
14
+ # Data indicating whether the IP address is part of an anonymizing
15
+ # network.
16
+ #
17
+ # @return [MaxMind::GeoIP2::Record::Anonymizer]
18
+ attr_reader :anonymizer
19
+
20
+ # @!visibility private
21
+ def initialize(record, locales)
22
+ super
23
+ @anonymizer = MaxMind::GeoIP2::Record::Anonymizer.new(
24
+ record['anonymizer'],
25
+ )
26
+ end
13
27
  end
14
28
  end
15
29
  end
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'date'
4
+ require 'maxmind/geoip2/record/abstract'
5
+
6
+ module MaxMind
7
+ module GeoIP2
8
+ module Record
9
+ # Contains data indicating whether an IP address is part of an
10
+ # anonymizing network.
11
+ #
12
+ # This record is returned by the Insights web service.
13
+ class Anonymizer < Abstract
14
+ # A score ranging from 1 to 99 that represents our percent confidence
15
+ # that the network is currently part of an actively used VPN service.
16
+ # This property is only available from Insights.
17
+ #
18
+ # @return [Integer, nil]
19
+ def confidence
20
+ get('confidence')
21
+ end
22
+
23
+ # This is true if the IP address belongs to any sort of anonymous
24
+ # network. This property is only available from Insights.
25
+ #
26
+ # @return [Boolean]
27
+ def anonymous?
28
+ get('is_anonymous')
29
+ end
30
+
31
+ # This is true if the IP address is registered to an anonymous VPN
32
+ # provider. If a VPN provider does not register subnets under names
33
+ # associated with them, we will likely only flag their IP ranges using
34
+ # the hosting_provider? property. This property is only available from
35
+ # Insights.
36
+ #
37
+ # @return [Boolean]
38
+ def anonymous_vpn?
39
+ get('is_anonymous_vpn')
40
+ end
41
+
42
+ # This is true if the IP address belongs to a hosting or VPN provider
43
+ # (see description of the anonymous_vpn? property). This property is
44
+ # only available from Insights.
45
+ #
46
+ # @return [Boolean]
47
+ def hosting_provider?
48
+ get('is_hosting_provider')
49
+ end
50
+
51
+ # This is true if the IP address belongs to a public proxy. This
52
+ # property is only available from Insights.
53
+ #
54
+ # @return [Boolean]
55
+ def public_proxy?
56
+ get('is_public_proxy')
57
+ end
58
+
59
+ # This is true if the IP address is on a suspected anonymizing network
60
+ # and belongs to a residential ISP. This property is only available from
61
+ # Insights.
62
+ #
63
+ # @return [Boolean]
64
+ def residential_proxy?
65
+ get('is_residential_proxy')
66
+ end
67
+
68
+ # This is true if the IP address is a Tor exit node. This property is
69
+ # only available from Insights.
70
+ #
71
+ # @return [Boolean]
72
+ def tor_exit_node?
73
+ get('is_tor_exit_node')
74
+ end
75
+
76
+ # The last day that the network was sighted in our analysis of
77
+ # anonymized networks. This value is parsed lazily. This property is
78
+ # only available from Insights.
79
+ #
80
+ # @return [Date, nil] A Date object representing the last seen date,
81
+ # or nil if the date is not available.
82
+ def network_last_seen
83
+ return @network_last_seen if defined?(@network_last_seen)
84
+
85
+ date_string = get('network_last_seen')
86
+
87
+ if !date_string
88
+ return nil
89
+ end
90
+
91
+ @network_last_seen = Date.parse(date_string)
92
+ end
93
+
94
+ # The name of the VPN provider (e.g., NordVPN, SurfShark, etc.)
95
+ # associated with the network. This property is only available from
96
+ # Insights.
97
+ #
98
+ # @return [String, nil]
99
+ def provider_name
100
+ get('provider_name')
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
@@ -76,7 +76,11 @@ module MaxMind
76
76
  # This is true if the IP address belongs to any sort of anonymous network.
77
77
  # This property is only available from Insights.
78
78
  #
79
+ # This method is deprecated as of version 1.4.0. Use the anonymizer object
80
+ # from the Insights response instead.
81
+ #
79
82
  # @return [Boolean]
83
+ # @deprecated since 1.4.0
80
84
  def anonymous?
81
85
  get('is_anonymous')
82
86
  end
@@ -86,7 +90,11 @@ module MaxMind
86
90
  # associated with them, we will likely only flag their IP ranges using the
87
91
  # hosting_provider? property. This property is only available from Insights.
88
92
  #
93
+ # This method is deprecated as of version 1.4.0. Use the anonymizer object
94
+ # from the Insights response instead.
95
+ #
89
96
  # @return [Boolean]
97
+ # @deprecated since 1.4.0
90
98
  def anonymous_vpn?
91
99
  get('is_anonymous_vpn')
92
100
  end
@@ -107,7 +115,11 @@ module MaxMind
107
115
  # description of the anonymous_vpn? property). This property is only
108
116
  # available from Insights.
109
117
  #
118
+ # This method is deprecated as of version 1.4.0. Use the anonymizer object
119
+ # from the Insights response instead.
120
+ #
110
121
  # @return [Boolean]
122
+ # @deprecated since 1.4.0
111
123
  def hosting_provider?
112
124
  get('is_hosting_provider')
113
125
  end
@@ -146,7 +158,11 @@ module MaxMind
146
158
  # This is true if the IP address belongs to a public proxy. This property
147
159
  # is only available from Insights.
148
160
  #
161
+ # This method is deprecated as of version 1.4.0. Use the anonymizer object
162
+ # from the Insights response instead.
163
+ #
149
164
  # @return [Boolean]
165
+ # @deprecated since 1.4.0
150
166
  def public_proxy?
151
167
  get('is_public_proxy')
152
168
  end
@@ -155,7 +171,11 @@ module MaxMind
155
171
  # and belongs to a residential ISP. This property is only available
156
172
  # from Insights.
157
173
  #
174
+ # This method is deprecated as of version 1.4.0. Use the anonymizer object
175
+ # from the Insights response instead.
176
+ #
158
177
  # @return [Boolean]
178
+ # @deprecated since 1.4.0
159
179
  def residential_proxy?
160
180
  get('is_residential_proxy')
161
181
  end
@@ -163,7 +183,11 @@ module MaxMind
163
183
  # This is true if the IP address is a Tor exit node. This property is only
164
184
  # available from Insights.
165
185
  #
186
+ # This method is deprecated as of version 1.4.0. Use the anonymizer object
187
+ # from the Insights response instead.
188
+ #
166
189
  # @return [Boolean]
190
+ # @deprecated since 1.4.0
167
191
  def tor_exit_node?
168
192
  get('is_tor_exit_node')
169
193
  end
@@ -212,6 +236,27 @@ module MaxMind
212
236
  get('user_count')
213
237
  end
214
238
 
239
+ # This field contains the risk associated with the IP address. The value
240
+ # ranges from 0.01 to 99. A higher score indicates a higher risk.
241
+ # Please note that the IP risk score provided in GeoIP products and
242
+ # services is more static than the IP risk score provided in minFraud
243
+ # and is not responsive to traffic on your network. If you need realtime
244
+ # IP risk scoring based on behavioral signals on your own network, please
245
+ # use minFraud.
246
+ #
247
+ # We do not provide an IP risk snapshot for low-risk networks. If this
248
+ # field is not populated, we either do not have signals for the network
249
+ # or the signals we have show that the network is low-risk. If you would
250
+ # like to get signals for low-risk networks, please use the minFraud web
251
+ # services.
252
+ #
253
+ # This property is only available from Insights.
254
+ #
255
+ # @return [Float, nil]
256
+ def ip_risk_snapshot
257
+ get('ip_risk_snapshot')
258
+ end
259
+
215
260
  # The user type associated with the IP address. This can be one of the
216
261
  # following values:
217
262
  #
@@ -3,6 +3,6 @@
3
3
  module MaxMind
4
4
  module GeoIP2
5
5
  # The Gem version.
6
- VERSION = '1.3.0'
6
+ VERSION = '1.5.1'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxmind-geoip2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Storey
@@ -13,16 +13,22 @@ dependencies:
13
13
  name: connection_pool
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: '2.2'
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '4.0'
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
22
25
  requirements:
23
- - - "~>"
26
+ - - ">="
24
27
  - !ruby/object:Gem::Version
25
28
  version: '2.2'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '4.0'
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: http
28
34
  requirement: !ruby/object:Gem::Requirement
@@ -49,14 +55,14 @@ dependencies:
49
55
  requirements:
50
56
  - - "~>"
51
57
  - !ruby/object:Gem::Version
52
- version: '1.2'
58
+ version: '1.4'
53
59
  type: :runtime
54
60
  prerelease: false
55
61
  version_requirements: !ruby/object:Gem::Requirement
56
62
  requirements:
57
63
  - - "~>"
58
64
  - !ruby/object:Gem::Version
59
- version: '1.2'
65
+ version: '1.4'
60
66
  - !ruby/object:Gem::Dependency
61
67
  name: minitest
62
68
  requirement: !ruby/object:Gem::Requirement
@@ -99,6 +105,20 @@ dependencies:
99
105
  - - ">="
100
106
  - !ruby/object:Gem::Version
101
107
  version: '0'
108
+ - !ruby/object:Gem::Dependency
109
+ name: rubocop-minitest
110
+ requirement: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ type: :development
116
+ prerelease: false
117
+ version_requirements: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
102
122
  - !ruby/object:Gem::Dependency
103
123
  name: rubocop-performance
104
124
  requirement: !ruby/object:Gem::Requirement
@@ -113,6 +133,34 @@ dependencies:
113
133
  - - ">="
114
134
  - !ruby/object:Gem::Version
115
135
  version: '0'
136
+ - !ruby/object:Gem::Dependency
137
+ name: rubocop-rake
138
+ requirement: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ - !ruby/object:Gem::Dependency
151
+ name: rubocop-thread_safety
152
+ requirement: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ type: :development
158
+ prerelease: false
159
+ version_requirements: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
116
164
  - !ruby/object:Gem::Dependency
117
165
  name: webmock
118
166
  requirement: !ruby/object:Gem::Requirement
@@ -135,13 +183,9 @@ extensions: []
135
183
  extra_rdoc_files: []
136
184
  files:
137
185
  - CHANGELOG.md
138
- - Gemfile
139
- - Gemfile.lock
140
186
  - LICENSE-APACHE
141
187
  - LICENSE-MIT
142
- - README.dev.md
143
188
  - README.md
144
- - Rakefile
145
189
  - lib/maxmind/geoip2.rb
146
190
  - lib/maxmind/geoip2/client.rb
147
191
  - lib/maxmind/geoip2/errors.rb
@@ -158,6 +202,7 @@ files:
158
202
  - lib/maxmind/geoip2/model/isp.rb
159
203
  - lib/maxmind/geoip2/reader.rb
160
204
  - lib/maxmind/geoip2/record/abstract.rb
205
+ - lib/maxmind/geoip2/record/anonymizer.rb
161
206
  - lib/maxmind/geoip2/record/city.rb
162
207
  - lib/maxmind/geoip2/record/continent.rb
163
208
  - lib/maxmind/geoip2/record/country.rb
@@ -169,89 +214,6 @@ files:
169
214
  - lib/maxmind/geoip2/record/subdivision.rb
170
215
  - lib/maxmind/geoip2/record/traits.rb
171
216
  - lib/maxmind/geoip2/version.rb
172
- - maxmind-geoip2.gemspec
173
- - test/data/LICENSE-APACHE
174
- - test/data/LICENSE-MIT
175
- - test/data/MaxMind-DB-spec.md
176
- - test/data/README.md
177
- - test/data/bad-data/README.md
178
- - test/data/bad-data/libmaxminddb/libmaxminddb-offset-integer-overflow.mmdb
179
- - test/data/bad-data/maxminddb-golang/cyclic-data-structure.mmdb
180
- - test/data/bad-data/maxminddb-golang/invalid-bytes-length.mmdb
181
- - test/data/bad-data/maxminddb-golang/invalid-data-record-offset.mmdb
182
- - test/data/bad-data/maxminddb-golang/invalid-map-key-length.mmdb
183
- - test/data/bad-data/maxminddb-golang/invalid-string-length.mmdb
184
- - test/data/bad-data/maxminddb-golang/metadata-is-an-uint128.mmdb
185
- - test/data/bad-data/maxminddb-golang/unexpected-bytes.mmdb
186
- - test/data/bad-data/maxminddb-python/bad-unicode-in-map-key.mmdb
187
- - test/data/cmd/write-test-data/main.go
188
- - test/data/go.mod
189
- - test/data/go.sum
190
- - test/data/pkg/writer/decoder.go
191
- - test/data/pkg/writer/geoip2.go
192
- - test/data/pkg/writer/ip.go
193
- - test/data/pkg/writer/maxmind.go
194
- - test/data/pkg/writer/nestedstructures.go
195
- - test/data/pkg/writer/writer.go
196
- - test/data/source-data/GeoIP-Anonymous-Plus-Test.json
197
- - test/data/source-data/GeoIP2-Anonymous-IP-Test.json
198
- - test/data/source-data/GeoIP2-City-Test.json
199
- - test/data/source-data/GeoIP2-Connection-Type-Test.json
200
- - test/data/source-data/GeoIP2-Country-Test.json
201
- - test/data/source-data/GeoIP2-DensityIncome-Test.json
202
- - test/data/source-data/GeoIP2-Domain-Test.json
203
- - test/data/source-data/GeoIP2-Enterprise-Test.json
204
- - test/data/source-data/GeoIP2-IP-Risk-Test.json
205
- - test/data/source-data/GeoIP2-ISP-Test.json
206
- - test/data/source-data/GeoIP2-Precision-Enterprise-Sandbox-Test.json
207
- - test/data/source-data/GeoIP2-Precision-Enterprise-Test.json
208
- - test/data/source-data/GeoIP2-Static-IP-Score-Test.json
209
- - test/data/source-data/GeoIP2-User-Count-Test.json
210
- - test/data/source-data/GeoLite2-ASN-Test.json
211
- - test/data/source-data/GeoLite2-City-Test.json
212
- - test/data/source-data/GeoLite2-Country-Test.json
213
- - test/data/test-data/GeoIP-Anonymous-Plus-Test.mmdb
214
- - test/data/test-data/GeoIP2-Anonymous-IP-Test.mmdb
215
- - test/data/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb
216
- - test/data/test-data/GeoIP2-City-Test-Invalid-Node-Count.mmdb
217
- - test/data/test-data/GeoIP2-City-Test.mmdb
218
- - test/data/test-data/GeoIP2-Connection-Type-Test.mmdb
219
- - test/data/test-data/GeoIP2-Country-Test.mmdb
220
- - test/data/test-data/GeoIP2-DensityIncome-Test.mmdb
221
- - test/data/test-data/GeoIP2-Domain-Test.mmdb
222
- - test/data/test-data/GeoIP2-Enterprise-Test.mmdb
223
- - test/data/test-data/GeoIP2-IP-Risk-Test.mmdb
224
- - test/data/test-data/GeoIP2-ISP-Test.mmdb
225
- - test/data/test-data/GeoIP2-Precision-Enterprise-Test.mmdb
226
- - test/data/test-data/GeoIP2-Static-IP-Score-Test.mmdb
227
- - test/data/test-data/GeoIP2-User-Count-Test.mmdb
228
- - test/data/test-data/GeoLite2-ASN-Test.mmdb
229
- - test/data/test-data/GeoLite2-City-Test.mmdb
230
- - test/data/test-data/GeoLite2-Country-Test.mmdb
231
- - test/data/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb
232
- - test/data/test-data/MaxMind-DB-string-value-entries.mmdb
233
- - test/data/test-data/MaxMind-DB-test-broken-pointers-24.mmdb
234
- - test/data/test-data/MaxMind-DB-test-broken-search-tree-24.mmdb
235
- - test/data/test-data/MaxMind-DB-test-decoder.mmdb
236
- - test/data/test-data/MaxMind-DB-test-ipv4-24.mmdb
237
- - test/data/test-data/MaxMind-DB-test-ipv4-28.mmdb
238
- - test/data/test-data/MaxMind-DB-test-ipv4-32.mmdb
239
- - test/data/test-data/MaxMind-DB-test-ipv6-24.mmdb
240
- - test/data/test-data/MaxMind-DB-test-ipv6-28.mmdb
241
- - test/data/test-data/MaxMind-DB-test-ipv6-32.mmdb
242
- - test/data/test-data/MaxMind-DB-test-metadata-pointers.mmdb
243
- - test/data/test-data/MaxMind-DB-test-mixed-24.mmdb
244
- - test/data/test-data/MaxMind-DB-test-mixed-28.mmdb
245
- - test/data/test-data/MaxMind-DB-test-mixed-32.mmdb
246
- - test/data/test-data/MaxMind-DB-test-nested.mmdb
247
- - test/data/test-data/MaxMind-DB-test-pointer-decoder.mmdb
248
- - test/data/test-data/README.md
249
- - test/data/test-data/maps-with-pointers.raw
250
- - test/data/tidyall.ini
251
- - test/test_client.rb
252
- - test/test_model_country.rb
253
- - test/test_model_names.rb
254
- - test/test_reader.rb
255
217
  homepage: https://github.com/maxmind/GeoIP2-ruby
256
218
  licenses:
257
219
  - Apache-2.0
@@ -270,14 +232,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
270
232
  requirements:
271
233
  - - ">="
272
234
  - !ruby/object:Gem::Version
273
- version: '3.0'
235
+ version: '3.2'
274
236
  required_rubygems_version: !ruby/object:Gem::Requirement
275
237
  requirements:
276
238
  - - ">="
277
239
  - !ruby/object:Gem::Version
278
240
  version: '0'
279
241
  requirements: []
280
- rubygems_version: 3.6.7
242
+ rubygems_version: 3.6.9
281
243
  specification_version: 4
282
244
  summary: A gem for interacting with the GeoIP2 webservices and databases.
283
245
  test_files: []
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
data/Gemfile.lock DELETED
@@ -1,114 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- maxmind-geoip2 (1.3.0)
5
- connection_pool (~> 2.2)
6
- http (>= 4.3, < 6.0)
7
- maxmind-db (~> 1.2)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- addressable (2.8.7)
13
- public_suffix (>= 2.0.2, < 7.0)
14
- ast (2.4.3)
15
- base64 (0.2.0)
16
- bigdecimal (3.1.9)
17
- connection_pool (2.5.3)
18
- crack (1.0.0)
19
- bigdecimal
20
- rexml
21
- domain_name (0.6.20240107)
22
- ffi (1.17.2)
23
- ffi (1.17.2-aarch64-linux-gnu)
24
- ffi (1.17.2-aarch64-linux-musl)
25
- ffi (1.17.2-arm-linux-gnu)
26
- ffi (1.17.2-arm-linux-musl)
27
- ffi (1.17.2-arm64-darwin)
28
- ffi (1.17.2-x86-linux-gnu)
29
- ffi (1.17.2-x86-linux-musl)
30
- ffi (1.17.2-x86_64-darwin)
31
- ffi (1.17.2-x86_64-linux-gnu)
32
- ffi (1.17.2-x86_64-linux-musl)
33
- ffi-compiler (1.3.2)
34
- ffi (>= 1.15.5)
35
- rake
36
- hashdiff (1.1.2)
37
- http (5.2.0)
38
- addressable (~> 2.8)
39
- base64 (~> 0.1)
40
- http-cookie (~> 1.0)
41
- http-form_data (~> 2.2)
42
- llhttp-ffi (~> 0.5.0)
43
- http-cookie (1.0.8)
44
- domain_name (~> 0.5)
45
- http-form_data (2.3.0)
46
- json (2.11.3)
47
- language_server-protocol (3.17.0.4)
48
- lint_roller (1.1.0)
49
- llhttp-ffi (0.5.1)
50
- ffi-compiler (~> 1.0)
51
- rake (~> 13.0)
52
- maxmind-db (1.3.2)
53
- minitest (5.25.5)
54
- parallel (1.27.0)
55
- parser (3.3.8.0)
56
- ast (~> 2.4.1)
57
- racc
58
- prism (1.4.0)
59
- public_suffix (6.0.2)
60
- racc (1.8.1)
61
- rainbow (3.1.1)
62
- rake (13.2.1)
63
- regexp_parser (2.10.0)
64
- rexml (3.4.1)
65
- rubocop (1.75.5)
66
- json (~> 2.3)
67
- language_server-protocol (~> 3.17.0.2)
68
- lint_roller (~> 1.1.0)
69
- parallel (~> 1.10)
70
- parser (>= 3.3.0.2)
71
- rainbow (>= 2.2.2, < 4.0)
72
- regexp_parser (>= 2.9.3, < 3.0)
73
- rubocop-ast (>= 1.44.0, < 2.0)
74
- ruby-progressbar (~> 1.7)
75
- unicode-display_width (>= 2.4.0, < 4.0)
76
- rubocop-ast (1.44.1)
77
- parser (>= 3.3.7.2)
78
- prism (~> 1.4)
79
- rubocop-performance (1.25.0)
80
- lint_roller (~> 1.1)
81
- rubocop (>= 1.75.0, < 2.0)
82
- rubocop-ast (>= 1.38.0, < 2.0)
83
- ruby-progressbar (1.13.0)
84
- unicode-display_width (3.1.4)
85
- unicode-emoji (~> 4.0, >= 4.0.4)
86
- unicode-emoji (4.0.4)
87
- webmock (3.25.1)
88
- addressable (>= 2.8.0)
89
- crack (>= 0.3.2)
90
- hashdiff (>= 0.4.0, < 2.0.0)
91
-
92
- PLATFORMS
93
- aarch64-linux-gnu
94
- aarch64-linux-musl
95
- arm-linux-gnu
96
- arm-linux-musl
97
- arm64-darwin
98
- ruby
99
- x86-linux-gnu
100
- x86-linux-musl
101
- x86_64-darwin
102
- x86_64-linux-gnu
103
- x86_64-linux-musl
104
-
105
- DEPENDENCIES
106
- maxmind-geoip2!
107
- minitest
108
- rake
109
- rubocop
110
- rubocop-performance
111
- webmock
112
-
113
- BUNDLED WITH
114
- 2.6.7
data/README.dev.md DELETED
@@ -1,4 +0,0 @@
1
- # How to release
2
-
3
- See
4
- [here](https://github.com/maxmind/minfraud-api-ruby/blob/main/README.dev.md).
data/Rakefile DELETED
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rake/testtask'
5
- require 'rubocop/rake_task'
6
-
7
- Rake::TestTask.new do |t|
8
- t.libs << 'test'
9
- end
10
-
11
- RuboCop::RakeTask.new
12
-
13
- desc 'Run tests and RuboCop'
14
- task default: :test
15
- task default: :rubocop