geoip2_c 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ubuntu.yml +33 -0
  3. data/.github/workflows/windows.yml +52 -0
  4. data/README.md +3 -9
  5. data/docker-compose.yml +7 -0
  6. data/dockerfiles/Dockerfile-ruby2.7 +8 -0
  7. data/ext/geoip2/extconf.rb +11 -4
  8. data/ext/geoip2/geoip2.c +58 -15
  9. data/ext/geoip2/libmaxminddb/t/libtap/.gitignore +13 -0
  10. data/ext/geoip2/libmaxminddb/t/libtap/.travis.yml +13 -0
  11. data/ext/geoip2/libmaxminddb/t/libtap/COPYING +165 -0
  12. data/ext/geoip2/libmaxminddb/t/libtap/INSTALL +41 -0
  13. data/ext/geoip2/libmaxminddb/t/libtap/Makefile +72 -0
  14. data/ext/geoip2/libmaxminddb/t/libtap/Makefile.win +37 -0
  15. data/ext/geoip2/libmaxminddb/t/libtap/README.md +268 -0
  16. data/ext/geoip2/libmaxminddb/t/libtap/t/cmp_mem.c +20 -0
  17. data/ext/geoip2/libmaxminddb/t/libtap/t/cmp_mem.expected +28 -0
  18. data/ext/geoip2/libmaxminddb/t/libtap/t/cmpok.c +16 -0
  19. data/ext/geoip2/libmaxminddb/t/libtap/t/cmpok.expected +37 -0
  20. data/ext/geoip2/libmaxminddb/t/libtap/t/diag.c +10 -0
  21. data/ext/geoip2/libmaxminddb/t/libtap/t/diag.expected +2 -0
  22. data/ext/geoip2/libmaxminddb/t/libtap/t/diesok.c +14 -0
  23. data/ext/geoip2/libmaxminddb/t/libtap/t/diesok.expected +6 -0
  24. data/ext/geoip2/libmaxminddb/t/libtap/t/is.c +24 -0
  25. data/ext/geoip2/libmaxminddb/t/libtap/t/is.expected +58 -0
  26. data/ext/geoip2/libmaxminddb/t/libtap/t/like.c +10 -0
  27. data/ext/geoip2/libmaxminddb/t/libtap/t/like.expected +4 -0
  28. data/ext/geoip2/libmaxminddb/t/libtap/t/simple.c +31 -0
  29. data/ext/geoip2/libmaxminddb/t/libtap/t/simple.expected +32 -0
  30. data/ext/geoip2/libmaxminddb/t/libtap/t/skip.c +23 -0
  31. data/ext/geoip2/libmaxminddb/t/libtap/t/skip.expected +9 -0
  32. data/ext/geoip2/libmaxminddb/t/libtap/t/synopsis.c +13 -0
  33. data/ext/geoip2/libmaxminddb/t/libtap/t/synopsis.expected +9 -0
  34. data/ext/geoip2/libmaxminddb/t/libtap/t/test.c +28 -0
  35. data/ext/geoip2/libmaxminddb/t/libtap/t/todo.c +17 -0
  36. data/ext/geoip2/libmaxminddb/t/libtap/t/todo.expected +11 -0
  37. data/ext/geoip2/libmaxminddb/t/libtap/tap.c +354 -0
  38. data/ext/geoip2/libmaxminddb/t/libtap/tap.h +115 -0
  39. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitattributes +1 -0
  40. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitconfig +2 -0
  41. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitignore +2 -0
  42. data/ext/geoip2/libmaxminddb/t/maxmind-db/.perltidyallrc +11 -0
  43. data/ext/geoip2/libmaxminddb/t/maxmind-db/.tidyallrc +7 -0
  44. data/ext/geoip2/libmaxminddb/t/maxmind-db/LICENSE +4 -0
  45. data/ext/geoip2/libmaxminddb/t/maxmind-db/MaxMind-DB-spec.md +558 -0
  46. data/ext/geoip2/libmaxminddb/t/maxmind-db/README.md +4 -0
  47. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/README.md +7 -0
  48. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/libmaxminddb/libmaxminddb-offset-integer-overflow.mmdb +0 -0
  49. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/cyclic-data-structure.mmdb +0 -0
  50. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-bytes-length.mmdb +1 -0
  51. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-data-record-offset.mmdb +0 -0
  52. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-map-key-length.mmdb +0 -0
  53. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-string-length.mmdb +1 -0
  54. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/metadata-is-an-uint128.mmdb +1 -0
  55. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/unexpected-bytes.mmdb +0 -0
  56. data/ext/geoip2/libmaxminddb/t/maxmind-db/perltidyrc +12 -0
  57. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Anonymous-IP-Test.json +32 -0
  58. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-City-Test.json +12616 -0
  59. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Connection-Type-Test.json +102 -0
  60. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Country-Test.json +10975 -0
  61. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-DensityIncome-Test.json +14 -0
  62. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Domain-Test.json +452 -0
  63. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Enterprise-Test.json +666 -0
  64. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-ISP-Test.json +12585 -0
  65. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Precision-Enterprise-Test.json +1035 -0
  66. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoLite2-ASN-Test.json +37 -0
  67. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/README +13 -0
  68. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
  69. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb +0 -0
  70. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test-Invalid-Node-Count.mmdb +0 -0
  71. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test.mmdb +0 -0
  72. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
  73. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Country-Test.mmdb +0 -0
  74. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
  75. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Domain-Test.mmdb +0 -0
  76. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
  77. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-ISP-Test.mmdb +0 -0
  78. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Precision-Enterprise-Test.mmdb +0 -0
  79. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoLite2-ASN-Test.mmdb +0 -0
  80. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb +0 -0
  81. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
  82. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-broken-pointers-24.mmdb +0 -0
  83. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-broken-search-tree-24.mmdb +0 -0
  84. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
  85. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
  86. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
  87. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
  88. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
  89. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
  90. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
  91. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
  92. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
  93. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
  94. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
  95. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-nested.mmdb +0 -0
  96. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/README.md +26 -0
  97. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/maps-with-pointers.raw +0 -0
  98. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/write-test-data.pl +614 -0
  99. data/ext/geoip2/libmaxminddb/t/maxmind-db/tidyall.ini +5 -0
  100. data/geoip2_c.gemspec +2 -3
  101. data/lib/geoip2/database.rb +4 -0
  102. data/lib/geoip2/version.rb +1 -1
  103. metadata +108 -18
  104. data/.travis.yml +0 -30
  105. data/Appraisals +0 -7
  106. data/gemfiles/ruby_2.1.gemfile +0 -7
  107. data/gemfiles/ruby_2.2.gemfile +0 -7
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "::5.83.124.0/118" : {
4
+ "average_income" : 32323,
5
+ "population_density" : 1232
6
+ }
7
+ },
8
+ {
9
+ "::216.160.83.0/120" : {
10
+ "average_income" : 24626,
11
+ "population_density" : 1341
12
+ }
13
+ }
14
+ ]
@@ -0,0 +1,452 @@
1
+ [
2
+ {
3
+ "::1.2.0.0/112" : {
4
+ "domain" : "maxmind.com"
5
+ }
6
+ },
7
+ {
8
+ "::71.160.223.0/120" : {
9
+ "domain" : "verizon.net"
10
+ }
11
+ },
12
+ {
13
+ "::186.30.236.0/120" : {
14
+ "domain" : "replaced.com"
15
+ }
16
+ },
17
+ {
18
+ "2a02:2770:3::/64" : {
19
+ "domain" : "sgotti.org"
20
+ }
21
+ },
22
+ {
23
+ "2a02:8420:48f4:b000::/64" : {
24
+ "domain" : "sfr.net"
25
+ }
26
+ },
27
+ {
28
+ "::142.217.194.0/119" : {
29
+ "domain" : "telebecinternet.net"
30
+ }
31
+ },
32
+ {
33
+ "::142.217.196.0/118" : {
34
+ "domain" : "telebecinternet.net"
35
+ }
36
+ },
37
+ {
38
+ "::142.217.200.0/117" : {
39
+ "domain" : "telebecinternet.net"
40
+ }
41
+ },
42
+ {
43
+ "::142.217.208.0/118" : {
44
+ "domain" : "telebecinternet.net"
45
+ }
46
+ },
47
+ {
48
+ "::142.217.212.0/119" : {
49
+ "domain" : "telebecinternet.net"
50
+ }
51
+ },
52
+ {
53
+ "::142.217.214.0/120" : {
54
+ "domain" : "telebecinternet.net"
55
+ }
56
+ },
57
+ {
58
+ "::208.110.201.0/120" : {
59
+ "domain" : "comcastbusiness.net"
60
+ }
61
+ },
62
+ {
63
+ "::208.110.202.0/119" : {
64
+ "domain" : "comcastbusiness.net"
65
+ }
66
+ },
67
+ {
68
+ "::208.110.204.0/118" : {
69
+ "domain" : "comcastbusiness.net"
70
+ }
71
+ },
72
+ {
73
+ "::208.110.208.0/116" : {
74
+ "domain" : "comcastbusiness.net"
75
+ }
76
+ },
77
+ {
78
+ "::222.230.136.0/118" : {
79
+ "domain" : "gol.ne.jp"
80
+ }
81
+ },
82
+ {
83
+ "::65.115.240.0/116" : {
84
+ "domain" : "qwest.net"
85
+ }
86
+ },
87
+ {
88
+ "::65.116.0.0/118" : {
89
+ "domain" : "qwest.net"
90
+ }
91
+ },
92
+ {
93
+ "::65.116.4.0/120" : {
94
+ "domain" : "qwest.net"
95
+ }
96
+ },
97
+ {
98
+ "::65.23.96.0/115" : {
99
+ "domain" : "nuvox.net"
100
+ }
101
+ },
102
+ {
103
+ "::66.92.78.0/119" : {
104
+ "domain" : "speakeasy.net"
105
+ }
106
+ },
107
+ {
108
+ "::66.92.80.0/116" : {
109
+ "domain" : "speakeasy.net"
110
+ }
111
+ },
112
+ {
113
+ "::66.92.96.0/115" : {
114
+ "domain" : "speakeasy.net"
115
+ }
116
+ },
117
+ {
118
+ "::66.92.128.0/113" : {
119
+ "domain" : "speakeasy.net"
120
+ }
121
+ },
122
+ {
123
+ "::66.93.0.0/113" : {
124
+ "domain" : "speakeasy.net"
125
+ }
126
+ },
127
+ {
128
+ "::66.93.128.0/114" : {
129
+ "domain" : "speakeasy.net"
130
+ }
131
+ },
132
+ {
133
+ "::66.93.192.0/115" : {
134
+ "domain" : "speakeasy.net"
135
+ }
136
+ },
137
+ {
138
+ "::66.93.224.0/116" : {
139
+ "domain" : "speakeasy.net"
140
+ }
141
+ },
142
+ {
143
+ "::66.93.240.0/117" : {
144
+ "domain" : "speakeasy.net"
145
+ }
146
+ },
147
+ {
148
+ "::66.93.248.0/119" : {
149
+ "domain" : "speakeasy.net"
150
+ }
151
+ },
152
+ {
153
+ "::67.43.156.0/120" : {
154
+ "domain" : "shoesfin.NET"
155
+ }
156
+ },
157
+ {
158
+ "::69.218.198.0/119" : {
159
+ "domain" : "ameritech.net"
160
+ }
161
+ },
162
+ {
163
+ "::69.218.200.0/117" : {
164
+ "domain" : "ameritech.net"
165
+ }
166
+ },
167
+ {
168
+ "::69.218.208.0/116" : {
169
+ "domain" : "ameritech.net"
170
+ }
171
+ },
172
+ {
173
+ "::69.218.224.0/115" : {
174
+ "domain" : "ameritech.net"
175
+ }
176
+ },
177
+ {
178
+ "::69.219.0.0/114" : {
179
+ "domain" : "ameritech.net"
180
+ }
181
+ },
182
+ {
183
+ "::69.219.64.0/116" : {
184
+ "domain" : "ameritech.net"
185
+ }
186
+ },
187
+ {
188
+ "::69.219.80.0/118" : {
189
+ "domain" : "ameritech.net"
190
+ }
191
+ },
192
+ {
193
+ "::69.219.84.0/120" : {
194
+ "domain" : "ameritech.net"
195
+ }
196
+ },
197
+ {
198
+ "::70.46.0.0/113" : {
199
+ "domain" : "nuvox.net"
200
+ }
201
+ },
202
+ {
203
+ "::70.46.128.0/118" : {
204
+ "domain" : "nuvox.net"
205
+ }
206
+ },
207
+ {
208
+ "::70.46.132.0/120" : {
209
+ "domain" : "nuvox.net"
210
+ }
211
+ },
212
+ {
213
+ "::71.136.2.0/119" : {
214
+ "domain" : "pacbell.net"
215
+ }
216
+ },
217
+ {
218
+ "::71.136.4.0/118" : {
219
+ "domain" : "pacbell.net"
220
+ }
221
+ },
222
+ {
223
+ "::71.136.8.0/117" : {
224
+ "domain" : "pacbell.net"
225
+ }
226
+ },
227
+ {
228
+ "::71.136.16.0/116" : {
229
+ "domain" : "pacbell.net"
230
+ }
231
+ },
232
+ {
233
+ "::71.136.32.0/115" : {
234
+ "domain" : "pacbell.net"
235
+ }
236
+ },
237
+ {
238
+ "::71.136.64.0/114" : {
239
+ "domain" : "pacbell.net"
240
+ }
241
+ },
242
+ {
243
+ "::71.136.128.0/113" : {
244
+ "domain" : "pacbell.net"
245
+ }
246
+ },
247
+ {
248
+ "::71.137.0.0/112" : {
249
+ "domain" : "pacbell.net"
250
+ }
251
+ },
252
+ {
253
+ "::71.138.0.0/113" : {
254
+ "domain" : "pacbell.net"
255
+ }
256
+ },
257
+ {
258
+ "::71.138.128.0/114" : {
259
+ "domain" : "pacbell.net"
260
+ }
261
+ },
262
+ {
263
+ "::71.138.192.0/116" : {
264
+ "domain" : "pacbell.net"
265
+ }
266
+ },
267
+ {
268
+ "::71.138.208.0/119" : {
269
+ "domain" : "pacbell.net"
270
+ }
271
+ },
272
+ {
273
+ "::74.0.88.0/117" : {
274
+ "domain" : "covad.net"
275
+ }
276
+ },
277
+ {
278
+ "::74.0.96.0/115" : {
279
+ "domain" : "covad.net"
280
+ }
281
+ },
282
+ {
283
+ "::74.0.128.0/113" : {
284
+ "domain" : "covad.net"
285
+ }
286
+ },
287
+ {
288
+ "::74.1.0.0/112" : {
289
+ "domain" : "covad.net"
290
+ }
291
+ },
292
+ {
293
+ "::74.2.0.0/113" : {
294
+ "domain" : "covad.net"
295
+ }
296
+ },
297
+ {
298
+ "::74.2.128.0/115" : {
299
+ "domain" : "covad.net"
300
+ }
301
+ },
302
+ {
303
+ "::74.2.160.0/117" : {
304
+ "domain" : "covad.net"
305
+ }
306
+ },
307
+ {
308
+ "::74.2.168.0/118" : {
309
+ "domain" : "covad.net"
310
+ }
311
+ },
312
+ {
313
+ "::74.2.172.0/119" : {
314
+ "domain" : "covad.net"
315
+ }
316
+ },
317
+ {
318
+ "::74.2.174.0/120" : {
319
+ "domain" : "covad.net"
320
+ }
321
+ },
322
+ {
323
+ "::75.77.84.0/118" : {
324
+ "domain" : "nuvox.net"
325
+ }
326
+ },
327
+ {
328
+ "::75.77.88.0/117" : {
329
+ "domain" : "nuvox.net"
330
+ }
331
+ },
332
+ {
333
+ "::75.77.96.0/115" : {
334
+ "domain" : "nuvox.net"
335
+ }
336
+ },
337
+ {
338
+ "::75.77.128.0/113" : {
339
+ "domain" : "nuvox.net"
340
+ }
341
+ },
342
+ {
343
+ "::78.26.67.0/120" : {
344
+ "domain" : "popwifi.it"
345
+ }
346
+ },
347
+ {
348
+ "::78.26.68.0/118" : {
349
+ "domain" : "popwifi.it"
350
+ }
351
+ },
352
+ {
353
+ "::78.26.72.0/117" : {
354
+ "domain" : "popwifi.it"
355
+ }
356
+ },
357
+ {
358
+ "::78.26.80.0/116" : {
359
+ "domain" : "popwifi.it"
360
+ }
361
+ },
362
+ {
363
+ "::78.26.96.0/117" : {
364
+ "domain" : "popwifi.it"
365
+ }
366
+ },
367
+ {
368
+ "::78.26.104.0/118" : {
369
+ "domain" : "popwifi.it"
370
+ }
371
+ },
372
+ {
373
+ "::78.26.108.0/119" : {
374
+ "domain" : "popwifi.it"
375
+ }
376
+ },
377
+ {
378
+ "::78.26.110.0/120" : {
379
+ "domain" : "popwifi.it"
380
+ }
381
+ },
382
+ {
383
+ "::81.2.64.0/115" : {
384
+ "domain" : "in-addr.arpa"
385
+ }
386
+ },
387
+ {
388
+ "::83.206.0.0/112" : {
389
+ "domain" : "oleane.fr"
390
+ }
391
+ },
392
+ {
393
+ "::89.160.0.0/116" : {
394
+ "domain" : "bredband2.com"
395
+ }
396
+ },
397
+ {
398
+ "::89.160.16.0/117" : {
399
+ "domain" : "bredband2.com"
400
+ }
401
+ },
402
+ {
403
+ "::89.160.24.0/118" : {
404
+ "domain" : "bredband2.com"
405
+ }
406
+ },
407
+ {
408
+ "::89.160.28.0/119" : {
409
+ "domain" : "bredband2.com"
410
+ }
411
+ },
412
+ {
413
+ "::89.160.30.0/120" : {
414
+ "domain" : "bredband2.com"
415
+ }
416
+ },
417
+ {
418
+ "::89.92.0.0/111" : {
419
+ "domain" : "bbox.fr"
420
+ }
421
+ },
422
+ {
423
+ "::89.94.0.0/112" : {
424
+ "domain" : "bbox.fr"
425
+ }
426
+ },
427
+ {
428
+ "::89.95.0.0/113" : {
429
+ "domain" : "bbox.fr"
430
+ }
431
+ },
432
+ {
433
+ "::89.95.128.0/114" : {
434
+ "domain" : "bbox.fr"
435
+ }
436
+ },
437
+ {
438
+ "::89.95.192.0/115" : {
439
+ "domain" : "bbox.fr"
440
+ }
441
+ },
442
+ {
443
+ "::89.95.224.0/116" : {
444
+ "domain" : "bbox.fr"
445
+ }
446
+ },
447
+ {
448
+ "::89.95.240.0/119" : {
449
+ "domain" : "bbox.fr"
450
+ }
451
+ }
452
+ ]