useless-wait-list 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/useless/wait_list.rb +51 -7
- data/useless-wait-list.gemspec +13 -14
- metadata +6 -7
- data/lib/useless/wait_list/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acf3ad7bf2fd27f864f7ec9b3ab551c878bed013
|
4
|
+
data.tar.gz: e99e8e1c64ba5b4f2ae0988966657f3c6abb26aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2787c9e01b6bb479429a8d379a07efff3bbb79d6cbafae815a51df274bfae50ba82974693d2f6e7a8cc7b07ffdf643099c4933f09b10a68046fa0dae02a6164f
|
7
|
+
data.tar.gz: a39141772f80efc93a58bec013e7dc004470a2adba18a6252ad79eaec4a05871922bee92a4b5c4b3d1c4c697f9142e919c6d0c72f8a69bde7124ab7bb368657e
|
data/lib/useless/wait_list.rb
CHANGED
@@ -4,20 +4,64 @@ require 'useless/doc/server/sinatra'
|
|
4
4
|
|
5
5
|
module Useless
|
6
6
|
class WaitList < Sinatra::Base
|
7
|
-
require 'useless/wait_list/version'
|
8
|
-
|
9
7
|
register Useless::Doc::Server::Sinatra
|
10
8
|
|
11
9
|
doc 'Wait List' do
|
12
10
|
url 'http://wait-list.useless.io'
|
13
11
|
|
12
|
+
concept 'Chris Nace'
|
13
|
+
specification 'In Progress', 'Kevin Hyland'
|
14
|
+
implementation 'Pending', 'Kevin Hyland'
|
15
|
+
|
14
16
|
description <<-DESC
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
It is becoming increasingly common for restaurants, especially popular
|
18
|
+
ones, to not accept reservations. Instead, they choose to maintain a
|
19
|
+
first-come, first-served wait list.
|
20
|
+
|
21
|
+
Algorithmically, this makes a lot of sense. The wait list can be
|
22
|
+
modeled as a set of queues, one per available table size. The
|
23
|
+
reservation, however, requires some scheduling algorithm. Queues, in
|
24
|
+
general, are easier than scheduling.
|
25
|
+
|
26
|
+
This is reflected in the real world. Reservations force the restaurant
|
27
|
+
to commit to an explicit time that the table will be available, which
|
28
|
+
is difficult to do accurately. The simplicity of the wait list, though,
|
29
|
+
allows both patron and proprietor to better understand the real time
|
30
|
+
that a table will be available.
|
31
|
+
|
32
|
+
And although patrons appreciate more realistic expectations, the
|
33
|
+
overall quality of their experience is decreased when compared to
|
34
|
+
reservations. If you live in a neighborhood where most restaurants do
|
35
|
+
not take reservations, and you're looking for a restaurant, it's not
|
36
|
+
uncommon to walk to a bunch of places and then ultimately walk back to
|
37
|
+
the one that had the shortest wait list. The best way to get a good
|
38
|
+
spot on a particularly popular wait list is to show up in the early
|
39
|
+
afternoon. But it doesn't have to be that way!
|
40
|
+
|
41
|
+
The goal of the **Wait List API** is to make the process of getting and
|
42
|
+
being on a wait list _better_ than that of making a reservation. The
|
43
|
+
main idea, of course, is that if a wait list is represented as an
|
44
|
+
intuitive JSON API, then there a few ways that the patron experience
|
45
|
+
can be signifcantly improved:
|
46
|
+
|
47
|
+
1. A patron could browse all the wait lists of all the restaurants in
|
48
|
+
his area, ordering them by the estimated time that a table will
|
49
|
+
be available for his party size. He could then put himself on the
|
50
|
+
wait list that works best.
|
51
|
+
|
52
|
+
2. Once on a wait list, the patron could have complete visibility into
|
53
|
+
his position in line. He wouldn't have to arrive at the restaurant
|
54
|
+
until exactly when his table was ready.
|
55
|
+
|
56
|
+
3. For popular restaurants, there could be a flash sale experience
|
57
|
+
when the wait list opens for that night's dinner. A patron could
|
58
|
+
contend for his position on a wait list from his office computer or
|
59
|
+
on his phone.
|
19
60
|
|
20
|
-
|
61
|
+
Restaurants would benefit as well. First of all, the task of managing
|
62
|
+
the wait list is simplified since the patrons are doing it on their
|
63
|
+
own. Secondly, they would have access to all the data captured by the
|
64
|
+
API.
|
21
65
|
DESC
|
22
66
|
end
|
23
67
|
end
|
data/useless-wait-list.gemspec
CHANGED
@@ -1,25 +1,24 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
$LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
|
3
|
-
require '
|
3
|
+
# require 'useless/wait_list/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
10
|
-
spec.
|
11
|
-
spec.
|
12
|
-
spec.homepage
|
13
|
-
spec.license
|
6
|
+
spec.name = 'useless-wait-list'
|
7
|
+
spec.version = '0.0.2'
|
8
|
+
spec.authors = ['Kevin Hyland']
|
9
|
+
spec.email = ['khy@me.com']
|
10
|
+
spec.summary = 'For restaurants that don\'t take reservations'
|
11
|
+
spec.description = 'An idealized restaurant wait list API.'
|
12
|
+
spec.homepage = 'http://wait-list.useless.io'
|
13
|
+
spec.license = 'MIT'
|
14
14
|
|
15
|
-
spec.files
|
16
|
-
spec.
|
17
|
-
spec.
|
18
|
-
spec.require_paths = ['lib']
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.test_files = spec.files.grep(%r{^spec/})
|
17
|
+
spec.require_paths = ['lib']
|
19
18
|
|
20
19
|
spec.add_runtime_dependency 'sinatra', '~> 1.4.2'
|
21
20
|
spec.add_runtime_dependency 'useless', '~> 0.2.0'
|
22
|
-
spec.add_runtime_dependency 'useless-doc', '~> 0.6.
|
21
|
+
spec.add_runtime_dependency 'useless-doc', '~> 0.6.4'
|
23
22
|
|
24
23
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
25
24
|
spec.add_development_dependency 'rake', '~> 0.9'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: useless-wait-list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Hyland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.6.
|
47
|
+
version: 0.6.4
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.6.
|
54
|
+
version: 0.6.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 2.0.10
|
125
|
-
description:
|
125
|
+
description: An idealized restaurant wait list API.
|
126
126
|
email:
|
127
127
|
- khy@me.com
|
128
128
|
executables: []
|
@@ -135,7 +135,6 @@ files:
|
|
135
135
|
- README.md
|
136
136
|
- Rakefile
|
137
137
|
- lib/useless/wait_list.rb
|
138
|
-
- lib/useless/wait_list/version.rb
|
139
138
|
- spec/documentation_spec.rb
|
140
139
|
- spec/spec_helper.rb
|
141
140
|
- useless-wait-list.gemspec
|
@@ -162,7 +161,7 @@ rubyforge_project:
|
|
162
161
|
rubygems_version: 2.0.0
|
163
162
|
signing_key:
|
164
163
|
specification_version: 4
|
165
|
-
summary:
|
164
|
+
summary: For restaurants that don't take reservations
|
166
165
|
test_files:
|
167
166
|
- spec/documentation_spec.rb
|
168
167
|
- spec/spec_helper.rb
|