puma 2.12.2 → 2.12.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puma might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acc6978f0afad6cb3d2f28d834f2c60c08f6f6a9
4
- data.tar.gz: 24c4f715b9b474a438567ce91314ce24e17f1acb
3
+ metadata.gz: 8fb289c9463eb0aec389606cde7abca74b3ba737
4
+ data.tar.gz: 0f81b87b1bd9c0fa43d9c67e6d8b5c2f4a4b97a9
5
5
  SHA512:
6
- metadata.gz: 115b5753fb3487f7a6e3ae3e0009c75bea89d2cbe9b1b67bf1de52e6795f7788123034a54627b38be5585061ce34db46ba7108f8cff03abef478fc6081cf3854
7
- data.tar.gz: 9b7198cca050cc284a335184a7ab3ec630ec5bfe081a44e0760abf1b748ae0388c4b0171b609574ba27748445be5ecf16a62b371aa0dfe58e9dbc05454018420
6
+ metadata.gz: bf53fee269a717c206e9031cfb26c6e7924eb346d7d17f5accf57d858813fb6302aecb1832385b2a87a94e68f452fae50f218cfe2f941617df8370c712e20d9f
7
+ data.tar.gz: 92daf0ecf12fb7abda0655461ec72bff29f96dbf955f3434049f00e1e4de87b4b2672db36f03fe62ed36b0df0ea28305bd2dab80fa3de90ac3742a5954a42397
data/Gemfile CHANGED
@@ -11,7 +11,3 @@ gem "rack"
11
11
  gem 'minitest', '~> 4.0'
12
12
 
13
13
  gem "jruby-openssl", :platform => "jruby"
14
-
15
- platforms :rbx do
16
- gem 'rubysl', '~> 2.0'
17
- end
@@ -1,3 +1,24 @@
1
+ === 2.12.3 / 2015-08-03
2
+
3
+ * 8 minor bugs fixed:
4
+ * Fix Capistrano 'uninitialized constant Puma' error.
5
+ * Fix some ancient and incorrect error handling code
6
+ * Fix uninitialized constant error
7
+ * Remove toplevel rack interspection, require rack on load instead
8
+ * Skip empty parts when chunking
9
+ * Switch from inject to each in config_ru_binds iteration
10
+ * Wrap SSLv3 spec in version guard.
11
+ * ruby 1.8.7 compatibility patches
12
+
13
+ * 4 PRs merged:
14
+ * Merge pull request #742 from deivid-rodriguez/fix_missing_require
15
+ * Merge pull request #743 from matthewd/skip-empty-chunks
16
+ * Merge pull request #749 from huacnlee/fix-cap-uninitialized-puma-error
17
+ * Merge pull request #751 from costi/compat_1_8_7
18
+
19
+ * 1 test fix:
20
+ * Add 1.8.7, rbx-1 (allow failures) to Travis.
21
+
1
22
  === 2.12.2 / 2015-07-17
2
23
 
3
24
  * 2 bug fix:
@@ -82,6 +82,7 @@ Capistrano::Configuration.instance.load do
82
82
  end
83
83
 
84
84
  def configuration
85
+ require 'puma'
85
86
  require 'puma/configuration'
86
87
 
87
88
  config = Puma::Configuration.new(:config_file => config_file)
@@ -104,8 +104,9 @@ module Puma
104
104
  rack_app, rack_options = Puma::Rack::Builder.parse_file(rackup)
105
105
  @options.merge!(rack_options)
106
106
 
107
- config_ru_binds = rack_options.each_with_object([]) do |(k, v), b|
108
- b << v if k.to_s.start_with?("bind")
107
+ config_ru_binds = []
108
+ rack_options.each do |k, v|
109
+ config_ru_binds << v if k.to_s.start_with?("bind")
109
110
  end
110
111
  @options[:binds] = config_ru_binds unless config_ru_binds.empty?
111
112
 
@@ -99,7 +99,7 @@ module Puma
99
99
  # too taxing on performance.
100
100
  module Const
101
101
 
102
- PUMA_VERSION = VERSION = "2.12.2".freeze
102
+ PUMA_VERSION = VERSION = "2.12.3".freeze
103
103
  CODE_NAME = "Plutonian Photo Shoot".freeze
104
104
 
105
105
  FAST_TRACK_KA_TIMEOUT = 0.2
@@ -1,16 +1,3 @@
1
- module PumaRackCompat
2
- BINDING = binding
3
-
4
- def self.const_missing(cm)
5
- if cm == :Rack
6
- require 'rack'
7
- Rack
8
- else
9
- raise NameError, "constant undefined: #{cm}"
10
- end
11
- end
12
- end
13
-
14
1
  module Puma::Rack
15
2
  class Options
16
3
  def parse!(args)
@@ -181,11 +168,19 @@ module Puma::Rack
181
168
 
182
169
  def self.new_from_string(builder_script, file="(rackup)")
183
170
  eval "Puma::Rack::Builder.new {\n" + builder_script + "\n}.to_app",
184
- PumaRackCompat::BINDING, file, 0
171
+ TOPLEVEL_BINDING, file, 0
185
172
  end
186
173
 
187
174
  def initialize(default_app = nil,&block)
188
175
  @use, @map, @run, @warmup = [], nil, default_app, nil
176
+
177
+ # Conditionally load rack now, so that any rack middlewares,
178
+ # etc are available.
179
+ begin
180
+ require 'rack'
181
+ rescue LoadError
182
+ end
183
+
189
184
  instance_eval(&block) if block_given?
190
185
  end
191
186
 
@@ -1,4 +1,5 @@
1
1
  require 'puma/util'
2
+ require 'puma/minissl'
2
3
 
3
4
  module Puma
4
5
  class Reactor
@@ -189,12 +189,13 @@ module Puma
189
189
  pool << client
190
190
  end
191
191
  rescue SystemCallError
192
+ # nothing
193
+ rescue Errno::ECONNABORTED
194
+ # client closed the socket even before accept
195
+ io.close rescue nil
192
196
  end
193
197
  end
194
198
  end
195
- rescue Errno::ECONNABORTED
196
- # client closed the socket even before accept
197
- client.close rescue nil
198
199
  rescue Object => e
199
200
  @events.unknown_error self, e, "Listen loop"
200
201
  end
@@ -320,12 +321,13 @@ module Puma
320
321
  pool.wait_until_not_full unless queue_requests
321
322
  end
322
323
  rescue SystemCallError
324
+ # nothing
325
+ rescue Errno::ECONNABORTED
326
+ # client closed the socket even before accept
327
+ io.close rescue nil
323
328
  end
324
329
  end
325
330
  end
326
- rescue Errno::ECONNABORTED
327
- # client closed the socket even before accept
328
- client.close rescue nil
329
331
  rescue Object => e
330
332
  @events.unknown_error self, e, "Listen loop"
331
333
  end
@@ -663,6 +665,7 @@ module Puma
663
665
  begin
664
666
  res_body.each do |part|
665
667
  if chunked
668
+ next if part.bytesize.zero?
666
669
  fast_write client, part.bytesize.to_s(16)
667
670
  fast_write client, line_ending
668
671
  fast_write client, part
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.2
4
+ version: 2.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-17 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc