eaternet 0.3.12 → 0.3.13

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: cfd0797bd4c249ea732ef25485f7310ee1d9ba74
4
- data.tar.gz: 84e4914a0375a5c84b1d8a48196a19a4f06053ec
3
+ metadata.gz: 5fef9d7a3fae0dfa7a51a9dbf736c5da15bfa268
4
+ data.tar.gz: f62290193115c8e762a8d7dbbbd2fe1f5de869a0
5
5
  SHA512:
6
- metadata.gz: 12ba76b4684ae01e31e2b97a8e0b18c6cace0a7cebc381ef4550a8ad13d03784982f8f660064de0f849caac930db81365b65f6d096e77302471deff71d041611
7
- data.tar.gz: 5b207a3fb1c0520bf9721a156a36dc008ac1abfa3c592ede5a57548a9f6e18ca5024f440fa6664ff86c23a93b3cd1e5d7735419bc6b728f4cf4c4e1a5b0679df
6
+ metadata.gz: b5f431d8091b289152792306ccf263aa2e25189e2f464a7af4ee676488f4b084f28f2e1285e5e995638d7c07e8e860e81eb93e3caf5f1a086bcfcb67b81986e3
7
+ data.tar.gz: 1004ff11639225f50e13965f6e359f6c79db8f0861afaf7486dc3eff06e4c014ead6ae389154dcca9eec1bd4f3fd6ee97ad6788e6ec5370947b940cf18433dc1
@@ -13,9 +13,10 @@ require 'eaternet/loggable'
13
13
  module Eaternet
14
14
  module Agencies
15
15
  # A data source for New York City food service health inspections. It
16
- # retrieves the latest info from
16
+ # retrieves the latest CSV export from
17
17
  # [the official source](https://data.cityofnewyork.us/Health/DOHMH-New-York-City-Restaurant-Inspection-Results/xx67-kt59)
18
- # and makes it easy to work with.
18
+ # and makes it easy to work with. The downloaded CSV is cached for twelve
19
+ # hours in a temporary file by {Eaternet::Util.download_and_cache}
19
20
  #
20
21
  # This library conforms to the
21
22
  # [LIVES 1.0 standard](http://www.yelp.com/healthscores) developed by
data/lib/eaternet/util.rb CHANGED
@@ -10,7 +10,7 @@ module Eaternet
10
10
  def self.download_and_extract_zipfile(url)
11
11
  dir = make_temp_dir
12
12
  zip_path = File.join(dir, 'zip-file.zip')
13
- download(source: url, dest: zip_path)
13
+ download_and_cache(source: url, dest: zip_path)
14
14
  extract_zipfile(path: zip_path, dest_dir: dir)
15
15
  dir
16
16
  end
@@ -27,6 +27,7 @@ module Eaternet
27
27
  #
28
28
  # @param [String] source the URL to retrieve
29
29
  # @param [String] dest pathname in which to save the file
30
+ # @return [File] the file
30
31
  def self.download_and_cache(source:, dest:)
31
32
  cache_path = generate_cache_path(source)
32
33
  download(source: source, dest: cache_path) if expired? cache_path
@@ -1,3 +1,3 @@
1
1
  module Eaternet
2
- VERSION = '0.3.12'
2
+ VERSION = '0.3.13'
3
3
  end
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.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robb Shecter