locality 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/locality/ip.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a14fd2092532204ba93de6cc5843a318efa61fce
|
|
4
|
+
data.tar.gz: ec9160776867dbbc6185c28c89536002c02bef1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b734cba2304fc76abeefa5453e9107534a8bd7a107ac0ec28dedb4892a5223c5f486eb1003f59fdf4474649d593596c4ca01fe23f4c3ed7e0728ed55beb571c
|
|
7
|
+
data.tar.gz: b95daf47249ccf281d6967853fcbe57dce14ccda3b6b23c103e25586a6fb89069c10555801c149a4b24b61e7ba332e708b0a0cbf9ed1eb3b4f3c85b3e28064c7
|
data/lib/locality/ip.rb
CHANGED
|
@@ -46,21 +46,25 @@ module Locality
|
|
|
46
46
|
def city_name
|
|
47
47
|
return unless lookup
|
|
48
48
|
lookup.city.presence
|
|
49
|
+
rescue => exception
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
def province_name
|
|
52
53
|
return unless lookup
|
|
53
54
|
lookup.province.presence
|
|
55
|
+
rescue => exception
|
|
54
56
|
end
|
|
55
57
|
|
|
56
58
|
def state_name
|
|
57
59
|
return unless lookup
|
|
58
60
|
lookup.state.presence
|
|
61
|
+
rescue => exception
|
|
59
62
|
end
|
|
60
63
|
|
|
61
64
|
def country_name
|
|
62
65
|
return unless lookup
|
|
63
66
|
lookup.country.presence
|
|
67
|
+
rescue => exception
|
|
64
68
|
end
|
|
65
69
|
|
|
66
70
|
private
|