mongrel2 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/ChangeLog +54 -29
- data/History.rdoc +10 -0
- data/lib/mongrel2.rb +2 -2
- data/lib/mongrel2/httprequest.rb +17 -0
- data/spec/mongrel2/httprequest_spec.rb +27 -2
- metadata +25 -25
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,8 +1,35 @@
|
|
1
|
+
2011-10-03 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
* .hgtags:
|
4
|
+
Added tag v0.6.0 for changeset 4d0e21e8b7f8
|
5
|
+
[bc11f65d120d] [tip]
|
6
|
+
|
7
|
+
* .hgsigs:
|
8
|
+
Added signature for changeset 8234d3fa985b
|
9
|
+
[4d0e21e8b7f8] [v0.6.0]
|
10
|
+
|
11
|
+
* History.rdoc:
|
12
|
+
Updated History
|
13
|
+
[8234d3fa985b]
|
14
|
+
|
15
|
+
* lib/mongrel2.rb:
|
16
|
+
Bumping minor version for release.
|
17
|
+
[c2ffa52b95e8]
|
18
|
+
|
19
|
+
* lib/mongrel2/httprequest.rb, spec/mongrel2/httprequest_spec.rb:
|
20
|
+
Mongrel2::HTTPRequest enhancements.
|
21
|
+
- Added #body= for rewriting the entity body
|
22
|
+
- Added convenience methods for fetching the Content-type and Content-
|
23
|
+
encoding headers: #content_type, #content_encoding
|
24
|
+
- Switched the specs to use Mongrel2::RequestFactory for making
|
25
|
+
request objects
|
26
|
+
[d0d1a93982fc]
|
27
|
+
|
1
28
|
2011-09-30 Michael Granger <ged@FaerieMUD.org>
|
2
29
|
|
3
30
|
* .hgtags:
|
4
31
|
Added tag v0.5.0 for changeset a90ad3074301
|
5
|
-
[1befe0365be8]
|
32
|
+
[1befe0365be8]
|
6
33
|
|
7
34
|
* .hgsigs:
|
8
35
|
Added signature for changeset a6f7638ffc30
|
@@ -21,7 +48,7 @@
|
|
21
48
|
|
22
49
|
* .hgtags:
|
23
50
|
Added tag v0.4.0 for changeset 25f2272fc9f8
|
24
|
-
[0b4e011b72b4]
|
51
|
+
[0b4e011b72b4] [github/master]
|
25
52
|
|
26
53
|
* .hgsigs:
|
27
54
|
Added signature for changeset 3fb74e2ce308
|
@@ -68,7 +95,7 @@
|
|
68
95
|
|
69
96
|
* .hgtags:
|
70
97
|
Added tag v0.3.0 for changeset 627526429d63
|
71
|
-
[9c054d0e96c0]
|
98
|
+
[9c054d0e96c0]
|
72
99
|
|
73
100
|
* .hgsigs:
|
74
101
|
Added signature for changeset 745c431bcc1b
|
@@ -269,14 +296,18 @@
|
|
269
296
|
* Automated merge with ssh://deveiate.org/Ruby-Mongrel2
|
270
297
|
[2da76acfb8db]
|
271
298
|
|
272
|
-
* History.rdoc:
|
273
|
-
Updating History
|
274
|
-
[3b013d4918c6]
|
275
|
-
|
276
299
|
* Rakefile:
|
277
300
|
Automated merge with ssh://deveiate.org/Ruby-Mongrel2
|
278
301
|
[e3908fd8e744]
|
279
302
|
|
303
|
+
* Rakefile:
|
304
|
+
Remove ChangeLog task, since hoe-deveiate already does it
|
305
|
+
[5f4982a32949]
|
306
|
+
|
307
|
+
* History.rdoc:
|
308
|
+
Updating History
|
309
|
+
[3b013d4918c6]
|
310
|
+
|
280
311
|
* .hgtags:
|
281
312
|
Added tag v0.1.1 for changeset 42da048fe158
|
282
313
|
[2489be2693d5]
|
@@ -293,10 +324,6 @@
|
|
293
324
|
Updated rbzmq dependency
|
294
325
|
[758fe465780e]
|
295
326
|
|
296
|
-
* Rakefile:
|
297
|
-
Remove ChangeLog task, since hoe-deveiate already does it
|
298
|
-
[5f4982a32949]
|
299
|
-
|
300
327
|
* .hgtags:
|
301
328
|
Added tag v0.1.0 for changeset 55c8f01c01c6
|
302
329
|
[39b509c68142]
|
@@ -338,6 +365,10 @@
|
|
338
365
|
Merged with 3659a56af8fb
|
339
366
|
[f2201728e874]
|
340
367
|
|
368
|
+
* .hgignore:
|
369
|
+
Ignoring packaging directory
|
370
|
+
[0613976b6735]
|
371
|
+
|
341
372
|
2011-09-12 Michael Granger <ged@FaerieMUD.org>
|
342
373
|
|
343
374
|
* README.rdoc:
|
@@ -406,12 +437,6 @@
|
|
406
437
|
procedures.
|
407
438
|
[19e0a72320dd]
|
408
439
|
|
409
|
-
2011-09-13 Michael Granger <ged@FaerieMUD.org>
|
410
|
-
|
411
|
-
* .hgignore:
|
412
|
-
Ignoring packaging directory
|
413
|
-
[0613976b6735]
|
414
|
-
|
415
440
|
2011-09-10 Michael Granger <ged@FaerieMUD.org>
|
416
441
|
|
417
442
|
* bin/m2sh.rb:
|
@@ -452,6 +477,18 @@
|
|
452
477
|
* Merged with 6ea60b67e106
|
453
478
|
[6d5341f30cc4]
|
454
479
|
|
480
|
+
* Manifest.txt:
|
481
|
+
Updating the manifest for the first release
|
482
|
+
[916a79570cdc]
|
483
|
+
|
484
|
+
* examples/helloworld-handler.rb, lib/mongrel2/handler.rb:
|
485
|
+
More Handler API docs.
|
486
|
+
[47427db9b4fb]
|
487
|
+
|
488
|
+
* lib/mongrel2/handler.rb:
|
489
|
+
Adding some Mongrel2::Handler API docs.
|
490
|
+
[da95bfdf83da]
|
491
|
+
|
455
492
|
* lib/mongrel2/config/host.rb:
|
456
493
|
Adding a many_to_one association for the server belonging to a
|
457
494
|
Mongrel2::Config::Host
|
@@ -471,18 +508,6 @@
|
|
471
508
|
Adding a proftools dump of the requestdumper app
|
472
509
|
[00cbc1b89a61]
|
473
510
|
|
474
|
-
* Manifest.txt:
|
475
|
-
Updating the manifest for the first release
|
476
|
-
[916a79570cdc]
|
477
|
-
|
478
|
-
* examples/helloworld-handler.rb, lib/mongrel2/handler.rb:
|
479
|
-
More Handler API docs.
|
480
|
-
[47427db9b4fb]
|
481
|
-
|
482
|
-
* lib/mongrel2/handler.rb:
|
483
|
-
Adding some Mongrel2::Handler API docs.
|
484
|
-
[da95bfdf83da]
|
485
|
-
|
486
511
|
2011-09-08 Michael Granger <ged@FaerieMUD.org>
|
487
512
|
|
488
513
|
* README.rdoc, lib/mongrel2.rb, lib/mongrel2/config.rb,
|
data/History.rdoc
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## v0.6.0 [2011-10-03] Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
Mongrel2::HTTPRequest enhancements.
|
4
|
+
- Added #body= for rewriting the entity body
|
5
|
+
- Added convenience methods for fetching the Content-type and Content-
|
6
|
+
encoding headers: #content_type, #content_encoding
|
7
|
+
- Switched the specs to use Mongrel2::RequestFactory for making
|
8
|
+
request objects
|
9
|
+
|
10
|
+
|
1
11
|
== v0.5.0 [2011-09-30] Michael Granger <ged@FaerieMUD.org>
|
2
12
|
|
3
13
|
Enhancements:
|
data/lib/mongrel2.rb
CHANGED
@@ -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.
|
17
|
+
VERSION = '0.6.0'
|
18
18
|
|
19
19
|
# Version-control revision constant
|
20
|
-
REVISION = %q$Revision:
|
20
|
+
REVISION = %q$Revision: c2ffa52b95e8 $
|
21
21
|
|
22
22
|
|
23
23
|
require 'mongrel2/logging'
|
data/lib/mongrel2/httprequest.rb
CHANGED
@@ -16,6 +16,10 @@ class Mongrel2::HTTPRequest < Mongrel2::Request
|
|
16
16
|
register_request_type( self, *HANDLED_HTTP_METHODS )
|
17
17
|
|
18
18
|
|
19
|
+
# Allow the entity body of the request to be modified
|
20
|
+
attr_writer :body
|
21
|
+
|
22
|
+
|
19
23
|
### Override the type of response returned by this request type.
|
20
24
|
def self::response_class
|
21
25
|
return Mongrel2::HTTPResponse
|
@@ -46,6 +50,19 @@ class Mongrel2::HTTPRequest < Mongrel2::Request
|
|
46
50
|
end
|
47
51
|
|
48
52
|
|
53
|
+
### Fetch the mimetype of the request's content, as set in its header.
|
54
|
+
def content_type
|
55
|
+
return self.headers.content_type
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
### Fetch the encoding type of the request's content, as set in its header.
|
60
|
+
def content_encoding
|
61
|
+
return self.headers.content_encoding
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
|
49
66
|
#########
|
50
67
|
protected
|
51
68
|
#########
|
@@ -27,11 +27,11 @@ describe Mongrel2::HTTPRequest do
|
|
27
27
|
|
28
28
|
before( :all ) do
|
29
29
|
setup_logging( :fatal )
|
30
|
+
@factory = Mongrel2::RequestFactory.new( route: '/glamour' )
|
30
31
|
end
|
31
32
|
|
32
33
|
before( :each ) do
|
33
|
-
|
34
|
-
@req = Mongrel2::HTTPRequest.new( TEST_UUID, 8817, '/test', headers, '' )
|
34
|
+
@req = @factory.get( '/glamour/test' )
|
35
35
|
end
|
36
36
|
|
37
37
|
after( :all ) do
|
@@ -78,5 +78,30 @@ describe Mongrel2::HTTPRequest do
|
|
78
78
|
@req.should be_keepalive()
|
79
79
|
end
|
80
80
|
|
81
|
+
it "allows the request body to be rewritten" do
|
82
|
+
@req.body = 'something else'
|
83
|
+
@req.body.should == 'something else'
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
describe "header convenience methods" do
|
88
|
+
|
89
|
+
before( :each ) do
|
90
|
+
@req.headers.merge!(
|
91
|
+
'Content-type' => 'application/x-pdf',
|
92
|
+
'Content-encoding' => 'gzip'
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
it "provides a convenience method for fetching the 'Content-type' header" do
|
97
|
+
@req.content_type.should == 'application/x-pdf'
|
98
|
+
end
|
99
|
+
|
100
|
+
it "provides a convenience method for fetching the 'Content-encoding' header" do
|
101
|
+
@req.content_encoding.should == 'gzip'
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
81
106
|
end
|
82
107
|
|
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.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -48,11 +48,11 @@ cert_chain:
|
|
48
48
|
-----END CERTIFICATE-----
|
49
49
|
|
50
50
|
'
|
51
|
-
date: 2011-
|
51
|
+
date: 2011-10-03 00:00:00.000000000Z
|
52
52
|
dependencies:
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: nokogiri
|
55
|
-
requirement: &
|
55
|
+
requirement: &70332659324060 !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: *
|
63
|
+
version_requirements: *70332659324060
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: sequel
|
66
|
-
requirement: &
|
66
|
+
requirement: &70332659323600 !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: *
|
74
|
+
version_requirements: *70332659323600
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: amalgalite
|
77
|
-
requirement: &
|
77
|
+
requirement: &70332659323100 !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: *
|
85
|
+
version_requirements: *70332659323100
|
86
86
|
- !ruby/object:Gem::Dependency
|
87
87
|
name: tnetstring
|
88
|
-
requirement: &
|
88
|
+
requirement: &70332659322480 !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: *
|
96
|
+
version_requirements: *70332659322480
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: yajl-ruby
|
99
|
-
requirement: &
|
99
|
+
requirement: &70332659322040 !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: *
|
107
|
+
version_requirements: *70332659322040
|
108
108
|
- !ruby/object:Gem::Dependency
|
109
109
|
name: zmq
|
110
|
-
requirement: &
|
110
|
+
requirement: &70332659321520 !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: *
|
118
|
+
version_requirements: *70332659321520
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
120
|
name: hoe-mercurial
|
121
|
-
requirement: &
|
121
|
+
requirement: &70332659321000 !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
124
124
|
- - ~>
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 1.3.
|
126
|
+
version: 1.3.1
|
127
127
|
type: :development
|
128
128
|
prerelease: false
|
129
|
-
version_requirements: *
|
129
|
+
version_requirements: *70332659321000
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: hoe-highline
|
132
|
-
requirement: &
|
132
|
+
requirement: &70332659320420 !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: *
|
140
|
+
version_requirements: *70332659320420
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: configurability
|
143
|
-
requirement: &
|
143
|
+
requirement: &70332659319940 !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: *
|
151
|
+
version_requirements: *70332659319940
|
152
152
|
- !ruby/object:Gem::Dependency
|
153
153
|
name: rspec
|
154
|
-
requirement: &
|
154
|
+
requirement: &70332659319500 !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: *
|
162
|
+
version_requirements: *70332659319500
|
163
163
|
- !ruby/object:Gem::Dependency
|
164
164
|
name: hoe
|
165
|
-
requirement: &
|
165
|
+
requirement: &70332659318960 !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: *
|
173
|
+
version_requirements: *70332659318960
|
174
174
|
description: ! "Ruby-Mongrel2 is a complete Ruby (1.9-only) connector for \nMongrel2[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,
|
metadata.gz.sig
CHANGED
Binary file
|