eaternet 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eaternet/agencies/austin.rb +4 -0
- data/lib/eaternet/version.rb +1 -1
- data/test/eaternet/agencies/austin_test.rb +2 -0
- 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: a3f02955cec7f61a7fc3510be4ada0ab4835695d
|
4
|
+
data.tar.gz: 07057245f50e78cf79d991396f65117187fa9fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc8ff9aca582d759166b21d37236b1ccf0832d8eb42960ec375691bcc6d6fefffe15005053e1e697774e4aba6c9e45b4c363ed565466c1777802e92ca2eac90f
|
7
|
+
data.tar.gz: 5b3d08478edc5b11ed7720157e9db2e45ff65fa957b17a110872ade74b0f4d676faa8a334e1e91614bbc5af5dc18583a6c16e609bceb0e1b082ee879708e306d
|
@@ -72,6 +72,8 @@ module Eaternet
|
|
72
72
|
address_lines = row['Address'].split("\n")
|
73
73
|
address = address_lines.first
|
74
74
|
city = address_lines[1].split(',').first
|
75
|
+
address_lines[2] =~ /^\(([^,]+), (.+)\)$/
|
76
|
+
lat, lon = $1, $2
|
75
77
|
|
76
78
|
b.business_id = row['Facility ID']
|
77
79
|
b.name = row['Restaurant Name']
|
@@ -79,6 +81,8 @@ module Eaternet
|
|
79
81
|
b.city = city
|
80
82
|
b.postal_code = row['Zip Code']
|
81
83
|
b.state = 'TX'
|
84
|
+
b.latitude = lat
|
85
|
+
b.longitude = lon
|
82
86
|
end
|
83
87
|
end
|
84
88
|
|
data/lib/eaternet/version.rb
CHANGED
@@ -24,6 +24,8 @@ class AustinAdapterTest < Minitest::Test
|
|
24
24
|
assert_equal 'AUSTIN', b.city
|
25
25
|
assert_equal '78701', b.postal_code
|
26
26
|
assert_equal 'TX', b.state
|
27
|
+
assert_equal 30.277553492000038, b.latitude
|
28
|
+
assert_equal -97.74209889799994, b.longitude
|
27
29
|
end
|
28
30
|
|
29
31
|
def test_businesses_returns_correct_city
|