geoip_whois_asn_country 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geoip_whois_asn_country/version.rb +1 -1
- data/lib/geoip_whois_asn_country.rb +4 -2
- 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: 146bb167bdadc81b1d000b23ed9204d8ee34a2d00d99ea8c708629fb8e818219
|
4
|
+
data.tar.gz: c7abe914a1771c854bf71fa4797f0183b3011407468e5f9cc40bfcec94e1d30f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5050d51c3743ad0de5c5ac6e08bd316548337736d540a44991e1a56a1d5f9d8b35f40791b11b2d12c8c9b735b0fb299f7bd11dccbf7cf1e02cde22ec2411d6bf
|
7
|
+
data.tar.gz: 912da4a6e208c287719dfafb5510d220f171eeda8bb7620ff84dec6f710df084e8d556b27a28b4cfa5b81ede656858a21990845e5ab4492eedba0c0bd2d46ad1
|
@@ -90,9 +90,11 @@ module GeoipWhoisAsnCountry
|
|
90
90
|
ip = IPAddr.new(ip) if ip.is_a?(String)
|
91
91
|
ip_i = ip.to_i
|
92
92
|
if ip.ipv4?
|
93
|
-
@
|
93
|
+
key = @ipv4_sorted_keys.bsearch_index { |x| x > ip_i }
|
94
|
+
@ipv4_map[@ipv4_sorted_keys[key - 1]]
|
94
95
|
else
|
95
|
-
@
|
96
|
+
key = @ipv6_sorted_keys.bsearch_index { |x| x > ip_i }
|
97
|
+
@ipv6_map[@ipv6_sorted_keys[key - 1]]
|
96
98
|
end
|
97
99
|
end
|
98
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoip_whois_asn_country
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Wienert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Efficient lookup of ipv4/ipv6 to country using the node-modules's geo-whois-asn-country
|
14
14
|
CSVs.
|