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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f0f628d8db7c7de4625f0f42445f377c3ec9f5c
4
- data.tar.gz: c356a75ae6cbdc2e7c4eff39e977abd887619cc4
3
+ metadata.gz: eefcb7c87224158436d3743aae97bc30c44de654
4
+ data.tar.gz: c2154d75d5200e76f54825270480c3f186954274
5
5
  SHA512:
6
- metadata.gz: b4afde4794564c45b804289ead01320838d968d4e74a71abf002fdbcbac3c01e6786b01508eb0f63cd7da38004b317078ec396e4fdfc444143cd4c87a0c79a0f
7
- data.tar.gz: 1d6dc2ce3668765acc617f5b8e61327db02b41c0aee29883832953b3a219ef89359a31f8a456baecddba81ec5b03f6d04747f7bb42d8d2f92c0af9e493ede2d7
6
+ metadata.gz: cb3720deb344d3875e7ce7479018f560137fc2f57817249bf55344ef4097905f7d84eb9628be1f0b688d19971b8ef9ae2d6d437062c2b09e8e1bc8071ea916c4
7
+ data.tar.gz: a9034ebc3fe6f1e3b73b12ed8bd8ef2c4bafcae0b935bbe4b2a98fafa8f71faa773f597af0cb032d61ca4025f974e3ed374580fe068d233e4517a6031a30e6e3
@@ -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
- - ruby-head
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
 
@@ -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.
@@ -1,5 +1,3 @@
1
- require 'm2r'
2
-
3
1
  module M2R
4
2
  # Connection for exchanging data with mongrel2
5
3
  class Connection
@@ -1,4 +1,3 @@
1
- require 'm2r'
2
1
  require 'ostruct'
3
2
 
4
3
  module M2R
@@ -1,5 +1,3 @@
1
- require 'm2r'
2
-
3
1
  module M2R
4
2
 
5
3
  # Basic handler, scaffold for your own Handler.
@@ -1,5 +1,4 @@
1
1
  require 'set'
2
- require 'm2r'
3
2
  require 'm2r/http/close'
4
3
  require 'm2r/request/base'
5
4
  require 'm2r/request/upload'
@@ -1,4 +1,3 @@
1
- require 'm2r'
2
1
  require 'm2r/http/close'
3
2
  require 'm2r/response/content_length'
4
3
  require 'm2r/response/to_request'
@@ -1,5 +1,3 @@
1
- require 'm2r/response'
2
-
3
1
  module M2R
4
2
  class Response
5
3
  # Adds Content-Length header based on body size
@@ -1,5 +1,3 @@
1
- require 'm2r/response'
2
-
3
1
  module M2R
4
2
  class Response
5
3
 
@@ -1,5 +1,5 @@
1
1
  module M2R
2
2
  # m2r gem version
3
3
  # @api public
4
- VERSION = '2.1.0.pre'
4
+ VERSION = '2.1.0'
5
5
  end
@@ -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
- wait_for_pid('example/tmp/mongrel2.pid')
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.pre
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-22 00:00:00.000000000 Z
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: 1.3.1
316
+ version: '0'
317
317
  requirements: []
318
318
  rubyforge_project:
319
319
  rubygems_version: 2.1.5