capistrano3-puma 3.0.2 → 5.0.0.beta1

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.
@@ -4,7 +4,7 @@ directory '<%= current_path %>'
4
4
  rackup "<%=fetch(:puma_rackup)%>"
5
5
  environment '<%= fetch(:puma_env) %>'
6
6
  <% if fetch(:puma_tag) %>
7
- tag '<%= fetch(:puma_tag)%>'
7
+ tag '<%= fetch(:puma_tag)%>'
8
8
  <% end %>
9
9
  pidfile "<%=fetch(:puma_pid)%>"
10
10
  state_path "<%=fetch(:puma_state)%>"
@@ -28,6 +28,8 @@ worker_timeout <%= fetch(:puma_worker_timeout).to_i %>
28
28
  daemonize
29
29
  <% end %>
30
30
 
31
+ restart_command '<%= fetch(:puma_restart_command) %>'
32
+
31
33
  <% if puma_preload_app? %>
32
34
  preload_app!
33
35
  <% else %>
@@ -0,0 +1,18 @@
1
+ [Unit]
2
+ Description=Puma HTTP Server for <%= "#{fetch(:application)} (#{fetch(:stage)})" %>
3
+ After=network.target
4
+
5
+ [Service]
6
+ Type=simple
7
+ User=<%= puma_user(@role) %>
8
+ WorkingDirectory=<%= current_path %>
9
+ ExecStart=<%= SSHKit.config.command_map[:bundle] %> exec puma -C <%= fetch(:puma_conf) %>
10
+ ExecReload=/bin/kill -TSTP $MAINPID
11
+ ExecStop=/bin/kill -TERM $MAINPID
12
+ StandardOutput=append:<%= fetch(:puma_access_log) %>
13
+ StandardError=append:<%= fetch(:puma_error_log) %>
14
+
15
+ Restart=always
16
+
17
+ [Install]
18
+ WantedBy=multi-user.target
@@ -1,9 +1,20 @@
1
1
  #!/bin/bash
2
- app=$1;
3
- cd $app || exit 1
4
2
 
5
- if [ -e Gemfile ]; then
6
- exec <%= fetch(:puma_user) ? "sudo -u #{puma_user(@role)}" : '' %> sh -c "exec bundle exec puma -C <%= fetch(:puma_conf) %> --daemon"
7
- else
8
- exec <%= fetch(:puma_user) ? "sudo -u #{puma_user(@role)}" : '' %> sh -c "exec puma -C <%= fetch(:puma_conf) %> --daemon"
3
+ # source ENV variables manually
4
+ . /etc/environment
5
+ # on system boot, and root have no rbenv installed,
6
+ # after start-stop-daemon switched to current user, we have to init rbenv
7
+ if [ -d "$HOME/.rbenv/bin" ]; then
8
+ PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
9
+ eval "$(rbenv init -)"
10
+ elif [ -d "/usr/local/rbenv/bin" ]; then
11
+ PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH"
12
+ eval "$(rbenv init -)"
13
+ elif [ -f /usr/local/rvm/scripts/rvm ]; then
14
+ source /etc/profile.d/rvm.sh
15
+ elif [ -f "$HOME/.rvm/scripts/rvm" ]; then
16
+ source "$HOME/.rvm/scripts/rvm"
9
17
  fi
18
+
19
+ app=$1; config=$2; log=$3;
20
+ cd $app && exec bundle exec puma -C $config 2>&1 >> $log
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: 3.0.2
4
+ version: 5.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2020-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -42,16 +42,22 @@ dependencies:
42
42
  name: puma
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.4'
47
+ version: '4.0'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '6.0'
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
- - - "~>"
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '4.0'
58
+ - - "<"
53
59
  - !ruby/object:Gem::Version
54
- version: '3.4'
60
+ version: '6.0'
55
61
  description: Puma integration for Capistrano 3
56
62
  email:
57
63
  - Terminale@gmail.com
@@ -68,20 +74,25 @@ files:
68
74
  - Rakefile
69
75
  - capistrano3-puma.gemspec
70
76
  - lib/capistrano/puma.rb
77
+ - lib/capistrano/puma/daemon.rb
71
78
  - lib/capistrano/puma/jungle.rb
72
79
  - lib/capistrano/puma/monit.rb
73
80
  - lib/capistrano/puma/nginx.rb
81
+ - lib/capistrano/puma/systemd.rb
74
82
  - lib/capistrano/puma/version.rb
75
83
  - lib/capistrano/puma/workers.rb
84
+ - lib/capistrano/tasks/daemon.rake
76
85
  - lib/capistrano/tasks/jungle.rake
77
86
  - lib/capistrano/tasks/monit.rake
78
87
  - lib/capistrano/tasks/nginx.rake
79
88
  - lib/capistrano/tasks/puma.rake
89
+ - lib/capistrano/tasks/systemd.rake
80
90
  - lib/capistrano/tasks/workers.rake
81
91
  - lib/capistrano/templates/nginx_conf.erb
82
92
  - lib/capistrano/templates/puma-deb.erb
83
93
  - lib/capistrano/templates/puma-rpm.erb
84
94
  - lib/capistrano/templates/puma.rb.erb
95
+ - lib/capistrano/templates/puma.service.erb
85
96
  - lib/capistrano/templates/puma_monit.conf.erb
86
97
  - lib/capistrano/templates/run-puma.erb
87
98
  - lib/capistrano3-puma.rb
@@ -91,8 +102,8 @@ homepage: https://github.com/seuros/capistrano-puma
91
102
  licenses:
92
103
  - MIT
93
104
  metadata: {}
94
- post_install_message: "\n [capistrano-puma] Plugins need to be explicitly installed
95
- with install_plugin.\n Please see README.md\n "
105
+ post_install_message: "\n All plugins need to be explicitly installed with install_plugin.\n
106
+ \ Please see README.md\n "
96
107
  rdoc_options: []
97
108
  require_paths:
98
109
  - lib
@@ -103,13 +114,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
114
  version: 1.9.3
104
115
  required_rubygems_version: !ruby/object:Gem::Requirement
105
116
  requirements:
106
- - - ">="
117
+ - - ">"
107
118
  - !ruby/object:Gem::Version
108
- version: '0'
119
+ version: 1.3.1
109
120
  requirements: []
110
- rubyforge_project:
111
- rubygems_version: 2.6.8
112
- signing_key:
121
+ rubygems_version: 3.0.3
122
+ signing_key:
113
123
  specification_version: 4
114
124
  summary: Puma integration for Capistrano
115
125
  test_files: []