get_your_rep 0.1.8 → 0.1.9
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 +0 -1
- data/lib/get_your_rep/representative.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1782c2a5230bdcc479cec091d9a35c066e8fd845
|
4
|
+
data.tar.gz: 968959010cce628943b0451ff3b21d5389c3b628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 743d761b375e97435248cf3b1f9a798c6b5282fdb21bcfdde43999894083086730483ce353272f7c2afa0f462ff8e39b465b31218832d0f5f0874d3ba0404283
|
7
|
+
data.tar.gz: 574ec214a72556ed7b3bc3bff029a74007a0c7398abec54f27d17f541bea72df6f1120b08cad16fe462fdc128de7a6528e497fddfdb06f78ea31f44942ec441d
|
@@ -14,7 +14,6 @@ module GetYourRep
|
|
14
14
|
get_coordinates(address)
|
15
15
|
end
|
16
16
|
@response = get_rep
|
17
|
-
|
18
17
|
if @response.empty? || @response.is_a?(String) || @response.first['error']
|
19
18
|
puts 'Error message received. Confirm and re-enter your address and check your parameters.'
|
20
19
|
puts @response
|
@@ -36,7 +36,9 @@ module GetYourRep
|
|
36
36
|
|
37
37
|
return self[:first_name] if self[:first_name]
|
38
38
|
|
39
|
-
if
|
39
|
+
if name.split.count == 1
|
40
|
+
nil
|
41
|
+
elsif (name.split.count > 3) || (name.split[-2].downcase == name.split[-2])
|
40
42
|
name.split[0..-3].join(' ')
|
41
43
|
else
|
42
44
|
name.split[0..-2].join(' ')
|
@@ -54,7 +56,9 @@ module GetYourRep
|
|
54
56
|
|
55
57
|
return self[:last_name] if self[:last_name]
|
56
58
|
|
57
|
-
if
|
59
|
+
if name.split.count == 1
|
60
|
+
name
|
61
|
+
elsif (name.split.count > 3) || (name.split[-2].downcase == name.split[-2])
|
58
62
|
name.split[-2..-1].join(' ')
|
59
63
|
else
|
60
64
|
name.split.last
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: get_your_rep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- msimonborg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|