puma 2.5.0 → 2.5.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.
- data/History.txt +7 -0
- data/lib/puma/const.rb +1 -1
- data/lib/puma/jruby_restart.rb +23 -4
- data/lib/puma/single.rb +3 -1
- data/puma.gemspec +8 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/puma/const.rb
CHANGED
data/lib/puma/jruby_restart.rb
CHANGED
@@ -21,15 +21,34 @@ module Puma
|
|
21
21
|
raise SystemCallError.new(FFI.errno)
|
22
22
|
end
|
23
23
|
|
24
|
+
PermKey = 'PUMA_DAEMON_PERM'
|
25
|
+
RestartKey = 'PUMA_DAEMON_RESTART'
|
26
|
+
|
27
|
+
# Called to tell things "Your now always in daemon mode,
|
28
|
+
# don't try to reenter it."
|
29
|
+
#
|
30
|
+
def self.perm_daemonize
|
31
|
+
ENV[PermKey] = "1"
|
32
|
+
end
|
33
|
+
|
24
34
|
def self.daemon?
|
25
|
-
ENV.key?
|
35
|
+
ENV.key?(PermKey) || ENV.key?(RestartKey)
|
26
36
|
end
|
27
37
|
|
28
38
|
def self.daemon_init
|
29
|
-
return
|
39
|
+
return true if ENV.key?(PermKey)
|
40
|
+
|
41
|
+
return false unless ENV.key? RestartKey
|
42
|
+
|
43
|
+
master = ENV[RestartKey]
|
44
|
+
|
45
|
+
# In case the master disappears early
|
46
|
+
begin
|
47
|
+
Process.kill "SIGUSR2", master.to_i
|
48
|
+
rescue SystemCallError => e
|
49
|
+
end
|
30
50
|
|
31
|
-
|
32
|
-
Process.kill "SIGUSR2", master.to_i
|
51
|
+
ENV[RestartKey] = ""
|
33
52
|
|
34
53
|
setsid
|
35
54
|
|
data/lib/puma/single.rb
CHANGED
data/puma.gemspec
CHANGED
@@ -3,9 +3,16 @@
|
|
3
3
|
# This is only used when puma is a git dep from Bundler, so it's a little
|
4
4
|
# weird.
|
5
5
|
|
6
|
+
d = File.read(File.expand_path("../lib/puma/const.rb", __FILE__))
|
7
|
+
if d =~ /VERSION = "(\d+\.\d+\.\d+)"/
|
8
|
+
version = $1
|
9
|
+
else
|
10
|
+
version = "0.0.1"
|
11
|
+
end
|
12
|
+
|
6
13
|
Gem::Specification.new do |s|
|
7
14
|
s.name = "puma"
|
8
|
-
s.version =
|
15
|
+
s.version = version
|
9
16
|
|
10
17
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
18
|
s.authors = ["Evan Phoenix"]
|
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.5.
|
4
|
+
version: 2.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|