capistrano3-puma 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/capistrano3-puma.gemspec +1 -0
- data/lib/capistrano/puma/version.rb +1 -1
- data/lib/capistrano/tasks/puma.cap +8 -14
- data/lib/capistrano/templates/puma.rb.erb +0 -1
- data/lib/capistrano/templates/puma_monit.conf.erb +1 -1
- data/lib/capistrano/templates/run-puma.erb +2 -2
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6eb1f47c6b33ef2ce0b2eb525a419d404592bf71
|
4
|
+
data.tar.gz: f83553ccc0af1fd138d47bd0d5842e2ca513e74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8bf1eb3e4dfe05f5397ec3ed4a383c0bfbd043417b957180bab10874052d10d900379bf8c6d85d340fc4f9b4e859c3a40efc7ed80bc2d9bd50a42d62759edf3
|
7
|
+
data.tar.gz: 602506a6bb39b3de0870c81bcd708376e730db78774b3a30a78e7e9cf0f27ab8294096ff06214f615f8a151c897f66609f5a9e7df52579bbad81b97fc2008f99
|
data/README.md
CHANGED
@@ -67,6 +67,7 @@ Ensure that the following directories are shared (via ``linked_dirs``):
|
|
67
67
|
tmp/pids tmp/sockets log
|
68
68
|
|
69
69
|
## Changelog
|
70
|
+
- 0.6.0: Remove `daemonize true` from default puma.rb file. Explicitly pass `--daemon` flag when needed.
|
70
71
|
- 0.5.1: Added worker_timeout option
|
71
72
|
- 0.5.0: Bugs fixes
|
72
73
|
- 0.4.2: Fix monit template to support chruby
|
data/capistrano3-puma.gemspec
CHANGED
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency 'capistrano', '~> 3.0'
|
22
22
|
spec.add_dependency 'puma' , '>= 2.6'
|
23
23
|
|
24
|
+
spec.post_install_message = "capistrano-puma: The puma.rb configuration file no longer explicitly sets daemonize to true. Add the --daemon flag if you reuse that file elsewhere (e.g. 'puma -C path/to/puma.rb --daemon')."
|
24
25
|
end
|
@@ -11,8 +11,8 @@ namespace :load do
|
|
11
11
|
set :puma_pid, -> { File.join(shared_path, 'tmp', 'pids', 'puma.pid') }
|
12
12
|
set :puma_bind, -> { File.join('unix://', shared_path, 'tmp', 'sockets', 'puma.sock') }
|
13
13
|
set :puma_conf, -> { File.join(shared_path, 'puma.rb') }
|
14
|
-
set :puma_access_log, -> { File.join(shared_path, 'log', '
|
15
|
-
set :puma_error_log, -> { File.join(shared_path, 'log', '
|
14
|
+
set :puma_access_log, -> { File.join(shared_path, 'log', 'puma_access.log') }
|
15
|
+
set :puma_error_log, -> { File.join(shared_path, 'log', 'puma_error.log') }
|
16
16
|
set :puma_init_active_record, false
|
17
17
|
set :puma_preload_app, true
|
18
18
|
|
@@ -37,7 +37,7 @@ namespace :puma do
|
|
37
37
|
within current_path do
|
38
38
|
with rack_env: fetch(:puma_env) do
|
39
39
|
|
40
|
-
execute :bundle, 'exec', :puma, "-C #{fetch(:puma_conf)}"
|
40
|
+
execute :bundle, 'exec', :puma, "-C #{fetch(:puma_conf)} --daemon"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -77,7 +77,7 @@ namespace :puma do
|
|
77
77
|
execute :bundle, 'exec', :pumactl, "-S #{fetch(:puma_state)} #{command}"
|
78
78
|
else
|
79
79
|
# Puma is not running or state file is not present : Run it
|
80
|
-
execute :bundle, 'exec', :puma, "-C #{fetch(:puma_conf)}"
|
80
|
+
execute :bundle, 'exec', :puma, "-C #{fetch(:puma_conf)} --daemon"
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
@@ -109,20 +109,14 @@ namespace :puma do
|
|
109
109
|
|
110
110
|
|
111
111
|
def puma_workers
|
112
|
-
fetch(:puma_workers
|
112
|
+
fetch(:puma_workers, 0)
|
113
113
|
end
|
114
114
|
|
115
115
|
|
116
|
-
|
117
116
|
def puma_bind
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
"bind '#{bind}'"
|
122
|
-
end.join("\n")
|
123
|
-
else
|
124
|
-
"bind '#{fetch(:puma_bind)}'"
|
125
|
-
end
|
117
|
+
Array(fetch(:puma_bind)).collect do |bind|
|
118
|
+
"bind '#{bind}'"
|
119
|
+
end.join("\n")
|
126
120
|
end
|
127
121
|
|
128
122
|
def template_puma(from, to, role)
|
@@ -6,7 +6,6 @@ environment '<%= fetch(:puma_env) %>'
|
|
6
6
|
<% if fetch(:puma_tag) %>
|
7
7
|
tag '<%= fetch(:puma_tag)%>'
|
8
8
|
<% end %>
|
9
|
-
daemonize true
|
10
9
|
pidfile "<%=fetch(:puma_pid)%>"
|
11
10
|
state_path "<%=fetch(:puma_state)%>"
|
12
11
|
stdout_redirect '<%=fetch(:puma_access_log)%>', '<%=fetch(:puma_error_log)%>', true
|
@@ -3,5 +3,5 @@
|
|
3
3
|
#
|
4
4
|
check process <%= puma_monit_service_name %>
|
5
5
|
with pidfile "<%= fetch(:puma_pid) %>"
|
6
|
-
start program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec puma -C <%= fetch(:puma_conf) %>'"
|
6
|
+
start program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec puma -C <%= fetch(:puma_conf) %> --daemon'"
|
7
7
|
stop program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec pumactl -S <%= fetch(:puma_state) %> stop'"
|
@@ -3,7 +3,7 @@ app=$1;
|
|
3
3
|
cd $app || exit 1
|
4
4
|
|
5
5
|
if [ -e Gemfile ]; then
|
6
|
-
exec sh -c "exec bundle exec puma -C ../../shared/puma.rb"
|
6
|
+
exec sh -c "exec bundle exec puma -C ../../shared/puma.rb --daemon"
|
7
7
|
else
|
8
|
-
exec sh -c "exec puma -C ../../shared/puma.rb"
|
8
|
+
exec sh -c "exec puma -C ../../shared/puma.rb --daemon"
|
9
9
|
fi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -70,7 +70,9 @@ homepage: https://github.com/seuros/capistrano-puma
|
|
70
70
|
licenses:
|
71
71
|
- MIT
|
72
72
|
metadata: {}
|
73
|
-
post_install_message:
|
73
|
+
post_install_message: 'capistrano-puma: The puma.rb configuration file no longer explicitly
|
74
|
+
sets daemonize to true. Add the --daemon flag if you reuse that file elsewhere (e.g.
|
75
|
+
''puma -C path/to/puma.rb --daemon'').'
|
74
76
|
rdoc_options: []
|
75
77
|
require_paths:
|
76
78
|
- lib
|