ip_lookup 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d6593b39b336032a59d5271dd66cdd0eab98d761eae3f4b9ba7e5029781ee2d
4
- data.tar.gz: 31a52ea45909d4de79db6f0d43e8d3cbb1d927c27970c6ff3ed2c4c363e033b2
3
+ metadata.gz: 2b00445540dc98f541e8d87c8219796c94cc4606e2c3c1d9efe6b73732ef4a03
4
+ data.tar.gz: e53488f375b7c8195ff07055be44da1623d0cbb962494477fbc3c42ba35aa1c8
5
5
  SHA512:
6
- metadata.gz: bf2cbaaf566345c12f089321f89fa818d72122da8924fb8e5284b2d5edb39db35fe302b210ab69a4bb3a7e3a62044ad7f6f22b541d65798f6921d2412b1581ef
7
- data.tar.gz: ec4966ad08a3467f51ed81abafe752b332e76fa9d69d83815ff35706c6081e7bdafe1e258b5195101c5619c1903337a441f03e8931eb79e3c8b4ef723d734899
6
+ metadata.gz: 5742ef17eced00830cac7ec67ae7bfd678349d5a0ef04ede285810d28af6b8d0b918d851243cef3296084b0ce69ad7174cc23dc04817806dd798f2dfdd687675
7
+ data.tar.gz: 40ce04da68196627b220b3520608bacfb8db0a4e6ec4a65c690173e687fc872b52b40be7f3ee63aa9dd47d9ae98552f88ca50f10f747f418f2ef42c6f805e0f2
data/lib/ip_lookup.rb CHANGED
@@ -21,7 +21,7 @@ class IPLookup
21
21
  def country
22
22
  return DEFAULT_COUNTRY unless result&.found?
23
23
 
24
- iso_code = result.country.iso_code
24
+ iso_code = result.country.iso_code || result.registered_country.iso_code
25
25
  iso_code ? iso_code.downcase : DEFAULT_COUNTRY
26
26
  end
27
27
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class IPLookup
4
- VERSION = "1.2.2"
4
+ VERSION = "1.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ip_lookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ole Richter
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-08-15 00:00:00.000000000 Z
13
+ date: 2018-10-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: maxminddb