eaternet 0.4.0 → 0.4.1
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 +4 -4
- data/lib/eaternet/agencies/snhd_lives.rb +21 -10
- data/lib/eaternet/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: 6eb3f1b95324d324a96a86b17b3443c2a63faf7f
|
4
|
+
data.tar.gz: d632f2ab776c0b300585aeed643a62ad409e3fda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 540884ffeac6ea7565996b267098cf5ceaf9ad1c4598ed37032ed97183a6e813376bb19bd6c279db3d78b4567f4c170530fc86a76f2a85fa15a506aea2548e87
|
7
|
+
data.tar.gz: 2ed55163141bcabeffc106ac400a4873257a50e193fb692809068bf5957de7cd1e45595a250a12e8c0f7840b6f7a6f4601be34c0e309375a2c6d6b20ef9896bf
|
@@ -13,16 +13,27 @@ module Eaternet
|
|
13
13
|
|
14
14
|
def businesses
|
15
15
|
@prototype.businesses
|
16
|
-
.map { |proto|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
16
|
+
.map { |proto| try_to_create_business(proto) }
|
17
|
+
end
|
18
|
+
|
19
|
+
def try_to_create_business(proto)
|
20
|
+
business(proto)
|
21
|
+
rescue ArgumentError => e
|
22
|
+
logger.warn('SNHD LIVES adapter') do
|
23
|
+
"Could not create a LIVES Business from #{proto.inspect}: #{e}"
|
24
|
+
end
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
|
28
|
+
def business(proto)
|
29
|
+
Business.new do |b|
|
30
|
+
b.business_id = proto.orig_key
|
31
|
+
b.name = proto.name
|
32
|
+
b.address = proto.address
|
33
|
+
b.city = proto.city
|
34
|
+
b.postal_code = proto.zipcode
|
35
|
+
b.state = 'NV'
|
36
|
+
end
|
26
37
|
end
|
27
38
|
|
28
39
|
def inspections
|
data/lib/eaternet/version.rb
CHANGED