m2r 2.1.0.pre → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -8
- data/CHANGELOG.md +10 -0
- data/lib/m2r/connection.rb +0 -2
- data/lib/m2r/connection_factory.rb +0 -1
- data/lib/m2r/handler.rb +0 -2
- data/lib/m2r/request.rb +0 -1
- data/lib/m2r/response.rb +0 -1
- data/lib/m2r/response/content_length.rb +0 -2
- data/lib/m2r/response/to_request.rb +0 -2
- data/lib/m2r/version.rb +1 -1
- data/test/support/mongrel_helper.rb +13 -19
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eefcb7c87224158436d3743aae97bc30c44de654
|
4
|
+
data.tar.gz: c2154d75d5200e76f54825270480c3f186954274
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb3720deb344d3875e7ce7479018f560137fc2f57817249bf55344ef4097905f7d84eb9628be1f0b688d19971b8ef9ae2d6d437062c2b09e8e1bc8071ea916c4
|
7
|
+
data.tar.gz: a9034ebc3fe6f1e3b73b12ed8bd8ef2c4bafcae0b935bbe4b2a98fafa8f71faa773f597af0cb032d61ca4025f974e3ed374580fe068d233e4517a6031a30e6e3
|
data/.travis.yml
CHANGED
@@ -1,21 +1,14 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- 1.9.3
|
4
|
-
- 1.9.2
|
5
4
|
- 2.0.0
|
6
|
-
-
|
5
|
+
- 2.1.0-preview1
|
7
6
|
- jruby-19mode
|
8
|
-
- jruby-head
|
9
7
|
- rbx-19mode
|
10
8
|
|
11
9
|
env:
|
12
10
|
- PATH=/opt/mongrel2-1.8.1/bin:$PATH
|
13
11
|
|
14
|
-
matrix:
|
15
|
-
allow_failures:
|
16
|
-
- rvm: ruby-head
|
17
|
-
- rvm: jruby-head
|
18
|
-
|
19
12
|
notifications:
|
20
13
|
irc: "irc.freenode.org#mongrel2-ruby"
|
21
14
|
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.1.0
|
4
|
+
|
5
|
+
* Retry response delivery when interrupt signal received. Mark connection errors coming from signals.
|
6
|
+
* Introduce handler event for interrupt signal.
|
7
|
+
* Graceful stop for Rack handler.
|
8
|
+
* Extract request parser from request.
|
9
|
+
* Introduce MultithreadedHandler to dispatch requests in multiple threads.
|
10
|
+
* Update ffi-rzmq dependency.
|
11
|
+
* Remove circular require invocations.
|
12
|
+
|
3
13
|
## 2.0.2
|
4
14
|
|
5
15
|
* Fixed #55 : Rack response body is closed.
|
data/lib/m2r/connection.rb
CHANGED
data/lib/m2r/handler.rb
CHANGED
data/lib/m2r/request.rb
CHANGED
data/lib/m2r/response.rb
CHANGED
data/lib/m2r/version.rb
CHANGED
@@ -7,7 +7,19 @@ module MongrelHelper
|
|
7
7
|
check_mongrel
|
8
8
|
`cd example && m2sh load -config mongrel2.conf --db config.sqlite`
|
9
9
|
self.pid = Process.spawn("bundle exec foreman start --procfile=example/Procfile", pgroup: 0, out: "/dev/null", err: "/dev/null")
|
10
|
-
|
10
|
+
wait_until_mongrel_responsive
|
11
|
+
end
|
12
|
+
|
13
|
+
def wait_until_mongrel_responsive
|
14
|
+
client = Net::HTTP.new('localhost', 6767)
|
15
|
+
timeout(5) do
|
16
|
+
begin
|
17
|
+
client.start
|
18
|
+
rescue Errno::ECONNREFUSED
|
19
|
+
sleep(0.1)
|
20
|
+
retry
|
21
|
+
end
|
22
|
+
end
|
11
23
|
end
|
12
24
|
|
13
25
|
def teardown
|
@@ -19,22 +31,4 @@ module MongrelHelper
|
|
19
31
|
skip("You must install mongrel2 to run this test") if `which mongrel2`.empty?
|
20
32
|
end
|
21
33
|
|
22
|
-
def read_pid_from_file(pidfile)
|
23
|
-
pid = nil
|
24
|
-
Timeout.timeout(5) do
|
25
|
-
loop do
|
26
|
-
begin
|
27
|
-
pid = File.read(pidfile)
|
28
|
-
break unless pid.empty?
|
29
|
-
rescue Errno::ENOENT
|
30
|
-
sleep(0.25)
|
31
|
-
next
|
32
|
-
end
|
33
|
-
end
|
34
|
-
pid.to_i
|
35
|
-
end
|
36
|
-
rescue Timeout::Error
|
37
|
-
raise "Unable to read PID from file #{pidfile}."
|
38
|
-
end
|
39
|
-
alias :wait_for_pid :read_pid_from_file
|
40
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: m2r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin Curtin
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-10-
|
14
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: ffi-rzmq
|
@@ -311,9 +311,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
311
311
|
version: '0'
|
312
312
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
313
313
|
requirements:
|
314
|
-
- - '
|
314
|
+
- - '>='
|
315
315
|
- !ruby/object:Gem::Version
|
316
|
-
version:
|
316
|
+
version: '0'
|
317
317
|
requirements: []
|
318
318
|
rubyforge_project:
|
319
319
|
rubygems_version: 2.1.5
|