mongrel2 0.49.0 → 0.50.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +77 -2
- data/History.rdoc +7 -0
- data/Rakefile +1 -1
- data/lib/mongrel2.rb +2 -2
- data/lib/mongrel2/config.rb +1 -13
- data/lib/mongrel2/handler.rb +17 -13
- data/spec/mongrel2/handler_spec.rb +5 -0
- metadata +28 -33
- metadata.gz.sig +1 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7578443cf1e0162babc6ea4010691f6c3ab10984
|
4
|
+
data.tar.gz: 6e7268702b1f8c3e2838c122a4e744f2330ebf06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9be1e69de5c7d0cea4b2b623fdd1e9d4ad22b3325bf959f38ae394494e6b5413194fc98b915e3de613438d22b7c30514a0f5bd2a59366db391efa57bb85e4cf
|
7
|
+
data.tar.gz: 3cc4b31fe1627d3745f7255b7ecc7245c72c370c3175cf697d6958f2d00ebd98f8976247fe22fe8e92114d7483be9ca79248854fbb44013b6f7835711c499bb2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,8 +1,83 @@
|
|
1
|
+
2017-05-03 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
* lib/mongrel2/handler.rb, spec/mongrel2/handler_spec.rb:
|
4
|
+
Defer instantation of the self-pipe to startup
|
5
|
+
|
6
|
+
This makes it easier to test instances of handlers, as it eliminates
|
7
|
+
the socket binding/connection.
|
8
|
+
[80a7c403b50b] [tip]
|
9
|
+
|
10
|
+
2017-04-24 Michael Granger <ged@FaerieMUD.org>
|
11
|
+
|
12
|
+
* History.rdoc, lib/mongrel2.rb, mongrel2.gemspec:
|
13
|
+
Bump the minor version, update history.
|
14
|
+
[53828961c096]
|
15
|
+
|
16
|
+
* Rakefile, lib/mongrel2/config.rb:
|
17
|
+
Fix issues with Sequel 4.45+
|
18
|
+
[61c5c2d2efab]
|
19
|
+
|
20
|
+
2017-03-10 Michael Granger <ged@FaerieMUD.org>
|
21
|
+
|
22
|
+
* .hoerc:
|
23
|
+
Remove the stuff specific to my env from the local Hoe config
|
24
|
+
[b443b14fa775]
|
25
|
+
|
26
|
+
* .hgtags:
|
27
|
+
Added tag v0.49.0 for changeset 711330349e6f
|
28
|
+
[e3b072a13f19]
|
29
|
+
|
30
|
+
* .hgsigs:
|
31
|
+
Added signature for changeset e2508eadb52d
|
32
|
+
[711330349e6f] [v0.49.0]
|
33
|
+
|
34
|
+
* History.rdoc, Manifest.txt, lib/mongrel2.rb, mongrel2.gemspec:
|
35
|
+
Bump the minor version, update history and the manifest.
|
36
|
+
[e2508eadb52d]
|
37
|
+
|
38
|
+
* .gems, Rakefile, lib/mongrel2.rb:
|
39
|
+
Merged with d51c321fbd83
|
40
|
+
[4cc7ff9f8f34]
|
41
|
+
|
42
|
+
2017-02-08 Michael Granger <ged@FaerieMUD.org>
|
43
|
+
|
44
|
+
* .gems, .hoerc, Manifest.txt, README.rdoc, Rakefile,
|
45
|
+
data/mongrel2/bootstrap.html, data/mongrel2/config.rb.in,
|
46
|
+
data/mongrel2/css/master.css, data/mongrel2/index.html.in,
|
47
|
+
data/mongrel2/js/websock-test.js, data/mongrel2/websock-test.html,
|
48
|
+
examples/.env, examples/config.rb, examples/public/bootstrap.html,
|
49
|
+
examples/public/config.rb.in, examples/public/css/master.css,
|
50
|
+
examples/public/index.html.in, examples/public/js/websock-test.js,
|
51
|
+
examples/public/websock-test.html, examples/request-dumper.rb,
|
52
|
+
examples/request-dumper.tmpl, lib/mongrel2.rb,
|
53
|
+
lib/mongrel2/connection.rb, lib/mongrel2/control.rb,
|
54
|
+
lib/mongrel2/handler.rb, mongrel2.gemspec,
|
55
|
+
spec/mongrel2/connection_spec.rb, spec/mongrel2/control_spec.rb,
|
56
|
+
spec/mongrel2/handler_spec.rb:
|
57
|
+
Convert to CZTop for zmq
|
58
|
+
[87368e83086b]
|
59
|
+
|
60
|
+
2017-01-16 Mahlon E. Smith <mahlon@laika.com>
|
61
|
+
|
62
|
+
* .hgtags:
|
63
|
+
Added tag v0.48.0 for changeset cd462070f981
|
64
|
+
[d51c321fbd83]
|
65
|
+
|
66
|
+
* .hgsigs:
|
67
|
+
Added signature for changeset 50bb8c488bc4
|
68
|
+
[cd462070f981] [v0.48.0]
|
69
|
+
|
70
|
+
2017-01-16 Mahlon E. Smith <mahlon@martini.nu>
|
71
|
+
|
72
|
+
* .gems, History.rdoc, Rakefile, lib/mongrel2.rb:
|
73
|
+
Bump Configurability dependency.
|
74
|
+
[50bb8c488bc4]
|
75
|
+
|
1
76
|
2016-11-23 Mahlon E. Smith <mahlon@martini.nu>
|
2
77
|
|
3
78
|
* .hgtags:
|
4
79
|
Added tag v0.47.0 for changeset 3298fb41de78
|
5
|
-
[b01f4b4e8c2f]
|
80
|
+
[b01f4b4e8c2f]
|
6
81
|
|
7
82
|
* .hgsigs:
|
8
83
|
Added signature for changeset c4ae80fe8067
|
@@ -21,7 +96,7 @@
|
|
21
96
|
|
22
97
|
* .hgtags:
|
23
98
|
Added tag v0.46.0 for changeset e7c165fb6bb2
|
24
|
-
[7f3c8162e5ef]
|
99
|
+
[7f3c8162e5ef]
|
25
100
|
|
26
101
|
* .hgsigs:
|
27
102
|
Added signature for changeset a28294965462
|
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -28,7 +28,7 @@ hoespec = Hoe.spec 'mongrel2' do
|
|
28
28
|
self.dependency 'cztop', '~> 0.11'
|
29
29
|
self.dependency 'libxml-ruby', '~> 2.7'
|
30
30
|
self.dependency 'loggability', '~> 0.12'
|
31
|
-
self.dependency 'sequel', '~> 4.
|
31
|
+
self.dependency 'sequel', '~> 4.45'
|
32
32
|
self.dependency 'sqlite3', '~> 1.3'
|
33
33
|
self.dependency 'sysexits', '~> 1.1'
|
34
34
|
self.dependency 'tnetstring', '~> 0.3'
|
data/lib/mongrel2.rb
CHANGED
@@ -22,10 +22,10 @@ module Mongrel2
|
|
22
22
|
abort "\n\n>>> Mongrel2 requires Ruby 2.2 or later. <<<\n\n" if RUBY_VERSION < '2.2.0'
|
23
23
|
|
24
24
|
# Library version constant
|
25
|
-
VERSION = '0.
|
25
|
+
VERSION = '0.50.0'
|
26
26
|
|
27
27
|
# Version-control revision constant
|
28
|
-
REVISION = %q$Revision:
|
28
|
+
REVISION = %q$Revision: 53828961c096 $
|
29
29
|
|
30
30
|
|
31
31
|
require 'mongrel2/constants'
|
data/lib/mongrel2/config.rb
CHANGED
@@ -259,19 +259,7 @@ module Mongrel2
|
|
259
259
|
|
260
260
|
### Factory method that creates subclasses of Mongrel2::Config.
|
261
261
|
def self::Config( source )
|
262
|
-
|
263
|
-
anonclass = nil
|
264
|
-
if source.is_a?( Sequel::Database )
|
265
|
-
anonclass = Class.new( Mongrel2::Config )
|
266
|
-
anonclass.db = source
|
267
|
-
else
|
268
|
-
anonclass = Class.new( Mongrel2::Config ).set_dataset( source )
|
269
|
-
end
|
270
|
-
|
271
|
-
Sequel::Model::ANONYMOUS_MODEL_CLASSES[ source ] = anonclass
|
272
|
-
end
|
273
|
-
|
274
|
-
return Sequel::Model::ANONYMOUS_MODEL_CLASSES[ source ]
|
262
|
+
return Mongrel2::Config.Model( source )
|
275
263
|
end
|
276
264
|
|
277
265
|
require 'mongrel2/config/directory'
|
data/lib/mongrel2/handler.rb
CHANGED
@@ -136,15 +136,11 @@ class Mongrel2::Handler
|
|
136
136
|
### and +recv_spec+.
|
137
137
|
def initialize( app_id, send_spec, recv_spec ) # :notnew:
|
138
138
|
@app_id = app_id
|
139
|
-
@conn = Mongrel2::Connection.new( app_id, send_spec, recv_spec )
|
140
|
-
# @self_pipe = CZTop::Socket::PAIR.new( 'inproc://signal-handler' )
|
141
139
|
|
142
|
-
@
|
143
|
-
reader: CZTop::Socket::PAIR.new( '@inproc://signal-handler' ),
|
144
|
-
writer: CZTop::Socket::PAIR.new( '>inproc://signal-handler' )
|
145
|
-
}
|
140
|
+
@conn = Mongrel2::Connection.new( app_id, send_spec, recv_spec )
|
146
141
|
|
147
|
-
@
|
142
|
+
@self_pipe = nil
|
143
|
+
@poller = nil
|
148
144
|
|
149
145
|
Thread.main[:signal_queue] = []
|
150
146
|
end
|
@@ -165,6 +161,13 @@ class Mongrel2::Handler
|
|
165
161
|
def run
|
166
162
|
self.log.info "Starting up %p" % [ self ]
|
167
163
|
|
164
|
+
@self_pipe = {
|
165
|
+
reader: CZTop::Socket::PAIR.new( '@inproc://signal-handler' ),
|
166
|
+
writer: CZTop::Socket::PAIR.new( '>inproc://signal-handler' )
|
167
|
+
}
|
168
|
+
|
169
|
+
@poller = CZTop::Poller.new( @conn.request_sock, @self_pipe[:reader] )
|
170
|
+
|
168
171
|
self.set_signal_handlers
|
169
172
|
self.start_accepting_requests
|
170
173
|
|
@@ -172,7 +175,7 @@ class Mongrel2::Handler
|
|
172
175
|
ensure
|
173
176
|
self.restore_signal_handlers
|
174
177
|
self.log.info "Done: %p" % [ self ]
|
175
|
-
@conn.close
|
178
|
+
@conn.close if @conn
|
176
179
|
end
|
177
180
|
|
178
181
|
|
@@ -228,13 +231,14 @@ class Mongrel2::Handler
|
|
228
231
|
### database connections, flush caches, or other restart-ey stuff.
|
229
232
|
def restart
|
230
233
|
self.log.info "Restarting"
|
231
|
-
old_conn = @conn
|
232
|
-
|
234
|
+
if (( old_conn = @conn ))
|
235
|
+
@conn = @conn.dup
|
233
236
|
|
234
|
-
|
237
|
+
@poller = CZTop::Poller.new( @conn.request_sock, @self_pipe[:reader] )
|
235
238
|
|
236
|
-
|
237
|
-
|
239
|
+
self.log.debug " conn %p -> %p" % [ old_conn, @conn ]
|
240
|
+
old_conn.close
|
241
|
+
end
|
238
242
|
end
|
239
243
|
|
240
244
|
|
@@ -310,8 +310,13 @@ describe Mongrel2::Handler, :db do
|
|
310
310
|
|
311
311
|
it "re-establishes its connection when told to restart" do
|
312
312
|
res = OneShotHandler.new( TEST_UUID, TEST_SEND_SPEC, TEST_RECV_SPEC )
|
313
|
+
pipe_reader = instance_double( CZTop::Socket::PAIR )
|
314
|
+
pipe_writer = instance_double( CZTop::Socket::PAIR )
|
315
|
+
res.instance_variable_set( :@self_pipe, {reader: pipe_reader, writer: pipe_writer} )
|
316
|
+
|
313
317
|
original_conn = res.conn
|
314
318
|
res.restart
|
319
|
+
|
315
320
|
expect( res.conn ).to_not equal( original_conn )
|
316
321
|
end
|
317
322
|
|
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.50.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -10,32 +10,27 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
DMOr26DBv+qLJRRC/2h34uX71q5QgeOyxvMg+7V3u/Q06DXyQ2VgeeqiwDFFpEH0
|
33
|
-
PFkdPO6ZqbTRcLfNH7mFgCBJjsfSjJrn0sPBlYyOXgCoByfZnZyrIMH/UY+lgQqS
|
34
|
-
6Von1VDsfQm0eJh5zYZD64ZF86phSR7mUX3mXItwH04HrZwkWpvgd871DZVR3i1n
|
35
|
-
w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pz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9wbkcmi1D2Sv9deppFvZ+pXyR+eq
|
27
|
+
qy/efw4F+3DAPw+9QNlPJG8DHQ8HrYPrf7wv5DPBpyKLD1atMGnoDb5gijIx5IMR
|
28
|
+
MxiffPYQsT7Noimqaz8KWqP1keDY9aqVKe3iDXUXKBV27sl9GhOt5jJ3rVW9ihok
|
29
|
+
KiEoBnrgQcZIEAOwfXbWT4IaIcOCgD+JloEesuHL72/3zP/vOcqZf4SOcne4+qti
|
30
|
+
DHE5pl144V24tqxZb65WTup/ov22SCXmpU8/wTeZVL3rePGRfwTJNpm+6iYszl7A
|
31
|
+
SixmX0X3SOeYg4FRkblUIA==
|
37
32
|
-----END CERTIFICATE-----
|
38
|
-
date: 2017-
|
33
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
39
34
|
dependencies:
|
40
35
|
- !ruby/object:Gem::Dependency
|
41
36
|
name: cztop
|
@@ -85,14 +80,14 @@ dependencies:
|
|
85
80
|
requirements:
|
86
81
|
- - "~>"
|
87
82
|
- !ruby/object:Gem::Version
|
88
|
-
version: '4.
|
83
|
+
version: '4.45'
|
89
84
|
type: :runtime
|
90
85
|
prerelease: false
|
91
86
|
version_requirements: !ruby/object:Gem::Requirement
|
92
87
|
requirements:
|
93
88
|
- - "~>"
|
94
89
|
- !ruby/object:Gem::Version
|
95
|
-
version: '4.
|
90
|
+
version: '4.45'
|
96
91
|
- !ruby/object:Gem::Dependency
|
97
92
|
name: sqlite3
|
98
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,14 +178,14 @@ dependencies:
|
|
183
178
|
requirements:
|
184
179
|
- - "~>"
|
185
180
|
- !ruby/object:Gem::Version
|
186
|
-
version: '0.
|
181
|
+
version: '0.9'
|
187
182
|
type: :development
|
188
183
|
prerelease: false
|
189
184
|
version_requirements: !ruby/object:Gem::Requirement
|
190
185
|
requirements:
|
191
186
|
- - "~>"
|
192
187
|
- !ruby/object:Gem::Version
|
193
|
-
version: '0.
|
188
|
+
version: '0.9'
|
194
189
|
- !ruby/object:Gem::Dependency
|
195
190
|
name: hoe-highline
|
196
191
|
requirement: !ruby/object:Gem::Requirement
|
@@ -281,14 +276,14 @@ dependencies:
|
|
281
276
|
requirements:
|
282
277
|
- - "~>"
|
283
278
|
- !ruby/object:Gem::Version
|
284
|
-
version: '3.
|
279
|
+
version: '3.16'
|
285
280
|
type: :development
|
286
281
|
prerelease: false
|
287
282
|
version_requirements: !ruby/object:Gem::Requirement
|
288
283
|
requirements:
|
289
284
|
- - "~>"
|
290
285
|
- !ruby/object:Gem::Version
|
291
|
-
version: '3.
|
286
|
+
version: '3.16'
|
292
287
|
description: |-
|
293
288
|
Ruby-Mongrel2 is a complete Ruby connector for Mongrel2[http://mongrel2.org/].
|
294
289
|
|
@@ -398,7 +393,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
398
393
|
version: '0'
|
399
394
|
requirements: []
|
400
395
|
rubyforge_project:
|
401
|
-
rubygems_version: 2.
|
396
|
+
rubygems_version: 2.5.2
|
402
397
|
signing_key:
|
403
398
|
specification_version: 4
|
404
399
|
summary: Ruby-Mongrel2 is a complete Ruby connector for Mongrel2[http://mongrel2.org/]
|
metadata.gz.sig
CHANGED
@@ -1,4 +1 @@
|
|
1
|
-
|
2
|
-
C��
|
3
|
-
}���S�۠1���T!�YV�^����[������||�hi��Fߺ�B��䲯9k݆���]�ķ����Y�=���
|
4
|
-
O������ָ��ZD��Z�f��1�F��I^�yPq�U�ѐ��������F��~?2�i�¡�9
|
1
|
+
>������ .��^uK�L�VIT��l��Г����]~�C�&b%�Q�5���1�'e�5�����|{�g\H��.�D"赉8��?|����� �>|n�ߑJ^�й����\�u+�.p��Ϋ��-d����F'����G7C��P��#FZO����{�����X4�um$L��l_<I��>=��l��A1"�̓����⍤0ȥ>��SQ�2�v�]�-��N�!�M��,�
|