rice-dining 0.2.4 → 0.2.5

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
  SHA256:
3
- metadata.gz: 1421df74ca260b33acce26a38b9344144ef13b597d53c1fad41bde8d1cccf395
4
- data.tar.gz: df54cd24acc3f2fad8213fcda0dce9ed56b16271ea0a2e991511a92dbd422118
3
+ metadata.gz: e2e2210476efe563a45b3c1112aa7d8d5ab16bf31e39662411b06add526a13f0
4
+ data.tar.gz: 2436da34aa0c8ef12a7339ff4862eee51982fc5444e25adbeb902b6140eaf31b
5
5
  SHA512:
6
- metadata.gz: 0205f63240918a5525e5fdab95e30855e0be570400e984bf1ca2ce3477716dec9d78f059296d1a916b5df3d090d80d5c25f2c93ddcdce1e705b51efbf22c1e21
7
- data.tar.gz: 703c460965d8ef4ebc3ff877dbb86456a0df7b28bb53a3bf829cd2545d021ebb1e24b9533194a9b35f32472d13557fad8d2504996af9745063ff685c5783a5b8
6
+ metadata.gz: 94ac9f18852adfbb7f763629d5418000400f965df369f306b316c5941f5b23be4234af9bb2c06321430de724db6a18540346d6c6e80fce99c55239b076492dfb
7
+ data.tar.gz: 390d23ee2369d485c2b17709abcbb80505d34823e437c17c13688f036d11d832a5ba8e9f6238d6ebeace4d4c04b12b88b7f837d69b7ed55f1f58e989d8a2247a
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rice-dining (0.2.3)
5
- colorize (~> 0.7)
6
- nokogiri (~> 1.6)
4
+ rice-dining (0.2.4)
5
+ colorize (~> 0.8)
6
+ nokogiri (~> 1.8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,18 +1,61 @@
1
1
  # rice-dining
2
2
 
3
- Provides a `rice-dining` executable that prints servery offerings at Rice.
3
+ Provides a `rice-dining` executable that prints servery offerings at Rice,
4
+ with an API that you can use to extract semi-structured data from the
5
+ servery menu.
6
+
7
+ If you don't like Ruby, shell out from nodejs or something.
4
8
 
5
9
  ## Installation
6
10
 
7
11
  `gem install rice-dining`
8
12
 
13
+ ## Using it in your HackRice party planning app
14
+
15
+ Everyone loves CSV, right?
16
+
17
+ ```ruby
18
+ require 'rice/dining'
19
+ require 'csv'
20
+
21
+ manifest = Rice::Dining.manifest
22
+
23
+ CSV.open('dining.csv', 'w') do |csv|
24
+ mf.locations.each do |loc|
25
+ loc.items.each do |item|
26
+ csv << [loc.name, loc.open?, item.name, item.allergens.map(&:id).join(' ')]
27
+ end
28
+ end
29
+ end
30
+ ```
31
+
32
+ ```csv
33
+ <...>
34
+
35
+ Baker,true,Roasted red potatoes,vegan
36
+ Baker,true,Buffalo chicken drumsticks with bleu cheese,milk
37
+ Baker,true,Cod loin with roasted asparagus and corn,fish
38
+ Baker,true,Grilled tofu steaks with chimichurri,soy vegan
39
+ Baker,true,Roasted cauliflower & crispy garbanzos,soy vegan
40
+ Baker,true,Margherita pizza,gluten milk soy vegetarian
41
+ Baker,true,Pinto bean soup with pico de gallo,soy vegan
42
+ ```
43
+
44
+ Note that this query was performed at like 4AM Houston time and all the
45
+ locations were "open" according to dining.rice.edu ¯\_(ツ)_/¯
46
+
9
47
  ## Invocation
10
48
 
11
- Run `rice-dining` to print status for everything, or `rice-dining <regex>` to print status
12
- for locations matching `<regex>`.
49
+ Run `rice-dining` to print status for everything, or `rice-dining <regex>` to
50
+ print status for locations matching `<regex>`.
51
+
52
+ For example, `rice-dining 'baker|seibel'` would display information for the
53
+ Baker and Seibel serveries.
54
+
55
+ ## Unicode
13
56
 
14
- For example, `rice-dining 'baker|seibel'` would display information for the Baker and
15
- Seibel serveries.
57
+ If the unicode arrows bug you, export `RICE_DINING_NO_UNICODE` and they will
58
+ go away.
16
59
 
17
60
  ## Screenshot
18
61
 
@@ -1,7 +1,7 @@
1
1
  module Rice
2
2
  module Dining
3
3
  module Version
4
- VERSION = '0.2.4'.freeze
4
+ VERSION = '0.2.5'.freeze
5
5
  SHORT_NAME = Rice::Dining.to_s.freeze
6
6
  SHORT_IDENT = "#{SHORT_NAME} v#{VERSION}".freeze
7
7
  NAME = SHORT_NAME.freeze
Binary file
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.authors = ['Morgan Jones']
7
7
  s.email = 'mjones@rice.edu'
8
8
  s.homepage = 'https://numin.it'
9
- s.date = '2016-03-09'
9
+ s.date = '2018-09-10'
10
10
  s.summary = 'Gets Rice servery information'
11
11
  s.description = 'Parses the HTML tag soup on the Rice dining homepage to get current servery information'
12
12
  s.license = 'MIT'
@@ -15,6 +15,6 @@ Gem::Specification.new do |s|
15
15
  s.executables << 'rice-dining'
16
16
  s.has_rdoc = true
17
17
  s.required_ruby_version = '>= 2.0'
18
- s.add_dependency 'nokogiri', '~> 1.6'
19
- s.add_runtime_dependency 'colorize', '~> 0.7'
18
+ s.add_dependency 'nokogiri', '~> 1.8'
19
+ s.add_runtime_dependency 'colorize', '~> 0.8'
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rice-dining
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morgan Jones
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-09 00:00:00.000000000 Z
11
+ date: 2018-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '1.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '1.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: colorize
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.7'
33
+ version: '0.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.7'
40
+ version: '0.8'
41
41
  description: Parses the HTML tag soup on the Rice dining homepage to get current servery
42
42
  information
43
43
  email: mjones@rice.edu