puma 4.2.0-java → 4.2.1-java
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 +4 -4
- data/History.md +6 -2
- data/README.md +2 -0
- data/docs/plugins.md +20 -10
- data/lib/puma/binder.rb +5 -3
- data/lib/puma/client.rb +3 -3
- data/lib/puma/cluster.rb +0 -1
- data/lib/puma/const.rb +1 -1
- data/lib/puma/dsl.rb +1 -1
- data/lib/puma/launcher.rb +1 -4
- data/lib/puma/puma_http11.jar +0 -0
- data/lib/puma/server.rb +3 -6
- data/lib/puma/single.rb +0 -1
- metadata +3 -5
- data/lib/puma/delegation.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eab8fa50918c4889b6abe601c8b7dd055b7a756ec33102072a3a26a11c489948
|
4
|
+
data.tar.gz: a7b3bd761abf7406a6ea762db2e3b9c55e5b1ef829cce4277acd6892d3f824fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a84226a8ab2ec1681ef0283f8237286a5120a0e7719556da71116839c292c65ce58ca2ce3a248fe51ee1d0805efc963d31f6b995f978f26c755b1e2abda66a8
|
7
|
+
data.tar.gz: e5aa65bb4f9d500d6a88796d85441056afb1c6e8de3fcd3ffb72105ffd2afaf1ae68e8327d5986368e6f253254eb42c57bba4a64bc5ad9bc37ed4a9bbb5617a8
|
data/History.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
-
## Master
|
2
|
-
|
3
1
|
* Features
|
4
2
|
* Your feature goes here (#Github Number)
|
5
3
|
|
6
4
|
* Bugfixes
|
7
5
|
* Your bugfix goes here (#Github Number)
|
8
6
|
|
7
|
+
## 4.2.1 / 2019-10-07
|
8
|
+
|
9
|
+
* 3 bugfixes
|
10
|
+
* Fix socket activation of systemd (pre-existing) unix binder files (#1842, #1988)
|
11
|
+
* Deal with multiple calls to bind correctly (#1986, #1994, #2006)
|
12
|
+
* Accepts symbols for `verify_mode` (#1222)
|
9
13
|
|
10
14
|
## 4.2.0 / 2019-09-23
|
11
15
|
|
data/README.md
CHANGED
@@ -304,6 +304,8 @@ Which can also be used to run a single test case:
|
|
304
304
|
$ bundle exec m test/test_binder.rb:37
|
305
305
|
```
|
306
306
|
|
307
|
+
If you open a pull request with a change that doesn't need to be noted in the changelog ([`History.md`](History.md)), add the text `[changelog skip]` to the pull request title to skip [the changelog check](https://github.com/puma/puma/pull/1991).
|
308
|
+
|
307
309
|
## License
|
308
310
|
|
309
311
|
Puma is copyright Evan Phoenix and contributors, licensed under the BSD 3-Clause license. See the included LICENSE file for details.
|
data/docs/plugins.md
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
## Plugins
|
2
2
|
|
3
|
-
Puma 3.0 added support for plugins that can augment configuration and service
|
3
|
+
Puma 3.0 added support for plugins that can augment configuration and service
|
4
|
+
operations.
|
4
5
|
|
5
6
|
2 canonical plugins to look to aid in development of further plugins:
|
6
7
|
|
7
|
-
* [tmp\_restart](https://github.com/puma/puma/blob/master/lib/puma/plugin/tmp_restart.rb):
|
8
|
-
|
8
|
+
* [tmp\_restart](https://github.com/puma/puma/blob/master/lib/puma/plugin/tmp_restart.rb):
|
9
|
+
Restarts the server if the file `tmp/restart.txt` is touched
|
10
|
+
* [heroku](https://github.com/puma/puma-heroku/blob/master/lib/puma/plugin/heroku.rb):
|
11
|
+
Packages up the default configuration used by puma on Heroku
|
9
12
|
|
10
|
-
Plugins are activated in a puma configuration file (such as `config/puma.rb'`)
|
13
|
+
Plugins are activated in a puma configuration file (such as `config/puma.rb'`)
|
14
|
+
by adding `plugin "name"`, such as `plugin "heroku"`.
|
11
15
|
|
12
|
-
Plugins are activated based simply on path requirements so, activating the
|
16
|
+
Plugins are activated based simply on path requirements so, activating the
|
17
|
+
`heroku` plugin will simply be doing `require "puma/plugin/heroku"`. This
|
18
|
+
allows gems to provide multiple plugins (as well as unrelated gems to provide
|
19
|
+
puma plugins).
|
13
20
|
|
14
21
|
The `tmp_restart` plugin is bundled with puma, so it can always be used.
|
15
22
|
|
@@ -17,12 +24,15 @@ To use the `heroku` plugin, add `puma-heroku` to your Gemfile or install it.
|
|
17
24
|
|
18
25
|
### API
|
19
26
|
|
20
|
-
|
27
|
+
## Server-wide hooks
|
21
28
|
|
22
|
-
|
29
|
+
Plugins can use a couple of hooks at server level: `start` and `config`.
|
23
30
|
|
24
|
-
`
|
31
|
+
`start` runs when the server has started and allows the plugin to start other
|
32
|
+
functionality to augment puma.
|
25
33
|
|
26
|
-
|
34
|
+
`config` runs when the server is being configured and is passed a `Puma::DSL`
|
35
|
+
object that can be used to add additional configuration.
|
27
36
|
|
28
|
-
|
37
|
+
Any public methods in `Puma::Plugin` are the public API that any plugin may
|
38
|
+
use.
|
data/lib/puma/binder.rb
CHANGED
@@ -105,6 +105,7 @@ module Puma
|
|
105
105
|
io = add_tcp_listener uri.host, uri.port, opt, bak
|
106
106
|
|
107
107
|
@ios.each do |i|
|
108
|
+
next unless TCPServer === i
|
108
109
|
addr = if i.local_address.ipv6?
|
109
110
|
"[#{i.local_address.ip_unpack[0]}]:#{i.local_address.ip_unpack[1]}"
|
110
111
|
else
|
@@ -360,7 +361,7 @@ module Puma
|
|
360
361
|
# Tell the server to listen on +path+ as a UNIX domain socket.
|
361
362
|
#
|
362
363
|
def add_unix_listener(path, umask=nil, mode=nil, backlog=1024)
|
363
|
-
@unix_paths << path
|
364
|
+
@unix_paths << path unless File.exist? path
|
364
365
|
|
365
366
|
# Let anyone connect by default
|
366
367
|
umask ||= 0
|
@@ -398,7 +399,7 @@ module Puma
|
|
398
399
|
end
|
399
400
|
|
400
401
|
def inherit_unix_listener(path, fd)
|
401
|
-
@unix_paths << path
|
402
|
+
@unix_paths << path unless File.exist? path
|
402
403
|
|
403
404
|
if fd.kind_of? TCPServer
|
404
405
|
s = fd
|
@@ -419,7 +420,8 @@ module Puma
|
|
419
420
|
io.close
|
420
421
|
uri = URI.parse(l)
|
421
422
|
next unless uri.scheme == 'unix'
|
422
|
-
|
423
|
+
unix_path = "#{uri.host}#{uri.path}"
|
424
|
+
File.unlink unix_path if @unix_paths.include? unix_path
|
423
425
|
end
|
424
426
|
end
|
425
427
|
|
data/lib/puma/client.rb
CHANGED
@@ -9,8 +9,8 @@ class IO
|
|
9
9
|
end
|
10
10
|
|
11
11
|
require 'puma/detect'
|
12
|
-
require 'puma/delegation'
|
13
12
|
require 'tempfile'
|
13
|
+
require 'forwardable'
|
14
14
|
|
15
15
|
if Puma::IS_JRUBY
|
16
16
|
# We have to work around some OpenSSL buffer/io-readiness bugs
|
@@ -41,7 +41,7 @@ module Puma
|
|
41
41
|
EmptyBody = NullIO.new
|
42
42
|
|
43
43
|
include Puma::Const
|
44
|
-
extend
|
44
|
+
extend Forwardable
|
45
45
|
|
46
46
|
def initialize(io, env=nil)
|
47
47
|
@io = io
|
@@ -83,7 +83,7 @@ module Puma
|
|
83
83
|
|
84
84
|
attr_accessor :remote_addr_header
|
85
85
|
|
86
|
-
|
86
|
+
def_delegators :@io, :closed?
|
87
87
|
|
88
88
|
def inspect
|
89
89
|
"#<Puma::Client:0x#{object_id.to_s(16)} @ready=#{@ready.inspect}>"
|
data/lib/puma/cluster.rb
CHANGED
data/lib/puma/const.rb
CHANGED
@@ -100,7 +100,7 @@ module Puma
|
|
100
100
|
# too taxing on performance.
|
101
101
|
module Const
|
102
102
|
|
103
|
-
PUMA_VERSION = VERSION = "4.2.
|
103
|
+
PUMA_VERSION = VERSION = "4.2.1".freeze
|
104
104
|
CODE_NAME = "Distant Airhorns".freeze
|
105
105
|
PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
|
106
106
|
|
data/lib/puma/dsl.rb
CHANGED
@@ -396,7 +396,7 @@ module Puma
|
|
396
396
|
# keystore_pass: password
|
397
397
|
# }
|
398
398
|
def ssl_bind(host, port, opts)
|
399
|
-
verify = opts.fetch(:verify_mode, 'none')
|
399
|
+
verify = opts.fetch(:verify_mode, 'none').to_s
|
400
400
|
no_tlsv1 = opts.fetch(:no_tlsv1, 'false')
|
401
401
|
no_tlsv1_1 = opts.fetch(:no_tlsv1_1, 'false')
|
402
402
|
ca_additions = "&ca=#{opts[:ca]}" if ['peer', 'force_peer'].include?(verify)
|
data/lib/puma/launcher.rb
CHANGED
@@ -184,6 +184,7 @@ module Puma
|
|
184
184
|
when :exit
|
185
185
|
# nothing
|
186
186
|
end
|
187
|
+
@binder.close_unix_paths
|
187
188
|
end
|
188
189
|
|
189
190
|
# Return which tcp port the launcher is using, if it's using TCP
|
@@ -204,10 +205,6 @@ module Puma
|
|
204
205
|
@binder.close_listeners
|
205
206
|
end
|
206
207
|
|
207
|
-
def close_binder_unix_paths
|
208
|
-
@binder.close_unix_paths
|
209
|
-
end
|
210
|
-
|
211
208
|
private
|
212
209
|
|
213
210
|
# If configured, write the pid of the current process out
|
data/lib/puma/puma_http11.jar
CHANGED
Binary file
|
data/lib/puma/server.rb
CHANGED
@@ -9,13 +9,13 @@ require 'puma/null_io'
|
|
9
9
|
require 'puma/reactor'
|
10
10
|
require 'puma/client'
|
11
11
|
require 'puma/binder'
|
12
|
-
require 'puma/delegation'
|
13
12
|
require 'puma/accept_nonblock'
|
14
13
|
require 'puma/util'
|
15
14
|
|
16
15
|
require 'puma/puma_http11'
|
17
16
|
|
18
17
|
require 'socket'
|
18
|
+
require 'forwardable'
|
19
19
|
|
20
20
|
module Puma
|
21
21
|
|
@@ -32,7 +32,7 @@ module Puma
|
|
32
32
|
class Server
|
33
33
|
|
34
34
|
include Puma::Const
|
35
|
-
extend
|
35
|
+
extend Forwardable
|
36
36
|
|
37
37
|
attr_reader :thread
|
38
38
|
attr_reader :events
|
@@ -89,10 +89,7 @@ module Puma
|
|
89
89
|
|
90
90
|
attr_accessor :binder, :leak_stack_on_error, :early_hints
|
91
91
|
|
92
|
-
|
93
|
-
forward :add_ssl_listener, :@binder
|
94
|
-
forward :add_unix_listener, :@binder
|
95
|
-
forward :connected_port, :@binder
|
92
|
+
def_delegators :@binder, :add_tcp_listener, :add_ssl_listener, :add_unix_listener, :connected_port
|
96
93
|
|
97
94
|
def inherit_binder(bind)
|
98
95
|
@binder = bind
|
data/lib/puma/single.rb
CHANGED
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: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Evan Phoenix
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,7 +79,6 @@ files:
|
|
79
79
|
- lib/puma/const.rb
|
80
80
|
- lib/puma/control_cli.rb
|
81
81
|
- lib/puma/convenient.rb
|
82
|
-
- lib/puma/delegation.rb
|
83
82
|
- lib/puma/detect.rb
|
84
83
|
- lib/puma/dsl.rb
|
85
84
|
- lib/puma/events.rb
|
@@ -136,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
135
|
- !ruby/object:Gem::Version
|
137
136
|
version: '0'
|
138
137
|
requirements: []
|
139
|
-
|
140
|
-
rubygems_version: 2.7.9
|
138
|
+
rubygems_version: 3.0.6
|
141
139
|
signing_key:
|
142
140
|
specification_version: 4
|
143
141
|
summary: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for
|