eaternet 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/eaternet.gemspec +1 -1
- data/lib/eaternet/lives_1_0.rb +42 -9
- data/lib/eaternet/version.rb +1 -1
- data/test/lives_1_0/feed_info_test.rb +5 -0
- data/test/lives_1_0/inspection_test.rb +1 -1
- metadata +3 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f47d6d78b52b5b55f09751345eccf00d74d1f18f
|
4
|
+
data.tar.gz: acad763f1ce90905f8e96dc59c60c79b5cc33cae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abaa54be2f9695055f50cfff9f23d7496d71dde8318053de5301500882ca5c099c810e908a630aa5c19d86622dc4efa841c4f29651f57974c91db6e6449da2ef
|
7
|
+
data.tar.gz: 5ee3213153c53c209221894a7909776f736b48c9ccf171ea3764edc3947e76b72e52427ba89c06c533167ce1a4d9e28b4ee18a0762f27ccd94d57d30cf997d1f
|
data/eaternet.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency 'guard'
|
24
24
|
spec.add_development_dependency 'guard-minitest'
|
25
25
|
spec.add_development_dependency 'minitest'
|
26
|
-
spec.add_development_dependency 'minitest-utils'
|
26
|
+
# spec.add_development_dependency 'minitest-utils'
|
27
27
|
spec.add_development_dependency 'pry'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10'
|
29
29
|
spec.add_development_dependency 'vcr'
|
data/lib/eaternet/lives_1_0.rb
CHANGED
@@ -76,15 +76,47 @@ module Eaternet
|
|
76
76
|
# A food service establishment, e.g. a restaurant.
|
77
77
|
#
|
78
78
|
# @!attribute [rw] business_id
|
79
|
-
#
|
80
|
-
# this may be the license number.
|
79
|
+
# Unique identifier for the business. For many cities,
|
80
|
+
# this may be the license number. Required.
|
81
|
+
# @return [String]
|
81
82
|
#
|
82
83
|
# @!attribute [rw] name
|
83
|
-
#
|
84
|
+
# Common name of the business. Required.
|
85
|
+
# @return [String]
|
84
86
|
#
|
85
87
|
# @!attribute [rw] address
|
86
|
-
#
|
87
|
-
#
|
88
|
+
# Street address of the business. For example: 706 Mission St.
|
89
|
+
# Required.
|
90
|
+
# @return [String]
|
91
|
+
#
|
92
|
+
# @!attribute [rw] city
|
93
|
+
# City of the business. This field must be included if the
|
94
|
+
# file contains businesses from multiple cities.
|
95
|
+
# @return [String]
|
96
|
+
#
|
97
|
+
# @!attribute [rw] state
|
98
|
+
# State or province for the business. In the U.S. this should
|
99
|
+
# be the two-letter code for the state. Optional.
|
100
|
+
# @return [String]
|
101
|
+
#
|
102
|
+
# @!attribute [rw] postal_code
|
103
|
+
# Zip code or other postal code. Optional.
|
104
|
+
# @return [String]
|
105
|
+
#
|
106
|
+
# @!attribute [rw] latitude
|
107
|
+
# Latitude of the business. This field must be a valid WGS 84
|
108
|
+
# latitude. For example: 37.7859547. Optional.
|
109
|
+
# @return [Float]
|
110
|
+
#
|
111
|
+
# @!attribute [rw] longitude
|
112
|
+
# Longitude of the business. This field must be a valid WGS 84
|
113
|
+
# longitude. For example: -122.4024658. Optional.
|
114
|
+
# @return [Float]
|
115
|
+
#
|
116
|
+
# @!attribute [rw] phone_number
|
117
|
+
# Phone number for a business including country specific dialing
|
118
|
+
# information. For example: +14159083801
|
119
|
+
# @return [String]
|
88
120
|
#
|
89
121
|
# @see http://www.yelp.com/healthscores#businesses LIVES/Business
|
90
122
|
class Business < ValidatedObject
|
@@ -113,7 +145,7 @@ module Eaternet
|
|
113
145
|
allow_nil: true
|
114
146
|
|
115
147
|
def ==(other)
|
116
|
-
|
148
|
+
self.business_id == other.business_id
|
117
149
|
end
|
118
150
|
|
119
151
|
def eql?(other)
|
@@ -121,12 +153,12 @@ module Eaternet
|
|
121
153
|
end
|
122
154
|
|
123
155
|
def hash
|
124
|
-
|
156
|
+
self.business_id.hash
|
125
157
|
end
|
126
158
|
|
127
159
|
# @return [String]
|
128
160
|
def to_s
|
129
|
-
"Business #{
|
161
|
+
"Business #{self.business_id}"
|
130
162
|
end
|
131
163
|
end
|
132
164
|
|
@@ -151,11 +183,12 @@ module Eaternet
|
|
151
183
|
allow_nil: true
|
152
184
|
|
153
185
|
def score
|
186
|
+
# noinspection RubyResolve
|
154
187
|
@score.nil? ? '' : @score
|
155
188
|
end
|
156
189
|
|
157
190
|
def to_s
|
158
|
-
"Inspection #{
|
191
|
+
"Inspection #{self.business_id}/#{self.date}/#{self.score}"
|
159
192
|
end
|
160
193
|
end
|
161
194
|
|
data/lib/eaternet/version.rb
CHANGED
@@ -19,7 +19,7 @@ class InspectionTest < Minitest::Test
|
|
19
19
|
|
20
20
|
def test_rejects_unspecified_types
|
21
21
|
assert_raises(ArgumentError) {
|
22
|
-
|
22
|
+
Eaternet::Lives_1_0::Inspection.new do |i|
|
23
23
|
i.business_id = 'abcdef1'
|
24
24
|
i.score = 98
|
25
25
|
i.date = Date.new(2012, 2, 3)
|
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: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robb Shecter
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: minitest-utils
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: pry
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
207
|
version: '0'
|
222
208
|
requirements: []
|
223
209
|
rubyforge_project:
|
224
|
-
rubygems_version: 2.4.
|
210
|
+
rubygems_version: 2.4.6
|
225
211
|
signing_key:
|
226
212
|
specification_version: 4
|
227
213
|
summary: Regional adapters for restaurant health scores
|
@@ -236,3 +222,4 @@ test_files:
|
|
236
222
|
- test/nyc_adapter_test.rb
|
237
223
|
- test/snhd_adapter_test.rb
|
238
224
|
- test/test_helper.rb
|
225
|
+
has_rdoc:
|