puma 2.13.0 → 2.13.1
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.txt +6 -0
- data/lib/puma/binder.rb +1 -1
- data/lib/puma/cli.rb +2 -4
- data/lib/puma/const.rb +1 -1
- data/lib/puma/control_cli.rb +20 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d505f8f40445ce6e34221fcfcf2f7def6d70b62e
|
4
|
+
data.tar.gz: 6faf73b68c407a10fecc11b733f94ab912d897cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccdefc0d6b175fd1bc478957bd2716659a6d251f05600d6b4627068340fab45d47aafdb581d8c235cd68602ab23b4cf4ce697ac978f68b21b48ac64bd8855174
|
7
|
+
data.tar.gz: a2847c2cc742ce254aaa6b8f235941bf4b1742ab02a1c98ec4761320adf1e0ab12a6e5c984ef9e59e685f31a24e570041520c80c0da184f094e179db412c7d1b
|
data/History.txt
CHANGED
data/lib/puma/binder.rb
CHANGED
@@ -227,7 +227,7 @@ module Puma
|
|
227
227
|
# allow to accumulate before returning connection refused.
|
228
228
|
#
|
229
229
|
def add_tcp_listener(host, port, optimize_for_latency=true, backlog=1024)
|
230
|
-
host = host[1..-2] if host[0..0] == '['
|
230
|
+
host = host[1..-2] if host and host[0..0] == '['
|
231
231
|
s = TCPServer.new(host, port)
|
232
232
|
if optimize_for_latency
|
233
233
|
s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
data/lib/puma/cli.rb
CHANGED
@@ -300,13 +300,11 @@ module Puma
|
|
300
300
|
#
|
301
301
|
|
302
302
|
def setup_options
|
303
|
-
@cli_options = {
|
304
|
-
:binds => []
|
305
|
-
}
|
303
|
+
@cli_options = {}
|
306
304
|
|
307
305
|
@parser = OptionParser.new do |o|
|
308
306
|
o.on "-b", "--bind URI", "URI to bind to (tcp://, unix://, ssl://)" do |arg|
|
309
|
-
@cli_options[:binds] << arg
|
307
|
+
(@cli_options[:binds] ||= []) << arg
|
310
308
|
end
|
311
309
|
|
312
310
|
o.on "-C", "--config PATH", "Load PATH as a config file" do |arg|
|
data/lib/puma/const.rb
CHANGED
data/lib/puma/control_cli.rb
CHANGED
@@ -17,37 +17,37 @@ module Puma
|
|
17
17
|
@argv = argv
|
18
18
|
@stdout = stdout
|
19
19
|
@stderr = stderr
|
20
|
-
@
|
20
|
+
@cli_options = {}
|
21
21
|
|
22
22
|
opts = OptionParser.new do |o|
|
23
23
|
o.banner = "Usage: pumactl (-p PID | -P pidfile | -S status_file | -C url -T token | -F config.rb) (#{COMMANDS.join("|")})"
|
24
24
|
|
25
25
|
o.on "-S", "--state PATH", "Where the state file to use is" do |arg|
|
26
|
-
@
|
26
|
+
@cli_options[:state] = arg
|
27
27
|
end
|
28
28
|
|
29
29
|
o.on "-Q", "--quiet", "Not display messages" do |arg|
|
30
|
-
@
|
30
|
+
@cli_options[:quiet_flag] = true
|
31
31
|
end
|
32
32
|
|
33
33
|
o.on "-P", "--pidfile PATH", "Pid file" do |arg|
|
34
|
-
@
|
34
|
+
@cli_options[:pidfile] = arg
|
35
35
|
end
|
36
36
|
|
37
37
|
o.on "-p", "--pid PID", "Pid" do |arg|
|
38
|
-
@
|
38
|
+
@cli_options[:pid] = arg.to_i
|
39
39
|
end
|
40
40
|
|
41
41
|
o.on "-C", "--control-url URL", "The bind url to use for the control server" do |arg|
|
42
|
-
@
|
42
|
+
@cli_options[:control_url] = arg
|
43
43
|
end
|
44
44
|
|
45
45
|
o.on "-T", "--control-token TOKEN", "The token to use as authentication for the control server" do |arg|
|
46
|
-
@
|
46
|
+
@cli_options[:control_auth_token] = arg
|
47
47
|
end
|
48
48
|
|
49
49
|
o.on "-F", "--config-file PATH", "Puma config script" do |arg|
|
50
|
-
@
|
50
|
+
@cli_options[:config_file] = arg
|
51
51
|
end
|
52
52
|
|
53
53
|
o.on_tail("-H", "--help", "Show this message") do
|
@@ -64,18 +64,24 @@ module Puma
|
|
64
64
|
opts.order!(argv) { |a| opts.terminate a }
|
65
65
|
|
66
66
|
command = argv.shift
|
67
|
-
@
|
67
|
+
@cli_options[:command] = command if command
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
@options = nil
|
70
|
+
|
71
|
+
unless @cli_options[:config_file] == '-'
|
72
|
+
if @cli_options[:config_file].nil? and File.exist?('config/puma.rb')
|
73
|
+
@cli_options[:config_file] = 'config/puma.rb'
|
72
74
|
end
|
73
75
|
|
74
|
-
if @
|
75
|
-
Puma::Configuration.new(@
|
76
|
+
if @cli_options[:config_file]
|
77
|
+
config = Puma::Configuration.new(@cli_options)
|
78
|
+
config.load
|
79
|
+
@options = config.options
|
76
80
|
end
|
77
81
|
end
|
78
82
|
|
83
|
+
@options ||= @cli_options
|
84
|
+
|
79
85
|
# check present of command
|
80
86
|
unless @options[:command]
|
81
87
|
raise "Available commands: #{COMMANDS.join(", ")}"
|