puma 3.0.2-java → 3.1.0-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bdf67a2718833f75de9167501a9b2c731d3b0ce5
4
- data.tar.gz: bf1d38a64c51f079d6f4f7e849b5fd6158265971
3
+ metadata.gz: cd667f4be1193acbc7a84148f9b993a3618d40a6
4
+ data.tar.gz: c108707140d918a74f59b31de2a6fcfa818f5768
5
5
  SHA512:
6
- metadata.gz: b2310c30304035538c68828bde59aa8e3a07bdae4468f3152711dbeb6a3b0e7e4b59762e4271dd6e5ef1551bab761fad11b5550cb59babc4d9fa66243f7ba06b
7
- data.tar.gz: 357210543f7b79b78fd63eafc760a0eaa36f828a2f2548d64cdea91a534a1479b5fb430f1636bcfbb93e9e5e61df1def96201f16e587e4af5ef47ee67df6ab94
6
+ metadata.gz: 4510ea74d1d6588cd34cb0c1b9d7283bb37fbead2722f11eae592867cc387e1ea432eac6f93125551026596bd394a78365486c24bd4cfb4273548fec65df1a8c
7
+ data.tar.gz: 2a7b31a4d8a65ecdceb3e183bbdbbee3155a636c91263d527c8089e3f39f589d6f3d3b40af083781531d67c6877a4a5dfaf335bc7b8965d1a86111ad8fb82acf
@@ -1,3 +1,14 @@
1
+ === 3.1.0 / 2016-03-05
2
+
3
+ * 1 minor feature:
4
+ * Add 'import' directive to config file. Fixes #916
5
+
6
+ * 5 bug fixes:
7
+ * Add 'fetch' to options. Fixes #913
8
+ * Fix jruby daemonization. Fixes #918
9
+ * Recreate the proper args manually. Fixes #910
10
+ * Require 'time' to get iso8601. Fixes #914
11
+
1
12
  === 3.0.2 / 2016-02-26
2
13
 
3
14
  * 5 bug fixes:
@@ -1,4 +1,5 @@
1
1
  require 'puma/runner'
2
+ require 'time'
2
3
 
3
4
  module Puma
4
5
  class Cluster < Runner
@@ -44,6 +44,12 @@ module Puma
44
44
  end
45
45
  end
46
46
 
47
+ def fetch(key, default=nil)
48
+ val = self[key]
49
+ return val if val
50
+ default
51
+ end
52
+
47
53
  attr_reader :cur
48
54
 
49
55
  def all_of(key)
@@ -99,8 +99,8 @@ module Puma
99
99
  # too taxing on performance.
100
100
  module Const
101
101
 
102
- PUMA_VERSION = VERSION = "3.0.2".freeze
103
- CODE_NAME = "Plethora of Penguin Pinatas".freeze
102
+ PUMA_VERSION = VERSION = "3.1.0".freeze
103
+ CODE_NAME = "El Niño Winter Wonderland".freeze
104
104
 
105
105
  FAST_TRACK_KA_TIMEOUT = 0.2
106
106
 
@@ -237,15 +237,14 @@ module Puma
237
237
  def start
238
238
  require 'puma/cli'
239
239
 
240
- run_args = @argv
241
-
242
- if path = @state
243
- run_args = ["-S", path] + run_args
244
- end
245
-
246
- if path = @config_file
247
- run_args = ["-C", path] + run_args
248
- end
240
+ run_args = []
241
+
242
+ run_args += ["-S", @state] if @state
243
+ run_args += ["-q"] if @quiet
244
+ run_args += ["--pidfile", @pidfile] if @pidfile
245
+ run_args += ["--control", @control_url] if @control_url
246
+ run_args += ["--control-token", @control_auth_token] if @control_auth_token
247
+ run_args += ["-C", @config_file] if @config_file
249
248
 
250
249
  events = Puma::Events.new @stdout, @stderr
251
250
 
@@ -21,7 +21,10 @@ module Puma
21
21
  end
22
22
 
23
23
  def _load_from(path)
24
- instance_eval(File.read(path), path, 1) if path
24
+ if path
25
+ @path = path
26
+ instance_eval(File.read(path), path, 1)
27
+ end
25
28
  ensure
26
29
  _offer_plugins
27
30
  end
@@ -47,6 +50,26 @@ module Puma
47
50
  instance_eval(&blk)
48
51
  end
49
52
 
53
+ # Load configuration from another named file. If the file name is absolute,
54
+ # load the file as an absolute path. Otherwise load it relative to the
55
+ # current config file.
56
+ #
57
+ def import(file)
58
+ if File.extname(file) == ""
59
+ file += ".rb"
60
+ end
61
+
62
+ if file[0,1] == "/"
63
+ path = file
64
+ elsif @path
65
+ path = File.join File.dirname(@path), file
66
+ else
67
+ raise "No original configuration path to import relative to"
68
+ end
69
+
70
+ DSL.new(@options, @config)._load_from(path)
71
+ end
72
+
50
73
  def get(key,default=nil)
51
74
  @options[key.to_sym] || default
52
75
  end
@@ -61,7 +61,7 @@ module Puma
61
61
  end
62
62
 
63
63
  def self.daemon_start(dir, argv)
64
- ENV['PUMA_DAEMON_RESTART'] = Process.pid.to_s
64
+ ENV[RestartKey] = Process.pid.to_s
65
65
 
66
66
  if k = ENV['PUMA_JRUBY_DAEMON_OPTS']
67
67
  ENV['JRUBY_OPTS'] = k
@@ -191,6 +191,15 @@ module Puma
191
191
  @binder.connected_port
192
192
  end
193
193
 
194
+ def restart_args
195
+ cmd = @options[:restart_cmd]
196
+ if cmd
197
+ cmd.split(' ') + @original_argv
198
+ else
199
+ @restart_argv
200
+ end
201
+ end
202
+
194
203
  private
195
204
 
196
205
  def reload_worker_directory
@@ -260,15 +269,6 @@ module Puma
260
269
  (@options[:workers] || 0) > 0
261
270
  end
262
271
 
263
- def restart_args
264
- cmd = @options[:restart_cmd]
265
- if cmd
266
- cmd.split(' ') + @original_argv
267
- else
268
- @restart_argv
269
- end
270
- end
271
-
272
272
  def unsupported(str)
273
273
  @events.error(str)
274
274
  raise UnsupportedOption
Binary file
@@ -32,7 +32,7 @@ module Puma
32
32
 
33
33
  def jruby_daemon_start
34
34
  require 'puma/jruby_restart'
35
- JRubyRestart.daemon_start(@restart_dir, restart_args)
35
+ JRubyRestart.daemon_start(@restart_dir, @launcher.restart_args)
36
36
  end
37
37
 
38
38
  def run
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: 3.0.2
4
+ version: 3.1.0
5
5
  platform: java
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2016-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement