eaternet 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4ecc0481436f4dd8ba8243b8f54ba7cbb756704
4
- data.tar.gz: 6555f13e6f60e7e285a4d54a9ba84750356932c8
3
+ metadata.gz: 6a05d4cd0cc0d3226970b904914b26df1f449698
4
+ data.tar.gz: 8671f3df54ad1b83c57b48603a60ab5118a13540
5
5
  SHA512:
6
- metadata.gz: 044843004945d79ccff9fa437f75833fa02e301a222e87e2daec99ef880acfad734e6e7f0f80436d5136c71486e2fa4a9e825d5d3446ae63f288fc3582e66e5f
7
- data.tar.gz: ab4356f37ce6c5d8769a0fb98240b2174eb499f75159a7b60dde2248779c45d2f478423838b341eb954759fe85d76bbc704a6c25b9b405bdb487bf8464d0c6dc
6
+ metadata.gz: 0a585fec3107eaa0e5006664f7426403b2cbb23933ef52607b9613acec8cc82a873058c3b57dcb8c550cf594a92440f4222453c2cad7a2b77e54d1f71b287b3c
7
+ data.tar.gz: a8ae0719ef5b1028c641478ae72e4554cbb2a8528d1764a25622e42166344f03e1782fe8efbd9b98b3f6735e26b864de6aef4b3893fef283870745979310a81b
data/README.md CHANGED
@@ -2,12 +2,9 @@
2
2
  [![Code Climate](https://codeclimate.com/github/eaternet/adapters-ruby/badges/gpa.svg)](https://codeclimate.com/github/eaternet/adapters-ruby)
3
3
  [![Gem Version](https://badge.fury.io/rb/eaternet.svg)](http://badge.fury.io/rb/eaternet)
4
4
 
5
- # Eaternet Health Score Adapters
5
+ # LIVES-data Health Score Adapters
6
6
 
7
- **We're bringing the world's restaurant health inspections online,** into as
8
- many sites and apps as possible.
9
-
10
- Use this repo to publish your local restaurant health scores.
7
+ Publish your local restaurant health scores.
11
8
 
12
9
  **In a nutshell:** each agency which inspects restaurants can have an
13
10
  "adapter" which is a Ruby class. Its adapter converts its source format into [a
@@ -23,7 +20,7 @@ information daily on our website.
23
20
  |-------------------|--------------------------------------|------------|-----------|
24
21
  | Las Vegas | Southern Nevada Health District | [`Snhd`](https://github.com/eaternet/adapters-ruby/blob/master/lib/eaternet/agencies/snhd.rb) | Needs refactoring and docs |
25
22
  | New York City | City of New York Health Deptartment | [`Nyc`](https://github.com/eaternet/adapters-ruby/blob/master/lib/eaternet/agencies/nyc.rb) | [Dataset wiki page](https://github.com/eaternet/adapters/wiki/Agency:-New-York-City) |
26
- | Porland, OR, USA | Multnomah Couty Environmental Health | [`Multco`](https://github.com/eaternet/adapters-ruby/blob/master/lib/eaternet/agencies/multco.rb) | Needs refactoring and docs |
23
+ | Portland, OR, USA | Multnomah Couty Environmental Health | [`Multco`](https://github.com/eaternet/adapters-ruby/blob/master/lib/eaternet/agencies/multco.rb) | Deprecated. Needs to be updated to use the Accela API |
27
24
  | San Francisco | City of San Francisco | [`Sf`](https://github.com/eaternet/adapters-ruby/blob/master/lib/eaternet/agencies/sf.rb) | Needs docs |
28
25
 
29
26
 
@@ -7,6 +7,18 @@ require 'eaternet/loggable'
7
7
 
8
8
  module Eaternet
9
9
  module Agencies
10
+
11
+ # A Multnomah County (Portland area) Oregon data source for restaurant
12
+ # health inspections.
13
+ #
14
+ # It produces output in the [LIVES 1.0](http://www.yelp.com/healthscores)
15
+ # open data standard developed by Yelp and the cities of San Francisco and
16
+ # New York.
17
+ #
18
+ # @deprecated In May, the County stopped publishing data from the source app
19
+ # which this code relies on. Additionally, the County plans to shut down
20
+ # the legacy app entirely at some point. We're planning a new version of
21
+ # this code which will use the County's new information portal.
10
22
  class Multco < Eaternet::Lives_1_0::Adapter
11
23
  include Eaternet::Loggable
12
24
 
@@ -213,6 +213,10 @@ module Eaternet
213
213
  dataset = 'xx67-kt59'
214
214
  "https://#{domain}/api/views/#{dataset}/rows.csv?accessType=DOWNLOAD"
215
215
  end
216
+
217
+ def adapter_name
218
+ 'NYC'
219
+ end
216
220
  end
217
221
  end
218
222
  end
@@ -3,11 +3,11 @@ module Eaternet
3
3
  module CsvParser
4
4
 
5
5
  def adapter_name
6
- fail 'Override with a name for log output, e.g. "SF"'
6
+ fail 'Override #adapter_name with a name for log output, e.g. "SF"'
7
7
  end
8
8
 
9
9
  def zip_file_url
10
- fail 'Override with the zip archive location'
10
+ fail 'Override #zip_file_url with the zip archive location'
11
11
  end
12
12
 
13
13
  def convert(csv:, to_type:)
@@ -1,3 +1,3 @@
1
1
  module Eaternet
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
@@ -4,7 +4,7 @@ require 'eaternet'
4
4
  require 'eaternet/lives_1_0'
5
5
 
6
6
  CASSETTE = 'nyc'
7
- MORRIS_PARK_CSV = 'test/fixtures/morris-park-bake-shop.csv'
7
+ MORRIS_PARK_CSV = 'test/fixtures/nyc.csv'
8
8
 
9
9
  class NycAdapterTest < Minitest::Test
10
10
  @@nyc = Eaternet::Nyc.new(csv_path: MORRIS_PARK_CSV)
@@ -40,6 +40,10 @@ class NycAdapterTest < Minitest::Test
40
40
  assert_equal '7188924968', b.phone_number
41
41
  end
42
42
 
43
+ def test_can_create_an_array_from_businesses
44
+ assert_instance_of Array, @@nyc.businesses.to_a
45
+ end
46
+
43
47
  def test_businesses_returns_unique_rows
44
48
  assert_equal 1, @@nyc.businesses.to_a.size
45
49
  end
@@ -21,3 +21,4 @@ CAMIS,DBA,BORO,BUILDING,STREET,ZIPCODE,PHONE,CUISINE DESCRIPTION,INSPECTION DATE
21
21
  30075445,MORRIS PARK BAKE SHOP,BRONX,1007,MORRIS PARK AVE,10462,7188924968,Bakery,12/31/2012,Violations were cited in the following area(s).,10F,"Non-food contact surface improperly constructed. Unacceptable material used. Non-food contact surface or equipment improperly maintained and/or not properly sealed, raised, spaced or movable to allow accessibility for cleaning on all sides, above and underneath the unit.",Not Critical,25,,,03/06/2015,Cycle Inspection / Initial Inspection
22
22
  30075445,MORRIS PARK BAKE SHOP,BRONX,1007,MORRIS PARK AVE,10462,7188924968,Bakery,12/31/2012,Violations were cited in the following area(s).,16B,"The original nutritional fact labels and/or ingredient label for a cooking oil, shortening or margarine or food item sold in bulk, or acceptable manufacturers documentation not maintained on site.",Not Critical,,,,03/06/2015,Trans Fat / Initial Inspection
23
23
  30075445,MORRIS PARK BAKE SHOP,BRONX,1007,MORRIS PARK AVE,10462,7188924968,Bakery,05/03/2012,No violations were recorded at the time of this inspection.,,,Not Applicable,,,,03/06/2015,Trans Fat / Second Compliance Inspection
24
+ ,Imposter Bake Shop,BRONX,1007,MORRIS PARK AVE,10462,7188924968,Bakery,05/03/2012,No violations were recorded at the time of this inspection.,,,Not Applicable,,,,03/06/2015,Trans Fat / Second Compliance Inspection
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eaternet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robb Shecter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -274,7 +274,7 @@ files:
274
274
  - test/eaternet/loggable_test.rb
275
275
  - test/eaternet/util_test.rb
276
276
  - test/ext/enumerator_test.rb
277
- - test/fixtures/morris-park-bake-shop.csv
277
+ - test/fixtures/nyc.csv
278
278
  - test/script.rb
279
279
  - test/test_helper.rb
280
280
  homepage: https://github.com/eaternet/adapters-ruby
@@ -315,7 +315,6 @@ test_files:
315
315
  - test/eaternet/loggable_test.rb
316
316
  - test/eaternet/util_test.rb
317
317
  - test/ext/enumerator_test.rb
318
- - test/fixtures/morris-park-bake-shop.csv
318
+ - test/fixtures/nyc.csv
319
319
  - test/script.rb
320
320
  - test/test_helper.rb
321
- has_rdoc: