mongrel2 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
@@ -0,0 +1,456 @@
1
+ 2011-09-19 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * .hgtags:
4
+ Added tag v0.2.1 for changeset d1d66d73becd
5
+ [6ba4c0f4f07e] [tip]
6
+
7
+ * .hgsigs:
8
+ Added signature for changeset 95ea49073e6c
9
+ [d1d66d73becd] [v0.2.1]
10
+
11
+ * lib/mongrel2.rb:
12
+ Bumping patch version for release.
13
+ [95ea49073e6c]
14
+
15
+ * lib/mongrel2/constants.rb:
16
+ Whitespace fix; add missing HTTP::CONTINUE constant.
17
+ [3082d251f00c]
18
+
19
+ 2011-09-18 Michael Granger <ged@FaerieMUD.org>
20
+
21
+ * .hgtags:
22
+ Added tag v0.2.0 for changeset 9828c04f097a
23
+ [8d578ccedea4]
24
+
25
+ * .hgsigs:
26
+ Added signature for changeset 5c631fa35bff
27
+ [9828c04f097a] [v0.2.0]
28
+
29
+ * lib/mongrel2.rb:
30
+ Bumping minor version for release.
31
+ [5c631fa35bff]
32
+
33
+ * lib/mongrel2/testing.rb, spec/lib/helpers.rb:
34
+ Factor out the generically-useful RSpec helper functions into
35
+ mongrel2/testing.rb and add a RequestFactory.
36
+ [25fea15c26cb]
37
+
38
+ * lib/mongrel2/connection.rb, lib/mongrel2/handler.rb,
39
+ lib/mongrel2/httprequest.rb, lib/mongrel2/request.rb,
40
+ spec/mongrel2/handler_spec.rb:
41
+ Fix object ID in inspect output, clean up inspected Request/Response
42
+ objects.
43
+ [3d7de6e47b42]
44
+
45
+ * experiments/mongrel2.org-dsl.rb:
46
+ Tighten up the mongrel2.org DSL example, remove the accidentally-
47
+ committed adminserver part.
48
+ [ed8f18ffe4c3]
49
+
50
+ * examples/request-dumper.rb:
51
+ Test the request dumper under $SAFE = 1, revert back to using
52
+ examples.sqlite
53
+ [291742549f11]
54
+
55
+ * data/mongrel2/bootstrap.html, data/mongrel2/css/master.css, examples
56
+ /request-dumper.tmpl:
57
+ Added CSS
58
+ [032124c021b5]
59
+
60
+ * lib/mongrel2/config/host.rb:
61
+ Config DSL: directory: Default the index file to index.html
62
+ [34b61931b6e6]
63
+
64
+ 2011-09-16 Michael Granger <ged@FaerieMUD.org>
65
+
66
+ * .hgtags:
67
+ Added tag v0.1.2 for changeset 8c47a392865d
68
+ [edb13b600572]
69
+
70
+ * .hgsigs:
71
+ Added signature for changeset 4212c8770654
72
+ [8c47a392865d] [v0.1.2]
73
+
74
+ * lib/mongrel2.rb:
75
+ Bump patch version for bugfix release.
76
+ [4212c8770654]
77
+
78
+ * examples/config.rb, examples/request-dumper.rb,
79
+ lib/mongrel2/constants.rb, lib/mongrel2/httpresponse.rb,
80
+ spec/mongrel2/httpresponse_spec.rb:
81
+ Fixed some header problems in Mongrel2::HTTPResponse.
82
+ - Re-calculate content-length and date headers on each render.
83
+ - Don't clear headers passed to the constructor.
84
+ [e74dcb79bf15]
85
+
86
+ 2011-09-14 Michael Granger <ged@FaerieMUD.org>
87
+
88
+ * Automated merge with ssh://deveiate.org/Ruby-Mongrel2
89
+ [2da76acfb8db]
90
+
91
+ * Rakefile:
92
+ Automated merge with ssh://deveiate.org/Ruby-Mongrel2
93
+ [e3908fd8e744]
94
+
95
+ * Rakefile:
96
+ Remove ChangeLog task, since hoe-deveiate already does it
97
+ [5f4982a32949]
98
+
99
+ * History.rdoc:
100
+ Updating History
101
+ [3b013d4918c6]
102
+
103
+ * .hgtags:
104
+ Added tag v0.1.1 for changeset 42da048fe158
105
+ [2489be2693d5]
106
+
107
+ * .hgsigs:
108
+ Added signature for changeset 2f5183ca5446
109
+ [42da048fe158] [v0.1.1]
110
+
111
+ * lib/mongrel2.rb:
112
+ Bumped minor version for dependency update.
113
+ [2f5183ca5446]
114
+
115
+ * Rakefile, lib/mongrel2.rb:
116
+ Updated rbzmq dependency
117
+ [758fe465780e]
118
+
119
+ * .hgtags:
120
+ Added tag v0.1.0 for changeset 55c8f01c01c6
121
+ [39b509c68142]
122
+
123
+ * .hgsigs:
124
+ Added signature for changeset da03e18009f8
125
+ [55c8f01c01c6] [v0.1.0]
126
+
127
+ * History.rdoc, lib/mongrel2.rb, lib/mongrel2/request.rb:
128
+ Updated docs, bumped version to 0.1.0 to reflect API change.
129
+ [da03e18009f8]
130
+
131
+ * lib/mongrel2/httprequest.rb, lib/mongrel2/request.rb,
132
+ spec/mongrel2/httprequest_spec.rb, spec/mongrel2/request_spec.rb:
133
+ Make Mongrel2::Request#response memoize its return value, and add a
134
+ class for determining which response type to return for ease of
135
+ overriding.
136
+ [80bdfbf38454]
137
+
138
+ 2011-09-13 Michael Granger <ged@FaerieMUD.org>
139
+
140
+ * History.rdoc:
141
+ Updating History file.
142
+ [05ce9d6df9af]
143
+
144
+ * .hgtags:
145
+ Added tag v0.0.2 for changeset 8947e2c06ceb
146
+ [0183a9fdcadc]
147
+
148
+ * .hgsigs:
149
+ Added signature for changeset c39289ec700e
150
+ [8947e2c06ceb] [v0.0.2]
151
+
152
+ * Rakefile, lib/mongrel2.rb, lib/mongrel2/handler.rb:
153
+ Adding a shim for lack of ZMQ::Error in 2.1.3.
154
+ [c39289ec700e]
155
+
156
+ * .hgignore:
157
+ Merged with 3659a56af8fb
158
+ [f2201728e874]
159
+
160
+ * .hgignore:
161
+ Ignoring packaging directory
162
+ [0613976b6735]
163
+
164
+ 2011-09-12 Michael Granger <ged@FaerieMUD.org>
165
+
166
+ * README.rdoc:
167
+ README fixes
168
+ [3659a56af8fb] [github/master]
169
+
170
+ * Rakefile:
171
+ Fixing gem name
172
+ [8283ced55657]
173
+
174
+ * .hgtags:
175
+ Added tag v0.0.1 for changeset 0eb864f65172
176
+ [5cb0ab2a1471]
177
+
178
+ * .hgsigs:
179
+ Added signature for changeset 7ece186852cd
180
+ [0eb864f65172] [v0.0.1]
181
+
182
+ * .hgignore, History.rdoc, Rakefile:
183
+ Fix release tasks, update the History.rdoc.
184
+ [7ece186852cd]
185
+
186
+ * .hgtags:
187
+ Removed tag v0.0.1
188
+ [6083c1af9ba5]
189
+
190
+ * .hgtags:
191
+ Added tag v0.0.1 for changeset 21aa45e88d3b
192
+ [54ecb2092464]
193
+
194
+ * .hgsigs:
195
+ Added signature for changeset b5bd6fee2124
196
+ [21aa45e88d3b]
197
+
198
+ * .hgtags:
199
+ Added tag prerelease for changeset 8e1320cd72d8
200
+ [b5bd6fee2124]
201
+
202
+ * README.rdoc:
203
+ README updates
204
+ [8e1320cd72d8] [prerelease]
205
+
206
+ * .gemtest, .hgignore, lib/mongrel2/config.rb,
207
+ lib/mongrel2/connection.rb, lib/mongrel2/handler.rb,
208
+ lib/mongrel2/httprequest.rb, lib/mongrel2/httpresponse.rb,
209
+ lib/mongrel2/jsonrequest.rb, lib/mongrel2/response.rb,
210
+ spec/lib/constants.rb, spec/lib/helpers.rb, spec/lib/matchers.rb,
211
+ spec/mongrel2/config/directory_spec.rb,
212
+ spec/mongrel2/config/dsl_spec.rb,
213
+ spec/mongrel2/config/handler_spec.rb,
214
+ spec/mongrel2/config/host_spec.rb,
215
+ spec/mongrel2/config/proxy_spec.rb,
216
+ spec/mongrel2/config/route_spec.rb,
217
+ spec/mongrel2/config/server_spec.rb,
218
+ spec/mongrel2/config/setting_spec.rb,
219
+ spec/mongrel2/config/statistic_spec.rb,
220
+ spec/mongrel2/config_spec.rb, spec/mongrel2/connection_spec.rb,
221
+ spec/mongrel2/constants_spec.rb, spec/mongrel2/control_spec.rb,
222
+ spec/mongrel2/handler_spec.rb, spec/mongrel2/httprequest_spec.rb,
223
+ spec/mongrel2/httpresponse_spec.rb, spec/mongrel2/logging_spec.rb,
224
+ spec/mongrel2/mixins_spec.rb, spec/mongrel2/request_spec.rb,
225
+ spec/mongrel2/response_spec.rb, spec/mongrel2/table_spec.rb,
226
+ spec/mongrel2_spec.rb:
227
+ Improve overall test coverage to 95%, finished replacing real 0MQ
228
+ sockets with mocks and stubs to avoid complex setup/teardown
229
+ procedures.
230
+ [19e0a72320dd]
231
+
232
+ 2011-09-10 Michael Granger <ged@FaerieMUD.org>
233
+
234
+ * bin/m2sh.rb:
235
+ Finished as much of m2sh.rb as I'm going to for the 0.0.1 release.
236
+ [9f50e70a27e0]
237
+
238
+ * README.rdoc, Rakefile:
239
+ Documentation fixes; switch gem dependencies from sqlite3 to
240
+ amalgalite
241
+ [919e1b72ef4f]
242
+
243
+ * bin/m2sh.rb, experiments/mongrel2.org-dsl.rb:
244
+ Finishing up work on the initial version of m2sh.rb
245
+ [07a2f605a04a]
246
+
247
+ * lib/mongrel2.rb:
248
+ Make the version string return "Ruby-Mongrel2" to avoid aonfusion
249
+ [be362e9b6bc8]
250
+
251
+ * lib/mongrel2/config/server.rb, spec/mongrel2/config/server_spec.rb:
252
+ Add validations for Mongrel2::Config::Server
253
+ [cb21877eb469]
254
+
255
+ * .hgignore, .irbrc, README.rdoc, experiments/m2specs-amalgalite.dot,
256
+ experiments/m2specs-sqlite3.dot, lib/mongrel2/config.rb,
257
+ lib/mongrel2/config/dsl.rb, lib/mongrel2/config/log.rb,
258
+ lib/mongrel2/logging.rb, spec/lib/helpers.rb,
259
+ spec/mongrel2/config/directory_spec.rb,
260
+ spec/mongrel2/config/dsl_spec.rb,
261
+ spec/mongrel2/config/handler_spec.rb,
262
+ spec/mongrel2/config/log_spec.rb, spec/mongrel2/config_spec.rb,
263
+ spec/mongrel2/handler_spec.rb:
264
+ Adding support for Amalgalite
265
+ [3f8402c080ce]
266
+
267
+ 2011-09-09 Michael Granger <ged@FaerieMUD.org>
268
+
269
+ * Merged with 6ea60b67e106
270
+ [6d5341f30cc4]
271
+
272
+ * Manifest.txt:
273
+ Updating the manifest for the first release
274
+ [916a79570cdc]
275
+
276
+ * examples/helloworld-handler.rb, lib/mongrel2/handler.rb:
277
+ More Handler API docs.
278
+ [47427db9b4fb]
279
+
280
+ * lib/mongrel2/handler.rb:
281
+ Adding some Mongrel2::Handler API docs.
282
+ [da95bfdf83da]
283
+
284
+ * lib/mongrel2/config/host.rb:
285
+ Adding a many_to_one association for the server belonging to a
286
+ Mongrel2::Config::Host
287
+ [6ea60b67e106]
288
+
289
+ * lib/mongrel2/config/log.rb, spec/mongrel2/config/log_spec.rb:
290
+ Fixing a bug and adding coverage for
291
+ Mongrel2::Config::Log.log_action
292
+ [ff7c27cd7d0c]
293
+
294
+ * lib/mongrel2/config/log.rb, spec/mongrel2/config/log_spec.rb:
295
+ Adding a convenience class method and a stringification method to
296
+ Mongrel2::Config::Log
297
+ [79204623a123]
298
+
299
+ * experiments/requestdumper-profile-97bfa5c5211f.graffle:
300
+ Adding a proftools dump of the requestdumper app
301
+ [00cbc1b89a61]
302
+
303
+ 2011-09-08 Michael Granger <ged@FaerieMUD.org>
304
+
305
+ * README.rdoc, lib/mongrel2.rb, lib/mongrel2/config.rb,
306
+ lib/mongrel2/config/dsl.rb, lib/mongrel2/handler.rb,
307
+ lib/mongrel2/response.rb, lib/mongrel2/table.rb,
308
+ spec/lib/helpers.rb, spec/mongrel2/config/dsl_spec.rb,
309
+ spec/mongrel2/config/route_spec.rb, spec/mongrel2/control_spec.rb,
310
+ spec/mongrel2/table_spec.rb:
311
+ Documentation work and spec fixes.
312
+ [6644045857ff]
313
+
314
+ * lib/mongrel2/control.rb, lib/mongrel2/exceptions.rb,
315
+ spec/mongrel2/control_spec.rb:
316
+ Finished up the initial implementation of Mongrel2::Control
317
+ [20b4127ec5b8]
318
+
319
+ * .hgignore, Rakefile, bin/m2sh.rb, config.sqlite,
320
+ data/mongrel2/bootstrap.html, examples/README.txt,
321
+ examples/config.rb, examples/helloworld-handler.rb, examples
322
+ /request-dumper.rb, examples/request-dumper.tmpl, examples/run,
323
+ experiments/bootstrap.config, experiments/endtoend.rb,
324
+ lib/mongrel2.rb, lib/mongrel2/config.rb,
325
+ lib/mongrel2/config/directory.rb, lib/mongrel2/config/dsl.rb,
326
+ lib/mongrel2/config/handler.rb, lib/mongrel2/config/host.rb,
327
+ lib/mongrel2/connection.rb, lib/mongrel2/constants.rb,
328
+ lib/mongrel2/exceptions.rb, lib/mongrel2/handler.rb,
329
+ lib/mongrel2/httprequest.rb, lib/mongrel2/httpresponse.rb,
330
+ lib/mongrel2/jsonrequest.rb, lib/mongrel2/request.rb,
331
+ lib/mongrel2/response.rb, lib/mongrel2/table.rb,
332
+ lib/mongrel2/xmlrequest.rb, spec/lib/constants.rb,
333
+ spec/lib/helpers.rb, spec/lib/matchers.rb,
334
+ spec/mongrel2/config/directory_spec.rb,
335
+ spec/mongrel2/config/dsl_spec.rb, spec/mongrel2/connection_spec.rb,
336
+ spec/mongrel2/handler_spec.rb, spec/mongrel2/httpresponse_spec.rb,
337
+ spec/mongrel2/request_spec.rb, spec/mongrel2/response_spec.rb:
338
+ Adding the initial Mongrel2::Handler class, split out requests into
339
+ HTTP, JSON, and XML.
340
+ [97bfa5c5211f]
341
+
342
+ * README.rdoc, lib/mongrel2.rb, lib/mongrel2/connection.rb,
343
+ lib/mongrel2/constants.rb, lib/mongrel2/control.rb,
344
+ lib/mongrel2/exceptions.rb, lib/mongrel2/logging.rb,
345
+ lib/mongrel2/mixins.rb:
346
+ Documentation updates/fixes
347
+ [9818069b4fa1]
348
+
349
+ 2011-08-31 Michael Granger <ged@FaerieMUD.org>
350
+
351
+ * .rvmrc, lib/mongrel2.rb, lib/mongrel2/config/host.rb,
352
+ lib/mongrel2/config/route.rb:
353
+ *Actually* making the library warn under Rubies earlier than 1.9.2.
354
+ [2bda0ef5b1dc]
355
+
356
+ * Rakefile, spec/lib/helpers.rb:
357
+ Make Mongrel2 1.9-only
358
+ [e28dd808791f]
359
+
360
+ 2011-08-30 Michael Granger <ged@FaerieMUD.org>
361
+
362
+ * lib/mongrel2.rb, lib/mongrel2/config/directory.rb,
363
+ lib/mongrel2/config/host.rb, spec/lib/helpers.rb,
364
+ spec/mongrel2/config/directory_spec.rb,
365
+ spec/mongrel2/config/dsl_spec.rb,
366
+ spec/mongrel2/config/route_spec.rb,
367
+ spec/mongrel2/connection_spec.rb:
368
+ Added directory validation; fixed broken directory creation
369
+ elsewhere.
370
+ [b70f91252903]
371
+
372
+ 2011-08-29 Michael Granger <ged@FaerieMUD.org>
373
+
374
+ * .hgignore, Rakefile, bin/m2sh.rb, config.sqlite,
375
+ experiments/endtoend.rb, experiments/xmlhandler.rb, lib/mongrel2.rb,
376
+ lib/mongrel2/config/directory.rb, lib/mongrel2/connection.rb,
377
+ lib/mongrel2/control.rb, lib/mongrel2/exceptions.rb,
378
+ lib/mongrel2/logging.rb, lib/mongrel2/mixins.rb,
379
+ lib/mongrel2/request.rb, lib/mongrel2/response.rb,
380
+ spec/lib/constants.rb, spec/lib/helpers.rb,
381
+ spec/mongrel2/config/directory_spec.rb,
382
+ spec/mongrel2/connection_spec.rb, spec/mongrel2/request_spec.rb:
383
+ Splitting out request/response types
384
+ [ca2cff4a050e]
385
+
386
+ * lib/mongrel2/config/handler.rb, spec/lib/constants.rb,
387
+ spec/mongrel2/config/handler_spec.rb:
388
+ Added validations to Mongrel2::Config::Handler.
389
+ [b4eeb85cbfe6]
390
+
391
+ * config.sqlite, experiments/bootstrap.config,
392
+ experiments/endtoend.rb, lib/mongrel2.rb,
393
+ lib/mongrel2/connection.rb, lib/mongrel2/constants.rb,
394
+ lib/mongrel2/control.rb, lib/mongrel2/request.rb,
395
+ lib/mongrel2/response.rb, lib/mongrel2/table.rb,
396
+ spec/lib/constants.rb, spec/mongrel2/connection_spec.rb,
397
+ spec/mongrel2/constants_spec.rb, spec/mongrel2/control_spec.rb,
398
+ spec/mongrel2/logging_spec.rb, spec/mongrel2/request_spec.rb,
399
+ spec/mongrel2/response_spec.rb, spec/mongrel2/table_spec.rb,
400
+ spec/mongrel2_spec.rb:
401
+ Adding handler framework classes
402
+ [d990a27281a3]
403
+
404
+ 2011-08-26 Michael Granger <ged@FaerieMUD.org>
405
+
406
+ * README.rdoc, Rakefile, experiments/dsl-spike.rb,
407
+ experiments/mongrel2.org-dsl.rb:
408
+ Documentation update.
409
+ [2d46631ac05c]
410
+
411
+ * .hgignore, History.md, History.rdoc, Manifest.txt, README.rdoc,
412
+ Rakefile, bin/m2sh.rb, data/mongrel2/bootstrap.html,
413
+ data/mongrel2/config.sql, data/mongrel2/mimetypes.sql, experiments
414
+ /dsl-spike.rb, experiments/mongrel2.org-dsl.rb,
415
+ experiments/mongrel2.org.conf, lib/mongrel2/config.rb,
416
+ lib/mongrel2/config/dsl.rb, lib/mongrel2/config/host.rb,
417
+ lib/mongrel2/config/mimetype.rb, lib/mongrel2/config/route.rb,
418
+ lib/mongrel2/config/server.rb, spec/lib/constants.rb,
419
+ spec/lib/helpers.rb, spec/mongrel2/config/directory_spec.rb,
420
+ spec/mongrel2/config/dsl_spec.rb,
421
+ spec/mongrel2/config/handler_spec.rb,
422
+ spec/mongrel2/config/host_spec.rb, spec/mongrel2/config/log_spec.rb,
423
+ spec/mongrel2/config/proxy_spec.rb,
424
+ spec/mongrel2/config/route_spec.rb,
425
+ spec/mongrel2/config/server_spec.rb,
426
+ spec/mongrel2/config/setting_spec.rb,
427
+ spec/mongrel2/config/statistic_spec.rb,
428
+ spec/mongrel2/config_spec.rb:
429
+ Finished up work on the config classes and the DSL
430
+ [1ef9efccf8f2]
431
+
432
+ 2011-08-18 Michael Granger <ged@FaerieMUD.org>
433
+
434
+ * .irbrc, README.md, README.rdoc, bin/m2sh.rb, config.sqlite,
435
+ experiments/bootstrap.config, lib/mongrel2.rb,
436
+ lib/mongrel2/config.rb, lib/mongrel2/config/directory.rb,
437
+ lib/mongrel2/config/handler.rb, lib/mongrel2/config/host.rb,
438
+ lib/mongrel2/config/log.rb, lib/mongrel2/config/proxy.rb,
439
+ lib/mongrel2/config/route.rb, lib/mongrel2/config/server.rb,
440
+ lib/mongrel2/config/setting.rb, lib/mongrel2/config/statistic.rb,
441
+ lib/mongrel2/constants.rb, lib/mongrel2/model.rb,
442
+ spec/mongrel2/config_spec.rb, spec/mongrel2/model_spec.rb:
443
+ Initial work on the config classes done; started work on a toy
444
+ version of m2sh.
445
+ [763661578e2d]
446
+
447
+ 2011-08-17 Michael Granger <ged@FaerieMUD.org>
448
+
449
+ * .autotest, History.md, Manifest.txt, README.md, Rakefile,
450
+ bin/m2sh.rb, lib/mongrel2.rb, lib/mongrel2/constants.rb,
451
+ lib/mongrel2/logging.rb, lib/mongrel2/mixins.rb,
452
+ lib/mongrel2/model.rb, spec/lib/constants.rb, spec/lib/helpers.rb,
453
+ spec/mongrel2/mixins_spec.rb, spec/mongrel2/model_spec.rb,
454
+ spec/mongrel2_spec.rb:
455
+ Creating project skeleton.
456
+ [3a1882003e47]
@@ -1,3 +1,35 @@
1
+ == v0.2.2 [2011-09-19] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ - Packaging fix
4
+
5
+
6
+ == v0.2.1 [2011-09-19] Michael Granger <ged@FaerieMUD.org>
7
+
8
+ - Add missing HTTP::CONTINUE constant.
9
+
10
+
11
+ == v0.2.0 [2011-09-18] Michael Granger <ged@FaerieMUD.org>
12
+
13
+ - Factor out the generically-useful RSpec helper functions into
14
+ mongrel2/testing.rb and add a RequestFactory.
15
+ - Fix object ID in inspect output, clean up inspected Request/Response
16
+ objects.
17
+ - Tightened up the mongrel2.org DSL example, remove the accidentally-
18
+ committed adminserver part.
19
+ - Request dumper now runs under $SAFE = 1
20
+ - Revert examples back to using examples.sqlite
21
+ - Added a bit of CSS to the examples
22
+ - Config DSL: directory: Default the index file to index.html
23
+
24
+
25
+ == v0.1.2 [2011-09-16] Michael Granger <ged@FaerieMUD.org>
26
+
27
+ Fixed some header problems in Mongrel2::HTTPResponse:
28
+
29
+ - Re-calculate content-length and date headers on each render.
30
+ - Don't clear headers passed to the constructor.
31
+
32
+
1
33
  == v0.1.1 [2011-11-14] Michael Granger <ged@FaerieMUD.org>
2
34
 
3
35
  Update dependency to rbzmq-2.1.4 for ZMQ::Error.
@@ -1,3 +1,6 @@
1
+ .autotest
2
+ .gemtest
3
+ ChangeLog
1
4
  History.rdoc
2
5
  Manifest.txt
3
6
  README.rdoc
@@ -5,6 +8,7 @@ Rakefile
5
8
  bin/m2sh.rb
6
9
  data/mongrel2/bootstrap.html
7
10
  data/mongrel2/config.sql
11
+ data/mongrel2/css/master.css
8
12
  data/mongrel2/mimetypes.sql
9
13
  examples/README.txt
10
14
  examples/config.rb
@@ -38,6 +42,7 @@ lib/mongrel2/mixins.rb
38
42
  lib/mongrel2/request.rb
39
43
  lib/mongrel2/response.rb
40
44
  lib/mongrel2/table.rb
45
+ lib/mongrel2/testing.rb
41
46
  lib/mongrel2/xmlrequest.rb
42
47
  spec/lib/constants.rb
43
48
  spec/lib/helpers.rb
@@ -57,6 +62,7 @@ spec/mongrel2/connection_spec.rb
57
62
  spec/mongrel2/constants_spec.rb
58
63
  spec/mongrel2/control_spec.rb
59
64
  spec/mongrel2/handler_spec.rb
65
+ spec/mongrel2/httprequest_spec.rb
60
66
  spec/mongrel2/httpresponse_spec.rb
61
67
  spec/mongrel2/logging_spec.rb
62
68
  spec/mongrel2/mixins_spec.rb
data/Rakefile CHANGED
@@ -38,6 +38,9 @@ hoespec = Hoe.spec 'mongrel2' do
38
38
  self.spec_extras[:licenses] = ["BSD"]
39
39
  self.require_ruby_version( '>= 1.9.2' )
40
40
 
41
+ self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
42
+ self.check_history_on_release = true if self.respond_to?( :check_history_on_release= )
43
+
41
44
  self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
42
45
  end
43
46
 
@@ -48,7 +51,7 @@ task 'hg:precheckin' => :spec
48
51
 
49
52
 
50
53
  # Rebuild the ChangeLog immediately before release
51
- task :prerelease => 'ChangeLog'
54
+ task :prerelease => [:check_manifest, :check_history, 'ChangeLog']
52
55
 
53
56
 
54
57
  desc "Build a coverage report"
@@ -0,0 +1,48 @@
1
+ /* @override http://pelimer.pg.laika.com:8113/css/master.css */
2
+
3
+ /*
4
+ * Mongrel2 Examples Stylesheet
5
+ * $Id$
6
+ */
7
+
8
+ html {
9
+ background: #333;
10
+ margin: 0;
11
+ }
12
+
13
+ body {
14
+ background: ##9d9d9d;
15
+ background: -moz-linear-gradient(bottom, #aaa 0%, #eee 30%);
16
+ background: -webkit-gradient(linear, left bottom, left top,
17
+ color-stop(0%,#9d9d9d), color-stop(30%,#eee));
18
+ background: linear-gradient(top, ##9d9d9d 0%,#eee 30%);
19
+ color: #333;
20
+ margin: 0;
21
+ padding: 4em;
22
+ font-family: Menlo, Monaco, monospace;
23
+ font-size: 76%;
24
+ min-width: 785px;
25
+ }
26
+
27
+ pre, table, code {
28
+ background-color: rgba( 25,25,200, 0.2 );
29
+ box-shadow: 0 2px 8px rgba( 50,50,50, 0.25 )
30
+ }
31
+
32
+ pre {
33
+ padding: 2px 8px;
34
+ font-family: Menlo, Monaco, monospace;
35
+ overflow: hidden;
36
+ }
37
+ table {
38
+ border-collapse: collapse;
39
+ }
40
+ th, td {
41
+ padding: 2px 8px;
42
+ border-bottom: 1px solid rgba( 150,150,150, 0.5 );
43
+ }
44
+ tbody th {
45
+ text-align: right;
46
+ vertical-align: top;
47
+ white-space: pre;
48
+ }
@@ -14,10 +14,10 @@ module Mongrel2
14
14
  abort "\n\n>>> Mongrel2 requires Ruby 1.9.2 or later. <<<\n\n" if RUBY_VERSION < '1.9.2'
15
15
 
16
16
  # Library version constant
17
- VERSION = '0.2.1'
17
+ VERSION = '0.2.2'
18
18
 
19
19
  # Version-control revision constant
20
- REVISION = %q$Revision: 95ea49073e6c $
20
+ REVISION = %q$Revision: f1abf26d45ea $
21
21
 
22
22
 
23
23
  require 'mongrel2/logging'
@@ -0,0 +1,132 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'uri'
4
+ require 'pathname'
5
+ require 'mongrel2' unless defined?( Mongrel2 )
6
+
7
+
8
+ # A collection of constants and functions for testing Mongrel2 applications,
9
+ # as well as Mongrel2 itself.
10
+
11
+ module Mongrel2
12
+
13
+ ### A collection of helper functions that are generally useful
14
+ ### for testing Mongrel2::Handlers.
15
+ module SpecHelpers
16
+ end # module SpecHelpers
17
+
18
+
19
+ ### A factory for generating Mongrel2::Request objects for testing.
20
+ class RequestFactory
21
+
22
+ # Default testing UUID (sender_id)
23
+ DEFAULT_TEST_UUID = 'BD17D85C-4730-4BF2-999D-9D2B2E0FCCF9'
24
+
25
+ # Default connection ID
26
+ DEFAULT_CONN_ID = 0
27
+
28
+ # 0mq socket specifications for Handlers
29
+ TEST_SEND_SPEC = 'tcp://127.0.0.1:9998'
30
+ TEST_RECV_SPEC = 'tcp://127.0.0.1:9997'
31
+
32
+ # The testing URL to use by default
33
+ DEFAULT_TESTING_URL = URI( 'http://localhost:8080/a_handler' )
34
+
35
+ DEFAULT_TESTING_HOST = DEFAULT_TESTING_URL.host
36
+ DEFAULT_TESTING_PORT = DEFAULT_TESTING_URL.port
37
+ DEFAULT_TESTING_ROUTE = DEFAULT_TESTING_URL.path
38
+
39
+ # The default set of headers used for HTTP requests
40
+ DEFAULT_TESTING_HEADERS = {
41
+ "x-forwarded-for" => "127.0.0.1",
42
+ "accept-language" => "en-US,en;q=0.8",
43
+ "accept-encoding" => "gzip,deflate,sdch",
44
+ "connection" => "keep-alive",
45
+ "accept-charset" => "UTF-8,*;q=0.5",
46
+ "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
47
+ "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) " +
48
+ "AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 " +
49
+ "Safari/535.1",
50
+ "VERSION" => "HTTP/1.1",
51
+ }
52
+
53
+ # The defaults used by the HTTP request factory
54
+ DEFAULT_FACTORY_CONFIG = {
55
+ :sender_id => DEFAULT_TEST_UUID,
56
+ :conn_id => DEFAULT_CONN_ID,
57
+ :host => DEFAULT_TESTING_HOST,
58
+ :port => DEFAULT_TESTING_PORT,
59
+ :route => DEFAULT_TESTING_ROUTE,
60
+ :headers => DEFAULT_TESTING_HEADERS,
61
+ }
62
+
63
+ # Freeze all testing constants
64
+ constants.each do |cname|
65
+ const_get(cname).freeze
66
+ end
67
+
68
+
69
+ ### Create a new RequestFactory with the given +config+, which will be merged with
70
+ ### DEFAULT_FACTORY_CONFIG.
71
+ def initialize( config={} )
72
+ config[:headers] = DEFAULT_TESTING_HEADERS.merge( config[:headers] ) if config[:headers]
73
+ config = DEFAULT_FACTORY_CONFIG.merge( config )
74
+
75
+ @sender_id = config[:sender_id]
76
+ @host = config[:host]
77
+ @port = config[:port]
78
+ @route = config[:route]
79
+ @headers = Mongrel2::Table.new( config[:headers] )
80
+
81
+ @conn_id = 0
82
+ end
83
+
84
+ ######
85
+ public
86
+ ######
87
+
88
+ attr_accessor :sender_id, :host, :port, :route, :conn_id
89
+ attr_reader :headers
90
+
91
+ #
92
+ # :section: HTTP verb methods
93
+ #
94
+
95
+ ### Create a new Mongrel2::Request for the specified +uri+.
96
+ def get( uri, headers={} )
97
+ raise "Request doesn't route through %p" % [ self.route ] unless
98
+ uri.start_with?( self.route )
99
+
100
+ headers = self.make_merged_headers( :GET, uri, headers )
101
+ rclass = Mongrel2::Request.subclass_for_method( :GET )
102
+
103
+ return rclass.new( self.sender_id, self.conn_id.to_s, uri.to_s, headers )
104
+ end
105
+
106
+
107
+ #########
108
+ protected
109
+ #########
110
+
111
+ ### Merge the factory's headers with +userheaders+, and then merge in the
112
+ ### special headers that Mongrel2 adds that are based on the +uri+ and other
113
+ ### server attributes.
114
+ def make_merged_headers( verb, uri, userheaders )
115
+ headers = self.headers.merge( userheaders )
116
+ uri = URI( uri )
117
+
118
+ # Add mongrel headers
119
+ headers.uri = uri.to_s
120
+ headers.path = uri.path
121
+ headers['METHOD'] = verb.to_s
122
+ headers.host = "%s:%d" % [ self.host, self.port ]
123
+ headers.query = uri.query if uri.query
124
+ headers.pattern = self.route
125
+
126
+ return headers
127
+ end
128
+
129
+ end # RequestFactory
130
+
131
+ end # module Mongrel2
132
+
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ BEGIN {
4
+ require 'pathname'
5
+ basedir = Pathname.new( __FILE__ ).dirname.parent.parent
6
+
7
+ libdir = basedir + "lib"
8
+
9
+ $LOAD_PATH.unshift( basedir ) unless $LOAD_PATH.include?( basedir )
10
+ $LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
11
+ }
12
+
13
+ require 'rspec'
14
+ require 'tnetstring'
15
+
16
+ require 'spec/lib/helpers'
17
+
18
+ require 'mongrel2'
19
+ require 'mongrel2/httprequest'
20
+
21
+
22
+ #####################################################################
23
+ ### C O N T E X T S
24
+ #####################################################################
25
+
26
+ describe Mongrel2::HTTPRequest do
27
+
28
+ before( :all ) do
29
+ setup_logging( :fatal )
30
+ end
31
+
32
+ before( :each ) do
33
+ headers = normalize_headers( {} )
34
+ @req = Mongrel2::HTTPRequest.new( TEST_UUID, 8817, '/test', headers, '' )
35
+ end
36
+
37
+ after( :all ) do
38
+ reset_logging()
39
+ end
40
+
41
+
42
+ it "can create an HTTPResponse for itself" do
43
+ result = @req.response
44
+ result.should be_a( Mongrel2::HTTPResponse )
45
+ result.sender_id.should == @req.sender_id
46
+ result.conn_id.should == @req.conn_id
47
+ end
48
+
49
+ it "remembers its corresponding HTTPResponse if it's created it already" do
50
+ result = @req.response
51
+ result.should be_a( Mongrel2::HTTPResponse )
52
+ result.sender_id.should == @req.sender_id
53
+ result.conn_id.should == @req.conn_id
54
+ end
55
+
56
+ it "knows that its connection isn't persistent if it's an HTTP/1.0 request" do
57
+ @req.headers.version = 'HTTP/1.0'
58
+ @req.should_not be_keepalive()
59
+ end
60
+
61
+ it "knows that its connection isn't persistent if has a 'close' token in its Connection header" do
62
+ @req.headers.version = 'HTTP/1.1'
63
+ @req.headers[ :connection ] = 'violent, close'
64
+ @req.should_not be_keepalive()
65
+ end
66
+
67
+ it "knows that its connection could be persistent if doesn't have a Connection header, " +
68
+ "and it's an HTTP/1.1 request" do
69
+ @req.headers.version = 'HTTP/1.1'
70
+ @req.headers.delete( :connection )
71
+ @req.should be_keepalive()
72
+ end
73
+
74
+ it "knows that its connection is persistent if has a Connection header without a 'close' " +
75
+ "token and it's an HTTP/1.1 request" do
76
+ @req.headers.version = 'HTTP/1.1'
77
+ @req.headers.connection = 'keep-alive'
78
+ @req.should be_keepalive()
79
+ end
80
+
81
+ end
82
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongrel2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -52,7 +52,7 @@ date: 2011-09-19 00:00:00.000000000Z
52
52
  dependencies:
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: nokogiri
55
- requirement: &70247178090440 !ruby/object:Gem::Requirement
55
+ requirement: &70299509927540 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: '1.5'
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *70247178090440
63
+ version_requirements: *70299509927540
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: sequel
66
- requirement: &70247178089880 !ruby/object:Gem::Requirement
66
+ requirement: &70299509926700 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: '3.26'
72
72
  type: :runtime
73
73
  prerelease: false
74
- version_requirements: *70247178089880
74
+ version_requirements: *70299509926700
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: amalgalite
77
- requirement: &70247178067480 !ruby/object:Gem::Requirement
77
+ requirement: &70299509925840 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: '1.1'
83
83
  type: :runtime
84
84
  prerelease: false
85
- version_requirements: *70247178067480
85
+ version_requirements: *70299509925840
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: tnetstring
88
- requirement: &70247178066860 !ruby/object:Gem::Requirement
88
+ requirement: &70299509924940 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: '0.3'
94
94
  type: :runtime
95
95
  prerelease: false
96
- version_requirements: *70247178066860
96
+ version_requirements: *70299509924940
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: yajl-ruby
99
- requirement: &70247178065640 !ruby/object:Gem::Requirement
99
+ requirement: &70299509911820 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ~>
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: '0.8'
105
105
  type: :runtime
106
106
  prerelease: false
107
- version_requirements: *70247178065640
107
+ version_requirements: *70299509911820
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: zmq
110
- requirement: &70247178064720 !ruby/object:Gem::Requirement
110
+ requirement: &70299509910920 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ~>
@@ -115,21 +115,21 @@ dependencies:
115
115
  version: 2.1.4
116
116
  type: :runtime
117
117
  prerelease: false
118
- version_requirements: *70247178064720
118
+ version_requirements: *70299509910920
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: hoe-mercurial
121
- requirement: &70247178063880 !ruby/object:Gem::Requirement
121
+ requirement: &70299509910140 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
124
124
  - - ~>
125
125
  - !ruby/object:Gem::Version
126
- version: 1.2.2
126
+ version: 1.3.0
127
127
  type: :development
128
128
  prerelease: false
129
- version_requirements: *70247178063880
129
+ version_requirements: *70299509910140
130
130
  - !ruby/object:Gem::Dependency
131
131
  name: hoe-highline
132
- requirement: &70247178062860 !ruby/object:Gem::Requirement
132
+ requirement: &70299509909240 !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements:
135
135
  - - ~>
@@ -137,10 +137,10 @@ dependencies:
137
137
  version: 0.0.1
138
138
  type: :development
139
139
  prerelease: false
140
- version_requirements: *70247178062860
140
+ version_requirements: *70299509909240
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: configurability
143
- requirement: &70247178061880 !ruby/object:Gem::Requirement
143
+ requirement: &70299509908380 !ruby/object:Gem::Requirement
144
144
  none: false
145
145
  requirements:
146
146
  - - ~>
@@ -148,10 +148,10 @@ dependencies:
148
148
  version: '1.0'
149
149
  type: :development
150
150
  prerelease: false
151
- version_requirements: *70247178061880
151
+ version_requirements: *70299509908380
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: rspec
154
- requirement: &70247178060660 !ruby/object:Gem::Requirement
154
+ requirement: &70299509907220 !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements:
157
157
  - - ~>
@@ -159,10 +159,10 @@ dependencies:
159
159
  version: '2.4'
160
160
  type: :development
161
161
  prerelease: false
162
- version_requirements: *70247178060660
162
+ version_requirements: *70299509907220
163
163
  - !ruby/object:Gem::Dependency
164
164
  name: hoe
165
- requirement: &70247178051460 !ruby/object:Gem::Requirement
165
+ requirement: &70299509906380 !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements:
168
168
  - - ~>
@@ -170,7 +170,7 @@ dependencies:
170
170
  version: '2.12'
171
171
  type: :development
172
172
  prerelease: false
173
- version_requirements: *70247178051460
173
+ version_requirements: *70299509906380
174
174
  description: ! "A complete Ruby connector for Mongrel2[http://mongrel2.org/].\n\nThis
175
175
  library includes configuration-database ORM classes, a Ruby\nimplementation of the
176
176
  'm2sh' tool, a configuration DSL for generating config\ndatabases in pure Ruby,
@@ -197,6 +197,9 @@ extra_rdoc_files:
197
197
  - README.rdoc
198
198
  - History.rdoc
199
199
  files:
200
+ - .autotest
201
+ - .gemtest
202
+ - ChangeLog
200
203
  - History.rdoc
201
204
  - Manifest.txt
202
205
  - README.rdoc
@@ -204,6 +207,7 @@ files:
204
207
  - bin/m2sh.rb
205
208
  - data/mongrel2/bootstrap.html
206
209
  - data/mongrel2/config.sql
210
+ - data/mongrel2/css/master.css
207
211
  - data/mongrel2/mimetypes.sql
208
212
  - examples/README.txt
209
213
  - examples/config.rb
@@ -237,6 +241,7 @@ files:
237
241
  - lib/mongrel2/request.rb
238
242
  - lib/mongrel2/response.rb
239
243
  - lib/mongrel2/table.rb
244
+ - lib/mongrel2/testing.rb
240
245
  - lib/mongrel2/xmlrequest.rb
241
246
  - spec/lib/constants.rb
242
247
  - spec/lib/helpers.rb
@@ -256,6 +261,7 @@ files:
256
261
  - spec/mongrel2/constants_spec.rb
257
262
  - spec/mongrel2/control_spec.rb
258
263
  - spec/mongrel2/handler_spec.rb
264
+ - spec/mongrel2/httprequest_spec.rb
259
265
  - spec/mongrel2/httpresponse_spec.rb
260
266
  - spec/mongrel2/logging_spec.rb
261
267
  - spec/mongrel2/mixins_spec.rb
@@ -263,7 +269,6 @@ files:
263
269
  - spec/mongrel2/response_spec.rb
264
270
  - spec/mongrel2/table_spec.rb
265
271
  - spec/mongrel2_spec.rb
266
- - .gemtest
267
272
  homepage: http://deveiate.org/projects/Ruby-Mongrel2/
268
273
  licenses:
269
274
  - BSD
metadata.gz.sig CHANGED
Binary file