tops_connect 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tops_connect/property.rb +16 -7
- data/lib/tops_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1da159c957169c864437ed7a8125f908903a22f529618e5ac44ea113eabe7a4
|
4
|
+
data.tar.gz: e4c412f6145319bb92afe3347fbcaa9e96c30e7d0bb1436ca3602bfa20a7f846
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e68a54baaeb1e084cc883432a344faf46a3563234365319c0462cf9e01b51a5035a029869af8d8f30534acc730133b32da627879695302188b74f9c8d5baf56c
|
7
|
+
data.tar.gz: e6712c7f64c7c30d529e5436e08fdac9a39c051339268b7df679757c29083fbf183607ad89bdd978462a5df7394efae2a311bf7d0f7684d7681fc3da70c8002a
|
@@ -12,13 +12,10 @@ module TopsConnect
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def address
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
]
|
20
|
-
|
21
|
-
lines.map(&:strip).select { |line| line.match?(/[[:graph:]]/) }.join("\n")
|
15
|
+
[*address_lines_with_unit_number, city_state_zip]
|
16
|
+
.map(&:strip)
|
17
|
+
.select { |line| line.match?(/[[:graph:]]/) }
|
18
|
+
.join("\n")
|
22
19
|
end
|
23
20
|
|
24
21
|
def community_key
|
@@ -42,5 +39,17 @@ module TopsConnect
|
|
42
39
|
@property ||= data['Addresses']
|
43
40
|
.find { |row| row.dig('Type', 'Name') == 'Property' }
|
44
41
|
end
|
42
|
+
|
43
|
+
# Sometimes the unit number is alone on the second line
|
44
|
+
def address_lines_with_unit_number
|
45
|
+
if property['AddressLine2'].match?(/\A\d+\z/)
|
46
|
+
return ["#{property['AddressLine1']} ##{property['AddressLine2']}"]
|
47
|
+
end
|
48
|
+
|
49
|
+
[
|
50
|
+
property['AddressLine1'],
|
51
|
+
property['AddressLine2']
|
52
|
+
]
|
53
|
+
end
|
45
54
|
end
|
46
55
|
end
|
data/lib/tops_connect/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tops_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Hoffman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|