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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ffa77ddf5e2d9f787bb516b1206a0b9c5cb2f7c
4
- data.tar.gz: 26f5a359b99a7c0bdfc1fc2fdf2ecd44f4cfa303
3
+ metadata.gz: a3f02955cec7f61a7fc3510be4ada0ab4835695d
4
+ data.tar.gz: 07057245f50e78cf79d991396f65117187fa9fb3
5
5
  SHA512:
6
- metadata.gz: ad46d6fe42affe217a5d480ac13675332d824c8bd0dc70bf4416e636bf8f486a6aa040c3cd4e9fed1c8e552e3ad15b0ecae9f4a3633097658f3195034b76efc2
7
- data.tar.gz: 10cd96cb296d09ba0b2d70f9646556e2d79cb5157a5de534006b029f24bd55cc194e38b305337977647822a514977274da5dea3de68a9a789f56b705bb137a67
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
 
@@ -1,3 +1,3 @@
1
1
  module Eaternet
2
- VERSION = '1.2.0'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eaternet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robb Shecter