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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: adcb4384f1d28b84c63041a1b78402482a6db2ce
4
- data.tar.gz: ce554d8a2caa636a2a9607d4a2c4aebee5e494e6
3
+ metadata.gz: d505f8f40445ce6e34221fcfcf2f7def6d70b62e
4
+ data.tar.gz: 6faf73b68c407a10fecc11b733f94ab912d897cf
5
5
  SHA512:
6
- metadata.gz: 297c51791e245bb2da548687422d1558d4996006a90d6774a792e7d7ba5f274584c17a8779324650ef369c2e22f3c1d2a1fe297e248b12e593bf8f9182b6ef03
7
- data.tar.gz: c80e343900046c22ab04f769fe93f23a21ee049ced503651e2ce308318442de6ede044ea9427d0f385c183435ad9f6c63289a58220f1df854fdcf077e50d1553
6
+ metadata.gz: ccdefc0d6b175fd1bc478957bd2716659a6d251f05600d6b4627068340fab45d47aafdb581d8c235cd68602ab23b4cf4ce697ac978f68b21b48ac64bd8855174
7
+ data.tar.gz: a2847c2cc742ce254aaa6b8f235941bf4b1742ab02a1c98ec4761320adf1e0ab12a6e5c984ef9e59e685f31a24e570041520c80c0da184f094e179db412c7d1b
@@ -1,3 +1,9 @@
1
+ === 2.13.1 / 2015-08-15
2
+
3
+ * 2 bug fixes:
4
+ * Fix binds being masked in config files. Fixes #765
5
+ * Use options from the config file properly in pumactl. Fixes #764
6
+
1
7
  === 2.13.0 / 2015-08-14
2
8
 
3
9
  * 1 minor feature:
@@ -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)
@@ -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|
@@ -99,7 +99,7 @@ module Puma
99
99
  # too taxing on performance.
100
100
  module Const
101
101
 
102
- PUMA_VERSION = VERSION = "2.13.0".freeze
102
+ PUMA_VERSION = VERSION = "2.13.1".freeze
103
103
  CODE_NAME = "A Midsummer Code's Dream".freeze
104
104
 
105
105
  FAST_TRACK_KA_TIMEOUT = 0.2
@@ -17,37 +17,37 @@ module Puma
17
17
  @argv = argv
18
18
  @stdout = stdout
19
19
  @stderr = stderr
20
- @options = {}
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
- @options[:state] = arg
26
+ @cli_options[:state] = arg
27
27
  end
28
28
 
29
29
  o.on "-Q", "--quiet", "Not display messages" do |arg|
30
- @options[:quiet_flag] = true
30
+ @cli_options[:quiet_flag] = true
31
31
  end
32
32
 
33
33
  o.on "-P", "--pidfile PATH", "Pid file" do |arg|
34
- @options[:pidfile] = arg
34
+ @cli_options[:pidfile] = arg
35
35
  end
36
36
 
37
37
  o.on "-p", "--pid PID", "Pid" do |arg|
38
- @options[:pid] = arg.to_i
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
- @options[:control_url] = arg
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
- @options[:control_auth_token] = arg
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
- @options[:config_file] = arg
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
- @options[:command] = command if command
67
+ @cli_options[:command] = command if command
68
68
 
69
- unless @options[:config_file] == '-'
70
- if @options[:config_file].nil? and File.exist?('config/puma.rb')
71
- @options[:config_file] = 'config/puma.rb'
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 @options[:config_file]
75
- Puma::Configuration.new(@options).load
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(", ")}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Phoenix