useless-wait-list 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fc84a97d0172c93a1555fd35edb5607cca70ad01
4
+ data.tar.gz: 7c39cee2a9e741b6e54f16ea7c0f0d9539a8f437
5
+ SHA512:
6
+ metadata.gz: ed3ad1512718a839c7233b5ffa2f25cb32346048b70b7785152cdad94202cd69e5f2729a0d09a77d660feed1e5b6b97a1a3dd635ad6f4ac2f2d026386af92516
7
+ data.tar.gz: 99f04f0d33a9bb88d2f3789b139d5b745ef5e824a1a136b22719b40e5cfef4db29ff3d5629de98c65f606e031c42804dc662aaa3b5c8376de7c2464c50379261
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ lib/bundler/man
9
+ pkg
10
+ rdoc
11
+ spec/reports
12
+ test/tmp
13
+ test/version_tmp
14
+ tmp
15
+
16
+ # YARD artifacts
17
+ .yardoc
18
+ _yardoc
19
+ doc/
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Kevin Hyland
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Useless::WaitList
2
+
3
+ For restaurants that don't take reservations
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,5 @@
1
+ module Useless
2
+ class WaitList
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ require 'sinatra/base'
2
+
3
+ require 'useless/doc/server/sinatra'
4
+
5
+ module Useless
6
+ class WaitList < Sinatra::Base
7
+ require 'useless/wait_list/version'
8
+
9
+ register Useless::Doc::Server::Sinatra
10
+
11
+ doc 'Wait List' do
12
+ url 'http://wait-list.useless.io'
13
+
14
+ description <<-DESC
15
+ The Wait List API is an idealized specification of how a restaurant
16
+ should be able to manage its wait list. The big idea is that
17
+ potential patrons should be able to remotely add themselves to the
18
+ wait list.
19
+
20
+ More to come.
21
+ DESC
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ require 'useless'
4
+ require 'oj'
5
+
6
+ describe 'wait-list.useless.io Documentation' do
7
+ include Rack::Test::Methods
8
+
9
+ def app
10
+ Useless::Rack.new do
11
+ map 'wait-list' => Useless::WaitList
12
+ end
13
+ end
14
+
15
+ describe 'OPTIONS /' do
16
+ it 'should return JSON for the full API documentation' do
17
+ options 'http://wait-list.useless.io/'
18
+ last_response.status.should == 200
19
+ doc = Oj.load(last_response.body)
20
+ doc['name'].should == 'Wait List'
21
+ doc['url'].should == 'http://wait-list.useless.io'
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,27 @@
1
+ ENV['RACK_ENV'] = 'test'
2
+ require File.dirname(__FILE__) + '/../lib/useless/wait_list'
3
+
4
+ require 'rubygems'
5
+ require 'bundler/setup'
6
+
7
+ require 'rack/test'
8
+ require 'useless/rack'
9
+
10
+ RSpec.configure do |config|
11
+ config.order = :rand
12
+
13
+ def clean_database
14
+ Useless.mongo.db.collections.each do |collection|
15
+ if !(collection.name =~ /^system\./)
16
+ collection.drop
17
+ end
18
+ end
19
+ end
20
+
21
+ config.before(:suite){ clean_database }
22
+
23
+ config.after(:each) do
24
+ clean_database
25
+ Useless.mongo.reset_connection!
26
+ end
27
+ end
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ $LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
3
+ require './lib/useless/wait_list'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'useless-wait-list'
7
+ spec.version = Useless::WaitList::VERSION
8
+ spec.authors = ['Kevin Hyland']
9
+ spec.email = ['khy@me.com']
10
+ spec.description = 'For restaurants that don\'t take reservations'
11
+ spec.summary = 'An idealized restaurant wait list API.'
12
+ spec.homepage = 'http://wait-list.useless.io'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^spec/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_runtime_dependency 'sinatra', '~> 1.4.2'
21
+ spec.add_runtime_dependency 'useless', '~> 0.2.0'
22
+ spec.add_runtime_dependency 'useless-doc', '~> 0.6.1'
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.3'
25
+ spec.add_development_dependency 'rake', '~> 0.9'
26
+ spec.add_development_dependency 'rspec', '~> 2.13.0'
27
+ spec.add_development_dependency 'rack-test', '~> 0.6.2'
28
+ spec.add_development_dependency 'oj', '~> 2.0.10'
29
+ end
metadata ADDED
@@ -0,0 +1,168 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: useless-wait-list
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kevin Hyland
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-03-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sinatra
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 1.4.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.4.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: useless
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: useless-doc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.6.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.6.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '0.9'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '0.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 2.13.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 2.13.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rack-test
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ~>
102
+ - !ruby/object:Gem::Version
103
+ version: 0.6.2
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 0.6.2
111
+ - !ruby/object:Gem::Dependency
112
+ name: oj
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 2.0.10
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: 2.0.10
125
+ description: For restaurants that don't take reservations
126
+ email:
127
+ - khy@me.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - .gitignore
133
+ - Gemfile
134
+ - LICENSE.txt
135
+ - README.md
136
+ - Rakefile
137
+ - lib/useless/wait_list.rb
138
+ - lib/useless/wait_list/version.rb
139
+ - spec/documentation_spec.rb
140
+ - spec/spec_helper.rb
141
+ - useless-wait-list.gemspec
142
+ homepage: http://wait-list.useless.io
143
+ licenses:
144
+ - MIT
145
+ metadata: {}
146
+ post_install_message:
147
+ rdoc_options: []
148
+ require_paths:
149
+ - lib
150
+ required_ruby_version: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ requirements: []
161
+ rubyforge_project:
162
+ rubygems_version: 2.0.0
163
+ signing_key:
164
+ specification_version: 4
165
+ summary: An idealized restaurant wait list API.
166
+ test_files:
167
+ - spec/documentation_spec.rb
168
+ - spec/spec_helper.rb