capistrano3-puma 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5e6d7a282e15a64ea0a11d8e75715b8d1e7b5f9
4
- data.tar.gz: 96ddd46d8d8818de1e6741996cb49345bbdb9804
3
+ metadata.gz: 6eb1f47c6b33ef2ce0b2eb525a419d404592bf71
4
+ data.tar.gz: f83553ccc0af1fd138d47bd0d5842e2ca513e74e
5
5
  SHA512:
6
- metadata.gz: f759e225e50b35f2590a474dd0e260f9e822600e0843ce1b55cfc3eaf0f890bfee8a7db402ea063fa768ced9371ee2429a17d6731103446b54106f1c8cb28bbd
7
- data.tar.gz: a81853cc9b5b7bc62323ef0c868058481f271b8b7f5892ad77e729c633bb60e7a15543a2139e93d6a1819d172db48d72745be6186353088c848e0f2c30190428
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
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Puma
3
- VERSION = '0.5.1'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  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', 'puma_error.log') }
15
- set :puma_error_log, -> { File.join(shared_path, 'log', 'puma_access.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) || 0
112
+ fetch(:puma_workers, 0)
113
113
  end
114
114
 
115
115
 
116
-
117
116
  def puma_bind
118
- case fetch(:puma_bind)
119
- when Array
120
- fetch(:puma_bind).collect do |bind|
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.5.1
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-05-25 00:00:00.000000000 Z
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