goliath 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of goliath might be problematic. Click here for more details.

Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/goliath.gemspec +10 -7
  4. data/lib/goliath/api.rb +1 -1
  5. data/lib/goliath/rack/jsonp.rb +7 -2
  6. data/lib/goliath/rack/params.rb +3 -2
  7. data/lib/goliath/rack/validator.rb +1 -1
  8. data/lib/goliath/request.rb +2 -2
  9. data/lib/goliath/runner.rb +4 -3
  10. data/lib/goliath/server.rb +17 -2
  11. data/lib/goliath/test_helper_sse.rb +76 -0
  12. data/lib/goliath/validation/error.rb +4 -1
  13. data/lib/goliath/version.rb +1 -1
  14. data/spec/integration/early_abort_spec.rb +3 -3
  15. data/spec/integration/event_stream_spec.rb +50 -0
  16. data/spec/integration/exception_handling_spec.rb +202 -0
  17. data/spec/integration/jsonp_spec.rb +61 -10
  18. data/spec/integration/test_helper_spec.rb +1 -1
  19. data/spec/integration/valid_spec.rb +21 -1
  20. data/spec/unit/api_spec.rb +1 -1
  21. data/spec/unit/env_spec.rb +5 -5
  22. data/spec/unit/headers_spec.rb +2 -2
  23. data/spec/unit/rack/formatters/json_spec.rb +2 -2
  24. data/spec/unit/rack/formatters/xml_spec.rb +2 -2
  25. data/spec/unit/rack/formatters/yaml_spec.rb +2 -2
  26. data/spec/unit/rack/params_spec.rb +41 -6
  27. data/spec/unit/rack/validation/default_params_spec.rb +2 -2
  28. data/spec/unit/rack/validation/numeric_range_spec.rb +2 -2
  29. data/spec/unit/rack/validation/param_spec.rb +18 -18
  30. data/spec/unit/rack/validation/required_param_spec.rb +25 -25
  31. data/spec/unit/rack/validation/required_value_spec.rb +10 -10
  32. data/spec/unit/request_spec.rb +3 -3
  33. data/spec/unit/runner_spec.rb +1 -1
  34. data/spec/unit/server_spec.rb +4 -4
  35. metadata +135 -94
  36. data/examples/around.rb +0 -38
  37. data/examples/clone.rb +0 -26
  38. data/examples/router.rb +0 -15
  39. data/examples/test.rb +0 -31
  40. data/examples/upload.rb +0 -17
@@ -54,56 +54,56 @@ describe Goliath::Rack::Validation::RequiredParam do
54
54
 
55
55
  describe 'key_valid?' do
56
56
  it 'raises exception if the key is not provided' do
57
- @rp.key_valid?(@env['params']).should be_false
57
+ @rp.key_valid?(@env['params']).should be false
58
58
  end
59
59
 
60
60
  it 'raises exception if the key is blank' do
61
61
  @env['params']['mk'] = ''
62
- @rp.key_valid?(@env['params']).should be_false
62
+ @rp.key_valid?(@env['params']).should be false
63
63
  end
64
64
 
65
65
  it 'raises exception if the key is nil' do
66
66
  @env['params']['mk'] = nil
67
- @rp.key_valid?(@env['params']).should be_false
67
+ @rp.key_valid?(@env['params']).should be false
68
68
  end
69
69
 
70
70
  it 'handles an empty array' do
71
71
  @env['params']['mk'] = []
72
- @rp.key_valid?(@env['params']).should be_false
72
+ @rp.key_valid?(@env['params']).should be false
73
73
  end
74
74
 
75
75
  it 'handles an array of nils' do
76
76
  @env['params']['mk'] = [nil, nil, nil]
77
- @rp.key_valid?(@env['params']).should be_false
77
+ @rp.key_valid?(@env['params']).should be false
78
78
  end
79
79
 
80
80
  it 'handles an array of blanks' do
81
81
  @env['params']['mk'] = ['', '', '']
82
- @rp.key_valid?(@env['params']).should be_false
82
+ @rp.key_valid?(@env['params']).should be false
83
83
  end
84
84
 
85
85
  it "doesn't raise if the key provided" do
86
86
  @env['params']['mk'] = 'my value'
87
- @rp.key_valid?(@env['params']).should be_true
87
+ @rp.key_valid?(@env['params']).should be true
88
88
  end
89
89
 
90
90
  it "doesn't raise if the array contains valid data" do
91
91
  @env['params']['mk'] = [1, 2, 3, 4]
92
- @rp.key_valid?(@env['params']).should be_true
92
+ @rp.key_valid?(@env['params']).should be true
93
93
  end
94
94
 
95
95
  it "doesn't raise if the key provided is multiline and has blanks" do
96
96
  @env['params']['mk'] = "my\n \nvalue"
97
- @rp.key_valid?(@env['params']).should be_true
97
+ @rp.key_valid?(@env['params']).should be true
98
98
  end
99
99
 
100
100
  it "doesn't raise if the key provided is an array and contains multiline with blanks" do
101
101
  @env['params']['mk'] = ["my\n \nvalue", "my\n \nother\n \nvalue"]
102
- @rp.key_valid?(@env['params']).should be_true
103
- end
102
+ @rp.key_valid?(@env['params']).should be true
103
+ end
104
104
  end
105
105
  end
106
-
106
+
107
107
  describe 'Nested keys tests' do
108
108
  before do
109
109
  @app = double('app').as_null_object
@@ -122,10 +122,10 @@ describe Goliath::Rack::Validation::RequiredParam do
122
122
  'pass' => "password"}
123
123
  }
124
124
  }
125
-
126
- @rp.key_valid?(@env['params']).should be_false
125
+
126
+ @rp.key_valid?(@env['params']).should be false
127
127
  end
128
-
128
+
129
129
  it "return true if key is present" do
130
130
  @env['params'] = {'data' => {
131
131
  'credentials' => {
@@ -133,11 +133,11 @@ describe Goliath::Rack::Validation::RequiredParam do
133
133
  'pass' => "password"}
134
134
  }
135
135
  }
136
-
137
- @rp.key_valid?(@env['params']).should be_true
136
+
137
+ @rp.key_valid?(@env['params']).should be true
138
138
  end
139
139
  end
140
-
140
+
141
141
  describe 'Nested keys tests (with string)' do
142
142
  before do
143
143
  @app = double('app').as_null_object
@@ -156,10 +156,10 @@ describe Goliath::Rack::Validation::RequiredParam do
156
156
  'pass' => "password"}
157
157
  }
158
158
  }
159
-
160
- @rp.key_valid?(@env['params']).should be_false
159
+
160
+ @rp.key_valid?(@env['params']).should be false
161
161
  end
162
-
162
+
163
163
  it "return true if key is present" do
164
164
  @env['params'] = {'data' => {
165
165
  'credentials' => {
@@ -167,10 +167,10 @@ describe Goliath::Rack::Validation::RequiredParam do
167
167
  'pass' => "password"}
168
168
  }
169
169
  }
170
-
171
- @rp.key_valid?(@env['params']).should be_true
170
+
171
+ @rp.key_valid?(@env['params']).should be true
172
172
  end
173
173
  end
174
-
175
-
174
+
175
+
176
176
  end
@@ -44,52 +44,52 @@ describe Goliath::Rack::Validation::RequiredValue do
44
44
 
45
45
  context '#value_valid!' do
46
46
  it 'raises exception if the key is not provided' do
47
- @rv.value_valid?(@env['params']).should be_false
47
+ @rv.value_valid?(@env['params']).should be false
48
48
  end
49
49
 
50
50
  it 'raises exception if the key is blank' do
51
51
  @env['params']['mk'] = ''
52
- @rv.value_valid?(@env['params']).should be_false
52
+ @rv.value_valid?(@env['params']).should be false
53
53
  end
54
54
 
55
55
  it 'raises exception if the key is nil' do
56
56
  @env['params']['mk'] = nil
57
- @rv.value_valid?(@env['params']).should be_false
57
+ @rv.value_valid?(@env['params']).should be false
58
58
  end
59
59
 
60
60
  it 'raises exception if the key is does not match' do
61
61
  @env['params']['mk'] = "blarg"
62
- @rv.value_valid?(@env['params']).should be_false
62
+ @rv.value_valid?(@env['params']).should be false
63
63
  end
64
64
 
65
65
  it 'handles an empty array' do
66
66
  @env['params']['mk'] = []
67
- @rv.value_valid?(@env['params']).should be_false
67
+ @rv.value_valid?(@env['params']).should be false
68
68
  end
69
69
 
70
70
  it 'handles an array of nils' do
71
71
  @env['params']['mk'] = [nil, nil, nil]
72
- @rv.value_valid?(@env['params']).should be_false
72
+ @rv.value_valid?(@env['params']).should be false
73
73
  end
74
74
 
75
75
  it 'handles an array of blanks' do
76
76
  @env['params']['mk'] = ['', '', '']
77
- @rv.value_valid?(@env['params']).should be_false
77
+ @rv.value_valid?(@env['params']).should be false
78
78
  end
79
79
 
80
80
  it "doesn't raise if the key is value" do
81
81
  @env['params']['mk'] = 'Monkey'
82
- @rv.value_valid?(@env['params']).should be_true
82
+ @rv.value_valid?(@env['params']).should be true
83
83
  end
84
84
 
85
85
  it "doesn't raise if the array contains valid data" do
86
86
  @env['params']['mk'] = ['Monkey', 'frog']
87
- @rv.value_valid?(@env['params']).should be_true
87
+ @rv.value_valid?(@env['params']).should be true
88
88
  end
89
89
 
90
90
  it 'raises if any of the array elements do not match' do
91
91
  @env['params']['mk'] = ["Monkey", "frog", "bat"]
92
- @rv.value_valid?(@env['params']).should be_false
92
+ @rv.value_valid?(@env['params']).should be false
93
93
  end
94
94
  end
95
95
  end
@@ -41,14 +41,14 @@ describe Goliath::Request do
41
41
 
42
42
  describe 'finished?' do
43
43
  it "returns false if the request parsing has not yet finished" do
44
- @r.finished?.should be_false
44
+ @r.finished?.should be false
45
45
  end
46
46
 
47
47
  it 'returns true if we have finished request parsing' do
48
48
  @r.should_receive(:post_process).and_return(nil)
49
49
  @r.process
50
50
 
51
- @r.finished?.should be_true
51
+ @r.finished?.should be true
52
52
  end
53
53
  end
54
54
 
@@ -63,7 +63,7 @@ describe Goliath::Request do
63
63
 
64
64
  it 'handles bad request urls' do
65
65
  parser = double('parser').as_null_object
66
- parser.stub(:request_url).and_return('/bad?param}')
66
+ parser.stub(:request_url).and_return('/bad?params##')
67
67
 
68
68
  @r.stub(:server_exception)
69
69
  @r.should_receive(:server_exception)
@@ -49,7 +49,7 @@ describe Goliath::Runner do
49
49
  [:debug, :warn, :info].each do |type|
50
50
  it "responds to #{type} messages" do
51
51
  log = @r.send(:setup_logger)
52
- log.respond_to?(type).should be_true
52
+ log.respond_to?(type).should be true
53
53
  end
54
54
  end
55
55
 
@@ -113,28 +113,28 @@ describe Goliath::Server do
113
113
  Goliath.env = :development
114
114
  block_run = false
115
115
  @s.environment('development') { block_run = true }
116
- block_run.should be_true
116
+ block_run.should be true
117
117
  end
118
118
 
119
119
  it 'does not execute the block if the environment does not match' do
120
120
  Goliath.env = :development
121
121
  block_run = false
122
122
  @s.environment('test') { block_run = true }
123
- block_run.should be_false
123
+ block_run.should be false
124
124
  end
125
125
 
126
126
  it 'accepts an array of environments' do
127
127
  Goliath.env = :development
128
128
  block_run = false
129
129
  @s.environment(['development', 'test']) { block_run = true }
130
- block_run.should be_true
130
+ block_run.should be true
131
131
  end
132
132
 
133
133
  it 'does not run the block if the environment is not in the array' do
134
134
  Goliath.env = :production
135
135
  block_run = false
136
136
  @s.environment(['development', 'test']) { block_run = true }
137
- block_run.should be_false
137
+ block_run.should be false
138
138
  end
139
139
  end
140
140
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goliath
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan sinclair
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-22 00:00:00.000000000 Z
12
+ date: 2017-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 1.0.0.beta.4
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 1.0.0.beta.4
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: em-synchrony
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 1.0.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: 1.0.0
42
42
  - !ruby/object:Gem::Dependency
@@ -57,378 +57,420 @@ dependencies:
57
57
  name: http_parser.rb
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: 0.6.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: 0.6.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: log4r
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: einhorn
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
82
96
  - !ruby/object:Gem::Version
83
97
  version: '0'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: rack
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
- - - '>='
102
+ - - ">="
89
103
  - !ruby/object:Gem::Version
90
104
  version: 1.2.2
91
105
  type: :runtime
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
- - - '>='
109
+ - - ">="
96
110
  - !ruby/object:Gem::Version
97
111
  version: 1.2.2
98
112
  - !ruby/object:Gem::Dependency
99
113
  name: rack-contrib
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
- - - '>='
116
+ - - ">="
103
117
  - !ruby/object:Gem::Version
104
118
  version: '0'
105
119
  type: :runtime
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
- - - '>='
123
+ - - ">="
110
124
  - !ruby/object:Gem::Version
111
125
  version: '0'
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: rack-respond_to
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
- - - '>='
130
+ - - ">="
117
131
  - !ruby/object:Gem::Version
118
132
  version: '0'
119
133
  type: :runtime
120
134
  prerelease: false
121
135
  version_requirements: !ruby/object:Gem::Requirement
122
136
  requirements:
123
- - - '>='
137
+ - - ">="
124
138
  - !ruby/object:Gem::Version
125
139
  version: '0'
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: async-rack
128
142
  requirement: !ruby/object:Gem::Requirement
129
143
  requirements:
130
- - - '>='
144
+ - - ">="
131
145
  - !ruby/object:Gem::Version
132
146
  version: '0'
133
147
  type: :runtime
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
- - - '>='
151
+ - - ">="
138
152
  - !ruby/object:Gem::Version
139
153
  version: '0'
140
154
  - !ruby/object:Gem::Dependency
141
155
  name: multi_json
142
156
  requirement: !ruby/object:Gem::Requirement
143
157
  requirements:
144
- - - '>='
158
+ - - ">="
145
159
  - !ruby/object:Gem::Version
146
160
  version: '0'
147
161
  type: :runtime
148
162
  prerelease: false
149
163
  version_requirements: !ruby/object:Gem::Requirement
150
164
  requirements:
151
- - - '>='
165
+ - - ">="
152
166
  - !ruby/object:Gem::Version
153
167
  version: '0'
154
168
  - !ruby/object:Gem::Dependency
155
169
  name: rake
156
170
  requirement: !ruby/object:Gem::Requirement
157
171
  requirements:
158
- - - '>='
172
+ - - ">="
159
173
  - !ruby/object:Gem::Version
160
174
  version: 0.8.7
161
175
  type: :development
162
176
  prerelease: false
163
177
  version_requirements: !ruby/object:Gem::Requirement
164
178
  requirements:
165
- - - '>='
179
+ - - ">="
166
180
  - !ruby/object:Gem::Version
167
181
  version: 0.8.7
168
182
  - !ruby/object:Gem::Dependency
169
183
  name: rspec
170
184
  requirement: !ruby/object:Gem::Requirement
171
185
  requirements:
172
- - - '>'
186
+ - - "~>"
173
187
  - !ruby/object:Gem::Version
174
- version: '2.0'
188
+ version: '3.0'
175
189
  type: :development
176
190
  prerelease: false
177
191
  version_requirements: !ruby/object:Gem::Requirement
178
192
  requirements:
179
- - - '>'
193
+ - - "~>"
180
194
  - !ruby/object:Gem::Version
181
- version: '2.0'
195
+ version: '3.0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: test-unit
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
182
210
  - !ruby/object:Gem::Dependency
183
211
  name: nokogiri
184
212
  requirement: !ruby/object:Gem::Requirement
185
213
  requirements:
186
- - - '>='
214
+ - - ">="
187
215
  - !ruby/object:Gem::Version
188
216
  version: '0'
189
217
  type: :development
190
218
  prerelease: false
191
219
  version_requirements: !ruby/object:Gem::Requirement
192
220
  requirements:
193
- - - '>='
221
+ - - ">="
194
222
  - !ruby/object:Gem::Version
195
223
  version: '0'
196
224
  - !ruby/object:Gem::Dependency
197
225
  name: em-http-request
198
226
  requirement: !ruby/object:Gem::Requirement
199
227
  requirements:
200
- - - '>='
228
+ - - ">="
201
229
  - !ruby/object:Gem::Version
202
230
  version: 1.0.0
203
231
  type: :development
204
232
  prerelease: false
205
233
  version_requirements: !ruby/object:Gem::Requirement
206
234
  requirements:
207
- - - '>='
235
+ - - ">="
208
236
  - !ruby/object:Gem::Version
209
237
  version: 1.0.0
210
238
  - !ruby/object:Gem::Dependency
211
239
  name: em-mongo
212
240
  requirement: !ruby/object:Gem::Requirement
213
241
  requirements:
214
- - - ~>
242
+ - - "~>"
215
243
  - !ruby/object:Gem::Version
216
244
  version: 0.4.0
217
245
  type: :development
218
246
  prerelease: false
219
247
  version_requirements: !ruby/object:Gem::Requirement
220
248
  requirements:
221
- - - ~>
249
+ - - "~>"
222
250
  - !ruby/object:Gem::Version
223
251
  version: 0.4.0
224
252
  - !ruby/object:Gem::Dependency
225
253
  name: rack-rewrite
226
254
  requirement: !ruby/object:Gem::Requirement
227
255
  requirements:
228
- - - '>='
256
+ - - ">="
229
257
  - !ruby/object:Gem::Version
230
258
  version: '0'
231
259
  type: :development
232
260
  prerelease: false
233
261
  version_requirements: !ruby/object:Gem::Requirement
234
262
  requirements:
235
- - - '>='
263
+ - - ">="
236
264
  - !ruby/object:Gem::Version
237
265
  version: '0'
238
266
  - !ruby/object:Gem::Dependency
239
267
  name: multipart_body
240
268
  requirement: !ruby/object:Gem::Requirement
241
269
  requirements:
242
- - - '>='
270
+ - - ">="
243
271
  - !ruby/object:Gem::Version
244
272
  version: '0'
245
273
  type: :development
246
274
  prerelease: false
247
275
  version_requirements: !ruby/object:Gem::Requirement
248
276
  requirements:
249
- - - '>='
277
+ - - ">="
250
278
  - !ruby/object:Gem::Version
251
279
  version: '0'
252
280
  - !ruby/object:Gem::Dependency
253
281
  name: amqp
254
282
  requirement: !ruby/object:Gem::Requirement
255
283
  requirements:
256
- - - '>='
284
+ - - ">="
257
285
  - !ruby/object:Gem::Version
258
286
  version: 0.7.1
259
287
  type: :development
260
288
  prerelease: false
261
289
  version_requirements: !ruby/object:Gem::Requirement
262
290
  requirements:
263
- - - '>='
291
+ - - ">="
264
292
  - !ruby/object:Gem::Version
265
293
  version: 0.7.1
266
294
  - !ruby/object:Gem::Dependency
267
295
  name: em-websocket-client
268
296
  requirement: !ruby/object:Gem::Requirement
269
297
  requirements:
270
- - - '>='
298
+ - - ">="
271
299
  - !ruby/object:Gem::Version
272
300
  version: '0'
273
301
  type: :development
274
302
  prerelease: false
275
303
  version_requirements: !ruby/object:Gem::Requirement
276
304
  requirements:
277
- - - '>='
305
+ - - ">="
306
+ - !ruby/object:Gem::Version
307
+ version: '0'
308
+ - !ruby/object:Gem::Dependency
309
+ name: em-eventsource
310
+ requirement: !ruby/object:Gem::Requirement
311
+ requirements:
312
+ - - ">="
313
+ - !ruby/object:Gem::Version
314
+ version: '0'
315
+ type: :development
316
+ prerelease: false
317
+ version_requirements: !ruby/object:Gem::Requirement
318
+ requirements:
319
+ - - ">="
278
320
  - !ruby/object:Gem::Version
279
321
  version: '0'
280
322
  - !ruby/object:Gem::Dependency
281
323
  name: tilt
282
324
  requirement: !ruby/object:Gem::Requirement
283
325
  requirements:
284
- - - '>='
326
+ - - ">="
285
327
  - !ruby/object:Gem::Version
286
328
  version: 1.2.2
287
329
  type: :development
288
330
  prerelease: false
289
331
  version_requirements: !ruby/object:Gem::Requirement
290
332
  requirements:
291
- - - '>='
333
+ - - ">="
292
334
  - !ruby/object:Gem::Version
293
335
  version: 1.2.2
294
336
  - !ruby/object:Gem::Dependency
295
337
  name: haml
296
338
  requirement: !ruby/object:Gem::Requirement
297
339
  requirements:
298
- - - '>='
340
+ - - ">="
299
341
  - !ruby/object:Gem::Version
300
342
  version: 3.0.25
301
343
  type: :development
302
344
  prerelease: false
303
345
  version_requirements: !ruby/object:Gem::Requirement
304
346
  requirements:
305
- - - '>='
347
+ - - ">="
306
348
  - !ruby/object:Gem::Version
307
349
  version: 3.0.25
308
350
  - !ruby/object:Gem::Dependency
309
351
  name: yard
310
352
  requirement: !ruby/object:Gem::Requirement
311
353
  requirements:
312
- - - '>='
354
+ - - ">="
313
355
  - !ruby/object:Gem::Version
314
356
  version: '0'
315
357
  type: :development
316
358
  prerelease: false
317
359
  version_requirements: !ruby/object:Gem::Requirement
318
360
  requirements:
319
- - - '>='
361
+ - - ">="
320
362
  - !ruby/object:Gem::Version
321
363
  version: '0'
322
364
  - !ruby/object:Gem::Dependency
323
365
  name: guard
324
366
  requirement: !ruby/object:Gem::Requirement
325
367
  requirements:
326
- - - ~>
368
+ - - "~>"
327
369
  - !ruby/object:Gem::Version
328
- version: 1.8.3
370
+ version: '2.0'
329
371
  type: :development
330
372
  prerelease: false
331
373
  version_requirements: !ruby/object:Gem::Requirement
332
374
  requirements:
333
- - - ~>
375
+ - - "~>"
334
376
  - !ruby/object:Gem::Version
335
- version: 1.8.3
377
+ version: '2.0'
336
378
  - !ruby/object:Gem::Dependency
337
379
  name: guard-rspec
338
380
  requirement: !ruby/object:Gem::Requirement
339
381
  requirements:
340
- - - ~>
382
+ - - "~>"
341
383
  - !ruby/object:Gem::Version
342
- version: 3.1.0
384
+ version: '4.0'
343
385
  type: :development
344
386
  prerelease: false
345
387
  version_requirements: !ruby/object:Gem::Requirement
346
388
  requirements:
347
- - - ~>
389
+ - - "~>"
348
390
  - !ruby/object:Gem::Version
349
- version: 3.1.0
391
+ version: '4.0'
350
392
  - !ruby/object:Gem::Dependency
351
393
  name: listen
352
394
  requirement: !ruby/object:Gem::Requirement
353
395
  requirements:
354
- - - ~>
396
+ - - "~>"
355
397
  - !ruby/object:Gem::Version
356
- version: 1.3.1
398
+ version: '2.0'
357
399
  type: :development
358
400
  prerelease: false
359
401
  version_requirements: !ruby/object:Gem::Requirement
360
402
  requirements:
361
- - - ~>
403
+ - - "~>"
362
404
  - !ruby/object:Gem::Version
363
- version: 1.3.1
405
+ version: '2.0'
364
406
  - !ruby/object:Gem::Dependency
365
407
  name: yajl-ruby
366
408
  requirement: !ruby/object:Gem::Requirement
367
409
  requirements:
368
- - - '>='
410
+ - - ">="
369
411
  - !ruby/object:Gem::Version
370
412
  version: '0'
371
413
  type: :development
372
414
  prerelease: false
373
415
  version_requirements: !ruby/object:Gem::Requirement
374
416
  requirements:
375
- - - '>='
417
+ - - ">="
376
418
  - !ruby/object:Gem::Version
377
419
  version: '0'
378
420
  - !ruby/object:Gem::Dependency
379
421
  name: bluecloth
380
422
  requirement: !ruby/object:Gem::Requirement
381
423
  requirements:
382
- - - '>='
424
+ - - ">="
383
425
  - !ruby/object:Gem::Version
384
426
  version: '0'
385
427
  type: :development
386
428
  prerelease: false
387
429
  version_requirements: !ruby/object:Gem::Requirement
388
430
  requirements:
389
- - - '>='
431
+ - - ">="
390
432
  - !ruby/object:Gem::Version
391
433
  version: '0'
392
434
  - !ruby/object:Gem::Dependency
393
435
  name: bson_ext
394
436
  requirement: !ruby/object:Gem::Requirement
395
437
  requirements:
396
- - - '>='
438
+ - - ">="
397
439
  - !ruby/object:Gem::Version
398
440
  version: '0'
399
441
  type: :development
400
442
  prerelease: false
401
443
  version_requirements: !ruby/object:Gem::Requirement
402
444
  requirements:
403
- - - '>='
445
+ - - ">="
404
446
  - !ruby/object:Gem::Version
405
447
  version: '0'
406
448
  - !ruby/object:Gem::Dependency
407
449
  name: growl
408
450
  requirement: !ruby/object:Gem::Requirement
409
451
  requirements:
410
- - - ~>
452
+ - - "~>"
411
453
  - !ruby/object:Gem::Version
412
454
  version: 1.0.3
413
455
  type: :development
414
456
  prerelease: false
415
457
  version_requirements: !ruby/object:Gem::Requirement
416
458
  requirements:
417
- - - ~>
459
+ - - "~>"
418
460
  - !ruby/object:Gem::Version
419
461
  version: 1.0.3
420
462
  - !ruby/object:Gem::Dependency
421
463
  name: rb-fsevent
422
464
  requirement: !ruby/object:Gem::Requirement
423
465
  requirements:
424
- - - '>='
466
+ - - ">="
425
467
  - !ruby/object:Gem::Version
426
468
  version: '0'
427
469
  type: :development
428
470
  prerelease: false
429
471
  version_requirements: !ruby/object:Gem::Requirement
430
472
  requirements:
431
- - - '>='
473
+ - - ">="
432
474
  - !ruby/object:Gem::Version
433
475
  version: '0'
434
476
  description: Async framework for writing API servers
@@ -439,15 +481,23 @@ executables: []
439
481
  extensions: []
440
482
  extra_rdoc_files: []
441
483
  files:
484
+ - ".gemtest"
485
+ - ".gitignore"
486
+ - ".rspec"
487
+ - ".yardopts"
488
+ - Gemfile
489
+ - Guardfile
490
+ - HISTORY.md
491
+ - LICENSE
492
+ - README.md
493
+ - Rakefile
442
494
  - examples/activerecord/config/srv.rb
443
495
  - examples/activerecord/srv.rb
444
496
  - examples/api_proxy.rb
445
- - examples/around.rb
446
497
  - examples/async_aroundware_demo.rb
447
498
  - examples/async_upload.rb
448
499
  - examples/auth_and_rate_limit.rb
449
500
  - examples/chunked_streaming.rb
450
- - examples/clone.rb
451
501
  - examples/conf_test.rb
452
502
  - examples/config/auth_and_rate_limit.rb
453
503
  - examples/config/conf_test.rb
@@ -474,12 +524,9 @@ files:
474
524
  - examples/rasterize/rasterize.js
475
525
  - examples/rasterize/rasterize.rb
476
526
  - examples/rasterize/rasterize_and_shorten.rb
477
- - examples/router.rb
478
527
  - examples/stream.rb
479
528
  - examples/template.rb
480
- - examples/test.rb
481
529
  - examples/test_rig.rb
482
- - examples/upload.rb
483
530
  - examples/views/debug.haml
484
531
  - examples/views/joke.markdown
485
532
  - examples/views/layout.erb
@@ -488,10 +535,8 @@ files:
488
535
  - examples/websocket.rb
489
536
  - examples/ws/favicon.ico
490
537
  - examples/ws/index.erb
491
- - Gemfile
492
538
  - goliath.gemspec
493
- - Guardfile
494
- - HISTORY.md
539
+ - lib/goliath.rb
495
540
  - lib/goliath/api.rb
496
541
  - lib/goliath/application.rb
497
542
  - lib/goliath/connection.rb
@@ -502,6 +547,7 @@ files:
502
547
  - lib/goliath/headers.rb
503
548
  - lib/goliath/http_status_codes.rb
504
549
  - lib/goliath/plugins/latency.rb
550
+ - lib/goliath/rack.rb
505
551
  - lib/goliath/rack/async_middleware.rb
506
552
  - lib/goliath/rack/barrier_aroundware.rb
507
553
  - lib/goliath/rack/barrier_aroundware_factory.rb
@@ -509,12 +555,12 @@ files:
509
555
  - lib/goliath/rack/default_mime_type.rb
510
556
  - lib/goliath/rack/default_response_format.rb
511
557
  - lib/goliath/rack/favicon.rb
558
+ - lib/goliath/rack/formatters.rb
512
559
  - lib/goliath/rack/formatters/html.rb
513
560
  - lib/goliath/rack/formatters/json.rb
514
561
  - lib/goliath/rack/formatters/plist.rb
515
562
  - lib/goliath/rack/formatters/xml.rb
516
563
  - lib/goliath/rack/formatters/yaml.rb
517
- - lib/goliath/rack/formatters.rb
518
564
  - lib/goliath/rack/heartbeat.rb
519
565
  - lib/goliath/rack/jsonp.rb
520
566
  - lib/goliath/rack/params.rb
@@ -523,11 +569,12 @@ files:
523
569
  - lib/goliath/rack/simple_aroundware_factory.rb
524
570
  - lib/goliath/rack/templates.rb
525
571
  - lib/goliath/rack/tracer.rb
572
+ - lib/goliath/rack/types.rb
526
573
  - lib/goliath/rack/types/base.rb
527
574
  - lib/goliath/rack/types/boolean.rb
528
575
  - lib/goliath/rack/types/core.rb
529
576
  - lib/goliath/rack/types/symbol.rb
530
- - lib/goliath/rack/types.rb
577
+ - lib/goliath/rack/validation.rb
531
578
  - lib/goliath/rack/validation/boolean_value.rb
532
579
  - lib/goliath/rack/validation/coerce.rb
533
580
  - lib/goliath/rack/validation/default_params.rb
@@ -537,30 +584,27 @@ files:
537
584
  - lib/goliath/rack/validation/required.rb
538
585
  - lib/goliath/rack/validation/required_param.rb
539
586
  - lib/goliath/rack/validation/required_value.rb
540
- - lib/goliath/rack/validation.rb
541
587
  - lib/goliath/rack/validator.rb
542
- - lib/goliath/rack.rb
543
588
  - lib/goliath/request.rb
544
589
  - lib/goliath/response.rb
545
590
  - lib/goliath/runner.rb
546
591
  - lib/goliath/server.rb
547
592
  - lib/goliath/test_helper.rb
593
+ - lib/goliath/test_helper_sse.rb
548
594
  - lib/goliath/test_helper_streaming.rb
549
595
  - lib/goliath/test_helper_ws.rb
596
+ - lib/goliath/validation.rb
550
597
  - lib/goliath/validation/error.rb
551
598
  - lib/goliath/validation/standard_http_errors.rb
552
- - lib/goliath/validation.rb
553
599
  - lib/goliath/version.rb
554
600
  - lib/goliath/websocket.rb
555
- - lib/goliath.rb
556
- - LICENSE
557
- - Rakefile
558
- - README.md
559
601
  - spec/integration/async_request_processing.rb
560
602
  - spec/integration/chunked_streaming_spec.rb
561
603
  - spec/integration/early_abort_spec.rb
562
604
  - spec/integration/echo_spec.rb
563
605
  - spec/integration/empty_body_spec.rb
606
+ - spec/integration/event_stream_spec.rb
607
+ - spec/integration/exception_handling_spec.rb
564
608
  - spec/integration/http_log_spec.rb
565
609
  - spec/integration/jsonp_spec.rb
566
610
  - spec/integration/keepalive_spec.rb
@@ -599,10 +643,6 @@ files:
599
643
  - spec/unit/validation/standard_http_errors_spec.rb
600
644
  - test/echo_test.rb
601
645
  - test/test_helper.rb
602
- - .gemtest
603
- - .gitignore
604
- - .rspec
605
- - .yardopts
606
646
  homepage: http://goliath.io/
607
647
  licenses: []
608
648
  metadata: {}
@@ -612,17 +652,17 @@ require_paths:
612
652
  - lib
613
653
  required_ruby_version: !ruby/object:Gem::Requirement
614
654
  requirements:
615
- - - '>='
655
+ - - ">="
616
656
  - !ruby/object:Gem::Version
617
- version: 1.9.2
657
+ version: 2.1.0
618
658
  required_rubygems_version: !ruby/object:Gem::Requirement
619
659
  requirements:
620
- - - '>='
660
+ - - ">="
621
661
  - !ruby/object:Gem::Version
622
662
  version: '0'
623
663
  requirements: []
624
664
  rubyforge_project:
625
- rubygems_version: 2.0.6
665
+ rubygems_version: 2.6.11
626
666
  signing_key:
627
667
  specification_version: 4
628
668
  summary: Async framework for writing API servers
@@ -632,6 +672,8 @@ test_files:
632
672
  - spec/integration/early_abort_spec.rb
633
673
  - spec/integration/echo_spec.rb
634
674
  - spec/integration/empty_body_spec.rb
675
+ - spec/integration/event_stream_spec.rb
676
+ - spec/integration/exception_handling_spec.rb
635
677
  - spec/integration/http_log_spec.rb
636
678
  - spec/integration/jsonp_spec.rb
637
679
  - spec/integration/keepalive_spec.rb
@@ -668,4 +710,3 @@ test_files:
668
710
  - spec/unit/runner_spec.rb
669
711
  - spec/unit/server_spec.rb
670
712
  - spec/unit/validation/standard_http_errors_spec.rb
671
- has_rdoc: