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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3905a0dde5da126d12e35b9846179ad915af1135
4
- data.tar.gz: 2e48e831073280df7829c107ff1ae551d8f00d03
3
+ metadata.gz: e8903500f5a86d756aa68e7bffdd7eaa4a52058e
4
+ data.tar.gz: 82ac60af8212e35ac135e5b76c4d877435f55319
5
5
  SHA512:
6
- metadata.gz: 2e114bc0ab28225d8f8dbb78229e56a8df101d2410ae4a8d98266fc1c61439e2f9fd1b5e5ce7a6366d51a51668758daba3e4daa2e480204662573cfe6526420c
7
- data.tar.gz: d9b55356f9cacbb0bb9a77e08961d9ebc4ca7acaa6f96b03ccb145eec1687cf585e67c6f2150998bc67ebb4e6cc7b5181e6618e359ffb1b43c29c558ea441f25
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.empty? || response.is_a?(String) || response.first['error']
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
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GetYourRep
3
- VERSION = '1.0.2' # :nodoc:
3
+ VERSION = '1.0.3' # :nodoc:
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: get_your_rep
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - msimonborg