mongrel2 0.18.0 → 0.19.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 +92 -2
- data/History.rdoc +5 -0
- data/lib/mongrel2.rb +2 -2
- data/lib/mongrel2/httpresponse.rb +3 -5
- data/spec/mongrel2/httpresponse_spec.rb +9 -0
- metadata +34 -34
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,3 +1,93 @@
|
|
1
|
+
2012-03-28 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
* lib/mongrel2/httpresponse.rb, spec/mongrel2/httpresponse_spec.rb:
|
4
|
+
Make HTTPResponse default to a 200 status if there's a body.
|
5
|
+
|
6
|
+
If there's a body, and the status hasn't yet been set, assume that
|
7
|
+
it's supposed to be 200 OK. If the body is nil or empty and the
|
8
|
+
status hasn't been set, assume it's a 204 No content.
|
9
|
+
[f1c2834b6d59] [tip]
|
10
|
+
|
11
|
+
* .hgtags:
|
12
|
+
Added tag v0.18.0 for changeset 4624c640343e
|
13
|
+
[a800fe3db4b1]
|
14
|
+
|
15
|
+
* .hgsigs:
|
16
|
+
Added signature for changeset 1d4e3af69f25
|
17
|
+
[4624c640343e] [v0.18.0]
|
18
|
+
|
19
|
+
* History.rdoc, lib/mongrel2.rb:
|
20
|
+
Bump the minor version, update history.
|
21
|
+
[1d4e3af69f25]
|
22
|
+
|
23
|
+
* lib/mongrel2/config/host.rb:
|
24
|
+
Make the 'handler' DSL directive replace any existing handler with
|
25
|
+
its send_ident.
|
26
|
+
[2b625f2615a1]
|
27
|
+
|
28
|
+
* lib/mongrel2/config/handler.rb,
|
29
|
+
spec/mongrel2/config/handler_spec.rb:
|
30
|
+
Add a validation to ensure that handler configs have unique
|
31
|
+
send/recv specs and IDs.
|
32
|
+
[93f7ad7c43f7]
|
33
|
+
|
34
|
+
2012-03-18 Michael Granger <ged@FaerieMUD.org>
|
35
|
+
|
36
|
+
* .hgtags:
|
37
|
+
Added tag v0.17.0 for changeset 525f7288759e
|
38
|
+
[95d268db56c0]
|
39
|
+
|
40
|
+
* .hgsigs:
|
41
|
+
Added signature for changeset 023114cc92af
|
42
|
+
[525f7288759e] [v0.17.0]
|
43
|
+
|
44
|
+
* History.rdoc, lib/mongrel2.rb:
|
45
|
+
Bump minor version, update history.
|
46
|
+
[023114cc92af]
|
47
|
+
|
48
|
+
2012-03-10 Michael Granger <ged@FaerieMUD.org>
|
49
|
+
|
50
|
+
* lib/mongrel2/config.rb:
|
51
|
+
Squelch logging of expected SQL errors.
|
52
|
+
|
53
|
+
Errors are normal during Mongrel2::Config.db= and
|
54
|
+
.database_initialized?, so add a new .without_sql_logging method for
|
55
|
+
temporarily disabling SQL logging, and wrap that around the methods
|
56
|
+
in quesion.
|
57
|
+
[6b62343b4e5a]
|
58
|
+
|
59
|
+
* .rvm.gems, Rakefile:
|
60
|
+
Add simplecov to dev dependencies
|
61
|
+
[437f797ea469]
|
62
|
+
|
63
|
+
* lib/mongrel2/websocket.rb:
|
64
|
+
Fix documentation for WebSocket#validate_control_frame
|
65
|
+
[195e8f3a0be9]
|
66
|
+
|
67
|
+
* .hgtags:
|
68
|
+
Added tag v0.16.0 for changeset 7d02d330c25c
|
69
|
+
[7345807a6db7]
|
70
|
+
|
71
|
+
* .hgsigs:
|
72
|
+
Added signature for changeset 4fc45a463af8
|
73
|
+
[7d02d330c25c] [v0.16.0]
|
74
|
+
|
75
|
+
* History.rdoc, Manifest.txt, lib/mongrel2.rb:
|
76
|
+
Update history, manifest, and bump minor version.
|
77
|
+
[4fc45a463af8]
|
78
|
+
|
79
|
+
* lib/mongrel2/config/server.rb:
|
80
|
+
Fix missing constant bug in the Server config class
|
81
|
+
[88460d4d7ada]
|
82
|
+
|
83
|
+
* bin/m2sh.rb:
|
84
|
+
Close the control socket after using it in m2sh.rb
|
85
|
+
[6d7262ef2a91]
|
86
|
+
|
87
|
+
* examples/config.rb:
|
88
|
+
Oops, no trailing $ in the ws route in the examples config
|
89
|
+
[17522b5d958a]
|
90
|
+
|
1
91
|
2012-03-07 Michael Granger <ged@FaerieMUD.org>
|
2
92
|
|
3
93
|
* README.rdoc, data/mongrel2/bootstrap.html,
|
@@ -12,7 +102,7 @@
|
|
12
102
|
backend.
|
13
103
|
- Fixed issues with encoding of incoming frame payloads.
|
14
104
|
- Added frame validation methods
|
15
|
-
[fea3cd02d23c]
|
105
|
+
[fea3cd02d23c]
|
16
106
|
|
17
107
|
2012-03-05 Michael Granger <ged@FaerieMUD.org>
|
18
108
|
|
@@ -24,7 +114,7 @@
|
|
24
114
|
spec/mongrel2/httprequest_spec.rb, spec/mongrel2/request_spec.rb,
|
25
115
|
spec/mongrel2/websocket_spec.rb:
|
26
116
|
Adding WebSocket (RFC6455) support
|
27
|
-
[0db6f3808f5a]
|
117
|
+
[0db6f3808f5a] [github/master]
|
28
118
|
|
29
119
|
2012-03-02 Michael Granger <ged@FaerieMUD.org>
|
30
120
|
|
data/History.rdoc
CHANGED
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.19.0'
|
18
18
|
|
19
19
|
# Version-control revision constant
|
20
|
-
REVISION = %q$Revision:
|
20
|
+
REVISION = %q$Revision: a0a3115eb782 $
|
21
21
|
|
22
22
|
|
23
23
|
require 'mongrel2/logging'
|
@@ -16,9 +16,6 @@ class Mongrel2::HTTPResponse < Mongrel2::Response
|
|
16
16
|
# The format for building valid HTTP responses
|
17
17
|
STATUS_LINE_FORMAT = "HTTP/1.1 %03d %s".freeze
|
18
18
|
|
19
|
-
# The default status
|
20
|
-
DEFAULT_HTTP_STATUS = 204
|
21
|
-
|
22
19
|
# A network End-Of-Line
|
23
20
|
EOL = "\r\n".freeze
|
24
21
|
|
@@ -67,9 +64,10 @@ class Mongrel2::HTTPResponse < Mongrel2::Response
|
|
67
64
|
|
68
65
|
### Send the response status to the client
|
69
66
|
def status_line
|
70
|
-
self.log.
|
67
|
+
self.log.debug "Building status line for status: %p" % [ self.status ]
|
71
68
|
|
72
|
-
st = self.status ||
|
69
|
+
st = self.status ||
|
70
|
+
((self.body.nil? || self.body.empty?) ? HTTP::NO_CONTENT : HTTP::OK)
|
73
71
|
return STATUS_LINE_FORMAT % [ st, HTTP::STATUS_NAME[st] ]
|
74
72
|
end
|
75
73
|
|
@@ -98,6 +98,15 @@ describe Mongrel2::HTTPResponse do
|
|
98
98
|
@response.headers.should have(1).keys
|
99
99
|
end
|
100
100
|
|
101
|
+
it "sets its status line to 200 OK if the body is set and the status hasn't yet been set" do
|
102
|
+
@response << "Some stuff"
|
103
|
+
@response.status_line.should == 'HTTP/1.1 200 OK'
|
104
|
+
end
|
105
|
+
|
106
|
+
it "sets its status line to 204 No Content if the body is set and the status hasn't yet been set" do
|
107
|
+
@response.status_line.should == 'HTTP/1.1 204 No Content'
|
108
|
+
end
|
109
|
+
|
101
110
|
it "can find the length of its body if it's a String" do
|
102
111
|
test_body = 'A string full of stuff'
|
103
112
|
@response.body = test_body
|
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.19.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -40,7 +40,7 @@ date: 2012-03-28 00:00:00.000000000 Z
|
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
|
-
requirement: &
|
43
|
+
requirement: &70214632899820 !ruby/object:Gem::Requirement
|
44
44
|
none: false
|
45
45
|
requirements:
|
46
46
|
- - ~>
|
@@ -48,10 +48,10 @@ dependencies:
|
|
48
48
|
version: '1.5'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
|
-
version_requirements: *
|
51
|
+
version_requirements: *70214632899820
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
53
|
name: sequel
|
54
|
-
requirement: &
|
54
|
+
requirement: &70214632897680 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
57
|
- - ~>
|
@@ -59,10 +59,10 @@ dependencies:
|
|
59
59
|
version: '3.31'
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
|
-
version_requirements: *
|
62
|
+
version_requirements: *70214632897680
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: amalgalite
|
65
|
-
requirement: &
|
65
|
+
requirement: &70214632896600 !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
68
|
- - ~>
|
@@ -70,10 +70,10 @@ dependencies:
|
|
70
70
|
version: '1.1'
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
|
-
version_requirements: *
|
73
|
+
version_requirements: *70214632896600
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
75
|
name: tnetstring
|
76
|
-
requirement: &
|
76
|
+
requirement: &70214632895520 !ruby/object:Gem::Requirement
|
77
77
|
none: false
|
78
78
|
requirements:
|
79
79
|
- - ~>
|
@@ -81,10 +81,10 @@ dependencies:
|
|
81
81
|
version: '0.3'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
|
-
version_requirements: *
|
84
|
+
version_requirements: *70214632895520
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: yajl-ruby
|
87
|
-
requirement: &
|
87
|
+
requirement: &70214625392560 !ruby/object:Gem::Requirement
|
88
88
|
none: false
|
89
89
|
requirements:
|
90
90
|
- - ~>
|
@@ -92,10 +92,10 @@ dependencies:
|
|
92
92
|
version: '1.0'
|
93
93
|
type: :runtime
|
94
94
|
prerelease: false
|
95
|
-
version_requirements: *
|
95
|
+
version_requirements: *70214625392560
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: trollop
|
98
|
-
requirement: &
|
98
|
+
requirement: &70214625390540 !ruby/object:Gem::Requirement
|
99
99
|
none: false
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
@@ -103,10 +103,10 @@ dependencies:
|
|
103
103
|
version: '1.16'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
|
-
version_requirements: *
|
106
|
+
version_requirements: *70214625390540
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
108
|
name: sysexits
|
109
|
-
requirement: &
|
109
|
+
requirement: &70214625388540 !ruby/object:Gem::Requirement
|
110
110
|
none: false
|
111
111
|
requirements:
|
112
112
|
- - ~>
|
@@ -114,10 +114,10 @@ dependencies:
|
|
114
114
|
version: '1.0'
|
115
115
|
type: :runtime
|
116
116
|
prerelease: false
|
117
|
-
version_requirements: *
|
117
|
+
version_requirements: *70214625388540
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: zmq
|
120
|
-
requirement: &
|
120
|
+
requirement: &70214625385800 !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
123
123
|
- - ~>
|
@@ -125,10 +125,10 @@ dependencies:
|
|
125
125
|
version: 2.1.4
|
126
126
|
type: :runtime
|
127
127
|
prerelease: false
|
128
|
-
version_requirements: *
|
128
|
+
version_requirements: *70214625385800
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: hoe-mercurial
|
131
|
-
requirement: &
|
131
|
+
requirement: &70214625406480 !ruby/object:Gem::Requirement
|
132
132
|
none: false
|
133
133
|
requirements:
|
134
134
|
- - ~>
|
@@ -136,10 +136,10 @@ dependencies:
|
|
136
136
|
version: 1.3.1
|
137
137
|
type: :development
|
138
138
|
prerelease: false
|
139
|
-
version_requirements: *
|
139
|
+
version_requirements: *70214625406480
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: hoe-highline
|
142
|
-
requirement: &
|
142
|
+
requirement: &70214625403620 !ruby/object:Gem::Requirement
|
143
143
|
none: false
|
144
144
|
requirements:
|
145
145
|
- - ~>
|
@@ -147,10 +147,10 @@ dependencies:
|
|
147
147
|
version: 0.0.1
|
148
148
|
type: :development
|
149
149
|
prerelease: false
|
150
|
-
version_requirements: *
|
150
|
+
version_requirements: *70214625403620
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
152
|
name: configurability
|
153
|
-
requirement: &
|
153
|
+
requirement: &70214625401920 !ruby/object:Gem::Requirement
|
154
154
|
none: false
|
155
155
|
requirements:
|
156
156
|
- - ~>
|
@@ -158,10 +158,10 @@ dependencies:
|
|
158
158
|
version: '1.0'
|
159
159
|
type: :development
|
160
160
|
prerelease: false
|
161
|
-
version_requirements: *
|
161
|
+
version_requirements: *70214625401920
|
162
162
|
- !ruby/object:Gem::Dependency
|
163
163
|
name: simplecov
|
164
|
-
requirement: &
|
164
|
+
requirement: &70214625399640 !ruby/object:Gem::Requirement
|
165
165
|
none: false
|
166
166
|
requirements:
|
167
167
|
- - ~>
|
@@ -169,10 +169,10 @@ dependencies:
|
|
169
169
|
version: '0.6'
|
170
170
|
type: :development
|
171
171
|
prerelease: false
|
172
|
-
version_requirements: *
|
172
|
+
version_requirements: *70214625399640
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: rspec
|
175
|
-
requirement: &
|
175
|
+
requirement: &70214625418940 !ruby/object:Gem::Requirement
|
176
176
|
none: false
|
177
177
|
requirements:
|
178
178
|
- - ~>
|
@@ -180,10 +180,10 @@ dependencies:
|
|
180
180
|
version: '2.8'
|
181
181
|
type: :development
|
182
182
|
prerelease: false
|
183
|
-
version_requirements: *
|
183
|
+
version_requirements: *70214625418940
|
184
184
|
- !ruby/object:Gem::Dependency
|
185
185
|
name: rdoc
|
186
|
-
requirement: &
|
186
|
+
requirement: &70214625418020 !ruby/object:Gem::Requirement
|
187
187
|
none: false
|
188
188
|
requirements:
|
189
189
|
- - ~>
|
@@ -191,18 +191,18 @@ dependencies:
|
|
191
191
|
version: '3.10'
|
192
192
|
type: :development
|
193
193
|
prerelease: false
|
194
|
-
version_requirements: *
|
194
|
+
version_requirements: *70214625418020
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: hoe
|
197
|
-
requirement: &
|
197
|
+
requirement: &70214625417200 !ruby/object:Gem::Requirement
|
198
198
|
none: false
|
199
199
|
requirements:
|
200
200
|
- - ~>
|
201
201
|
- !ruby/object:Gem::Version
|
202
|
-
version: '2.
|
202
|
+
version: '2.13'
|
203
203
|
type: :development
|
204
204
|
prerelease: false
|
205
|
-
version_requirements: *
|
205
|
+
version_requirements: *70214625417200
|
206
206
|
description: ! 'Ruby-Mongrel2 is a complete Ruby (1.9-only) connector for
|
207
207
|
|
208
208
|
Mongrel2[http://mongrel2.org/].
|
@@ -221,11 +221,11 @@ executables:
|
|
221
221
|
- m2sh.rb
|
222
222
|
extensions: []
|
223
223
|
extra_rdoc_files:
|
224
|
+
- Manifest.txt
|
225
|
+
- examples/README.txt
|
224
226
|
- DSL.rdoc
|
225
227
|
- History.rdoc
|
226
|
-
- Manifest.txt
|
227
228
|
- README.rdoc
|
228
|
-
- examples/README.txt
|
229
229
|
files:
|
230
230
|
- .autotest
|
231
231
|
- .gemtest
|
metadata.gz.sig
CHANGED
Binary file
|