get_your_rep 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/get_your_rep/open_states.rb +1 -3
- data/lib/get_your_rep/version.rb +1 -1
- 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: e8903500f5a86d756aa68e7bffdd7eaa4a52058e
|
4
|
+
data.tar.gz: 82ac60af8212e35ac135e5b76c4d877435f55319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 005fe820fb6e3fd02da4c76ba145986b69178a377e5bbd0cea107c1a278e3dc678efa77ce9e5868e02844f9509be11f1601b7b464acca74ac6e158a04194cee1
|
7
|
+
data.tar.gz: 071e86ac4688a8cd2e47f91540a2301b7f2ee3b8ae7884354700fd9b9a56728a6f54023f3816c9e98154cedd48420dc107b8a761b164e561601470c0af5ecb26
|
@@ -19,7 +19,7 @@ module GetYourRep
|
|
19
19
|
def all_reps(address)
|
20
20
|
self.coordinates = address.is_a?(Array) ? address : get_coordinates(address)
|
21
21
|
self.response = find_rep
|
22
|
-
if response.
|
22
|
+
if response.nil? || response.is_a?(String) || response.first['error']
|
23
23
|
handle_reps_not_found_error
|
24
24
|
else
|
25
25
|
parse_reps
|
@@ -36,8 +36,6 @@ module GetYourRep
|
|
36
36
|
long = coordinates.last
|
37
37
|
url = "http://openstates.org/api/v1/legislators/geo/?lat=#{lat}&long=#{long}"
|
38
38
|
HTTParty.get(url).parsed_response
|
39
|
-
else
|
40
|
-
Delegation.new
|
41
39
|
end
|
42
40
|
end
|
43
41
|
|
data/lib/get_your_rep/version.rb
CHANGED