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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/locality/ip.rb +4 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 591c479c6de4fc2ca797a6d7883ac2a0ca3b50fa
4
- data.tar.gz: 79a46826c64538d3c28919dd01297e7ae2897430
3
+ metadata.gz: a14fd2092532204ba93de6cc5843a318efa61fce
4
+ data.tar.gz: ec9160776867dbbc6185c28c89536002c02bef1f
5
5
  SHA512:
6
- metadata.gz: e69a0dc42a15b93de8a8611959d38207459a5d1c2d11e28aa4ae90b021af9daaeda65f9eaf4006a5f706f84085963036e0af4e3b6edf26851df4234421252bef
7
- data.tar.gz: 63181df134a83c06670954535eec745ed35cfd4b069614ca58adf1c94cedc48ebda15656d03261621cd0f998cf226f64c7e3db91ca46b70c095bb6a81feaaabc
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locality
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bukowskis