geoip2_c 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ubuntu.yml +33 -0
  3. data/.github/workflows/windows.yml +52 -0
  4. data/README.md +22 -10
  5. data/docker-compose.yml +22 -1
  6. data/dockerfiles/{Dockerfile-ruby2.3 → Dockerfile-ruby2.5} +1 -1
  7. data/dockerfiles/{Dockerfile-ruby2.1 → Dockerfile-ruby2.6} +1 -1
  8. data/dockerfiles/{Dockerfile-ruby2.2 → Dockerfile-ruby2.7} +1 -1
  9. data/ext/geoip2/extconf.rb +11 -4
  10. data/ext/geoip2/geoip2.c +63 -18
  11. data/ext/geoip2/libmaxminddb/.gitignore +3 -0
  12. data/ext/geoip2/libmaxminddb/.travis.yml +24 -2
  13. data/ext/geoip2/libmaxminddb/Changes.md +39 -0
  14. data/ext/geoip2/libmaxminddb/README.dev.md +41 -30
  15. data/ext/geoip2/libmaxminddb/README.md +3 -3
  16. data/ext/geoip2/libmaxminddb/bin/Makefile.am +5 -0
  17. data/ext/geoip2/libmaxminddb/bin/mmdblookup.c +333 -15
  18. data/ext/geoip2/libmaxminddb/configure.ac +5 -5
  19. data/ext/geoip2/libmaxminddb/dev-bin/ppa-release.sh +8 -5
  20. data/ext/geoip2/libmaxminddb/dev-bin/release.sh +7 -0
  21. data/ext/geoip2/libmaxminddb/dev-bin/valgrind-all.pl +10 -3
  22. data/ext/geoip2/libmaxminddb/include/maxminddb.h +11 -2
  23. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb.vcxproj +3 -1
  24. data/ext/geoip2/libmaxminddb/projects/VS12/libmaxminddb.vcxproj.filters +7 -1
  25. data/ext/geoip2/libmaxminddb/src/Makefile.am +18 -2
  26. data/ext/geoip2/libmaxminddb/src/data-pool.c +180 -0
  27. data/ext/geoip2/libmaxminddb/src/data-pool.h +52 -0
  28. data/ext/geoip2/libmaxminddb/src/maxminddb.c +58 -48
  29. data/ext/geoip2/libmaxminddb/t/Makefile.am +6 -2
  30. data/ext/geoip2/libmaxminddb/t/bad_databases_t.c +1 -0
  31. data/ext/geoip2/libmaxminddb/t/basic_lookup_t.c +35 -0
  32. data/ext/geoip2/libmaxminddb/t/data-pool-t.c +374 -0
  33. data/ext/geoip2/libmaxminddb/t/external_symbols_t.pl +106 -0
  34. data/ext/geoip2/libmaxminddb/t/libtap/.gitignore +13 -0
  35. data/ext/geoip2/libmaxminddb/t/libtap/.travis.yml +13 -0
  36. data/ext/geoip2/libmaxminddb/t/libtap/COPYING +165 -0
  37. data/ext/geoip2/libmaxminddb/t/libtap/INSTALL +41 -0
  38. data/ext/geoip2/libmaxminddb/t/libtap/Makefile +72 -0
  39. data/ext/geoip2/libmaxminddb/t/libtap/Makefile.win +37 -0
  40. data/ext/geoip2/libmaxminddb/t/libtap/README.md +268 -0
  41. data/ext/geoip2/libmaxminddb/t/libtap/t/cmp_mem.c +20 -0
  42. data/ext/geoip2/libmaxminddb/t/libtap/t/cmp_mem.expected +28 -0
  43. data/ext/geoip2/libmaxminddb/t/libtap/t/cmpok.c +16 -0
  44. data/ext/geoip2/libmaxminddb/t/libtap/t/cmpok.expected +37 -0
  45. data/ext/geoip2/libmaxminddb/t/libtap/t/diag.c +10 -0
  46. data/ext/geoip2/libmaxminddb/t/libtap/t/diag.expected +2 -0
  47. data/ext/geoip2/libmaxminddb/t/libtap/t/diesok.c +14 -0
  48. data/ext/geoip2/libmaxminddb/t/libtap/t/diesok.expected +6 -0
  49. data/ext/geoip2/libmaxminddb/t/libtap/t/is.c +24 -0
  50. data/ext/geoip2/libmaxminddb/t/libtap/t/is.expected +58 -0
  51. data/ext/geoip2/libmaxminddb/t/libtap/t/like.c +10 -0
  52. data/ext/geoip2/libmaxminddb/t/libtap/t/like.expected +4 -0
  53. data/ext/geoip2/libmaxminddb/t/libtap/t/simple.c +31 -0
  54. data/ext/geoip2/libmaxminddb/t/libtap/t/simple.expected +32 -0
  55. data/ext/geoip2/libmaxminddb/t/libtap/t/skip.c +23 -0
  56. data/ext/geoip2/libmaxminddb/t/libtap/t/skip.expected +9 -0
  57. data/ext/geoip2/libmaxminddb/t/libtap/t/synopsis.c +13 -0
  58. data/ext/geoip2/libmaxminddb/t/libtap/t/synopsis.expected +9 -0
  59. data/ext/geoip2/libmaxminddb/t/libtap/t/test.c +28 -0
  60. data/ext/geoip2/libmaxminddb/t/libtap/t/todo.c +17 -0
  61. data/ext/geoip2/libmaxminddb/t/libtap/t/todo.expected +11 -0
  62. data/ext/geoip2/libmaxminddb/t/libtap/tap.c +354 -0
  63. data/ext/geoip2/libmaxminddb/t/libtap/tap.h +115 -0
  64. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitattributes +1 -0
  65. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitconfig +2 -0
  66. data/ext/geoip2/libmaxminddb/t/maxmind-db/.gitignore +2 -0
  67. data/ext/geoip2/libmaxminddb/t/maxmind-db/.perltidyallrc +11 -0
  68. data/ext/geoip2/libmaxminddb/t/maxmind-db/.tidyallrc +7 -0
  69. data/ext/geoip2/libmaxminddb/t/maxmind-db/LICENSE +4 -0
  70. data/ext/geoip2/libmaxminddb/t/maxmind-db/MaxMind-DB-spec.md +558 -0
  71. data/ext/geoip2/libmaxminddb/t/maxmind-db/README.md +4 -0
  72. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/README.md +7 -0
  73. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/libmaxminddb/libmaxminddb-offset-integer-overflow.mmdb +0 -0
  74. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/cyclic-data-structure.mmdb +0 -0
  75. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-bytes-length.mmdb +1 -0
  76. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-data-record-offset.mmdb +0 -0
  77. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-map-key-length.mmdb +0 -0
  78. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/invalid-string-length.mmdb +1 -0
  79. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/metadata-is-an-uint128.mmdb +1 -0
  80. data/ext/geoip2/libmaxminddb/t/maxmind-db/bad-data/maxminddb-golang/unexpected-bytes.mmdb +0 -0
  81. data/ext/geoip2/libmaxminddb/t/maxmind-db/perltidyrc +12 -0
  82. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Anonymous-IP-Test.json +32 -0
  83. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-City-Test.json +12616 -0
  84. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Connection-Type-Test.json +102 -0
  85. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Country-Test.json +10975 -0
  86. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-DensityIncome-Test.json +14 -0
  87. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Domain-Test.json +452 -0
  88. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Enterprise-Test.json +666 -0
  89. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-ISP-Test.json +12585 -0
  90. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoIP2-Precision-Enterprise-Test.json +1035 -0
  91. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/GeoLite2-ASN-Test.json +37 -0
  92. data/ext/geoip2/libmaxminddb/t/maxmind-db/source-data/README +13 -0
  93. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
  94. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb +0 -0
  95. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test-Invalid-Node-Count.mmdb +0 -0
  96. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-City-Test.mmdb +0 -0
  97. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
  98. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Country-Test.mmdb +0 -0
  99. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
  100. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Domain-Test.mmdb +0 -0
  101. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
  102. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-ISP-Test.mmdb +0 -0
  103. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoIP2-Precision-Enterprise-Test.mmdb +0 -0
  104. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/GeoLite2-ASN-Test.mmdb +0 -0
  105. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb +0 -0
  106. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
  107. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-broken-pointers-24.mmdb +0 -0
  108. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-broken-search-tree-24.mmdb +0 -0
  109. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
  110. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
  111. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
  112. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
  113. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
  114. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
  115. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
  116. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
  117. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
  118. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
  119. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
  120. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/MaxMind-DB-test-nested.mmdb +0 -0
  121. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/README.md +26 -0
  122. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/maps-with-pointers.raw +0 -0
  123. data/ext/geoip2/libmaxminddb/t/maxmind-db/test-data/write-test-data.pl +614 -0
  124. data/ext/geoip2/libmaxminddb/t/maxmind-db/tidyall.ini +5 -0
  125. data/geoip2_c.gemspec +2 -3
  126. data/lib/geoip2/database.rb +4 -0
  127. data/lib/geoip2/version.rb +1 -1
  128. metadata +114 -22
  129. data/.travis.yml +0 -31
  130. data/Appraisals +0 -7
  131. data/gemfiles/ruby_2.1.gemfile +0 -7
  132. data/gemfiles/ruby_2.2.gemfile +0 -7
@@ -0,0 +1,102 @@
1
+ [
2
+ {
3
+ "::1.0.0.0/120" : {
4
+ "connection_type" : "Dialup"
5
+ }
6
+ },
7
+ {
8
+ "::1.0.1.0/120" : {
9
+ "connection_type" : "Cable/DSL"
10
+ }
11
+ },
12
+ {
13
+ "::1.0.2.0/119" : {
14
+ "connection_type" : "Dialup"
15
+ }
16
+ },
17
+ {
18
+ "::1.0.4.0/118" : {
19
+ "connection_type" : "Dialup"
20
+ }
21
+ },
22
+ {
23
+ "::1.0.8.0/117" : {
24
+ "connection_type" : "Dialup"
25
+ }
26
+ },
27
+ {
28
+ "::1.0.16.0/116" : {
29
+ "connection_type" : "Dialup"
30
+ }
31
+ },
32
+ {
33
+ "::1.0.32.0/115" : {
34
+ "connection_type" : "Dialup"
35
+ }
36
+ },
37
+ {
38
+ "::1.0.64.0/114" : {
39
+ "connection_type" : "Dialup"
40
+ }
41
+ },
42
+ {
43
+ "::1.0.128.0/113" : {
44
+ "connection_type" : "Dialup"
45
+ }
46
+ },
47
+ {
48
+ "::80.214.0.0/116" : {
49
+ "connection_type" : "Cellular"
50
+ }
51
+ },
52
+ {
53
+ "::96.1.0.0/112" : {
54
+ "connection_type" : "Cable/DSL"
55
+ }
56
+ },
57
+ {
58
+ "::96.10.0.0/111" : {
59
+ "connection_type" : "Cable/DSL"
60
+ }
61
+ },
62
+ {
63
+ "::96.69.0.0/112" : {
64
+ "connection_type" : "Cable/DSL"
65
+ }
66
+ },
67
+ {
68
+ "::96.94.0.0/111" : {
69
+ "connection_type" : "Cable/DSL"
70
+ }
71
+ },
72
+ {
73
+ "::108.96.0.0/107" : {
74
+ "connection_type" : "Cellular"
75
+ }
76
+ },
77
+ {
78
+ "::175.16.199.0/120" : {
79
+ "connection_type" : "Dialup"
80
+ }
81
+ },
82
+ {
83
+ "::187.156.138.0/120" : {
84
+ "connection_type" : "Cable/DSL"
85
+ }
86
+ },
87
+ {
88
+ "::201.243.200.0/120" : {
89
+ "connection_type" : "Corporate"
90
+ }
91
+ },
92
+ {
93
+ "::207.179.48.0/116" : {
94
+ "connection_type" : "Cellular"
95
+ }
96
+ },
97
+ {
98
+ "2003::/24" : {
99
+ "connection_type" : "Cable/DSL"
100
+ }
101
+ }
102
+ ]