melissa_data 0.2.9 → 0.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a2d1c14fae142e1b7db960206ab2bfd4a92472a
4
- data.tar.gz: 23673e562b14370f68aa258c6928812d41df6117
3
+ metadata.gz: f8c9470647ad842838af366377c25247857c85d5
4
+ data.tar.gz: 7d4b8764eebf11307db085ef2bfdc1bdb839ba55
5
5
  SHA512:
6
- metadata.gz: 91f0c84787868cb9d282c1d5d9b81ca571a111a21c25a5952ccec367b9c53e59a7548bda369b3bd600a699fa1dd61bfa30fb663d9bf5f85095e12908228a7ad2
7
- data.tar.gz: acb746a12479cc13b8e5d822578a0f2d50c712dd3cca7cec47434791e9f37015a7473dd745f19ff3924e6c718a89ab8e4b422aab4f93a24a10821160d1fa619a
6
+ metadata.gz: 0abd16db6fe44be459997d03285a9d33c8a91391f7ba3e9020e9761732cbdee693b93a2cfe521c993d2ed0eea35c5d12fda9e2470987584dcf65cfcffd2e7dd9
7
+ data.tar.gz: dbe80b2db429785696408bc5d2cbf1dee1579f3e9427c40ff3a9cbdbee22ebd5668e0f2dff69785e0ef0903d705ababe71bb3230a3c1d6cb90cb2aaecdd23124
@@ -14,9 +14,18 @@ module MelissaData
14
14
  end
15
15
 
16
16
  def coordinates?(response)
17
- lat = response[:property_address][:latitude]
18
- long = response[:property_address][:longitude]
19
- lat != nil && long != nil
17
+ if !response[:errors]
18
+ lat = response.fetch(:property_address)[:latitude]
19
+ long =response.fetch(:property_address)[:longitude]
20
+ lat != nil && long != nil
21
+ else
22
+ false
23
+ end
24
+ end
25
+
26
+ def authenticate
27
+ Geokit::Geocoders::GoogleGeocoder.api_key = MelissaData.google_maps_api_key
28
+ Geokit::Geocoders::GoogleGeocoder.api_key
20
29
  end
21
30
 
22
31
  def authenticate
@@ -1,3 +1,3 @@
1
1
  module MelissaData
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: melissa_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Grayson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-01-27 00:00:00.000000000 Z
12
+ date: 2016-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri