capistrano3-puma 3.1.1 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 056f0e760a8050adbfa58de07ea92a2cd19155f6
4
- data.tar.gz: 3606335e1e591fa8ec64799560f3305537232662
2
+ SHA256:
3
+ metadata.gz: d3d97d6e6965faa5d7799a503e6730200c8f2c97c08a0eed22722bcde52927b4
4
+ data.tar.gz: 3b4616be230f21b14404d8c5581da21997458f6fff8e8eaf42d6c1532dea8ca7
5
5
  SHA512:
6
- metadata.gz: 33112a1a74246ab3b71228d1b0a29cf82c8a04b18408dda5607505ffb9e65519e5cb7d07d5239e75a28b73d99e7f05462d83e3a1421187316d76aa92d41247e3
7
- data.tar.gz: 45cf98d18423e1bf5da1a038051ceadfc2301b008120d1106ee749536f999bbd269f3bde6978c3c13723d4faa475d0c11c119971e52b60ca09c0dbc705049462
6
+ metadata.gz: 16b7475339b600ddddccf305fa5b02195e7be896771934d5577960425be2bc14737f544cfc76f63d7ffdc2e58acf3d00b585fc0f7a6730b4465dc63d877c1a18
7
+ data.tar.gz: 7432fbe4b4eac9c069c01da4774b0e12542ffb093112ea99ed8a177417ee994b94834b226d8d5e2072632eabcbabadd67361191d7981a449ce98b9e4cf17b52b
@@ -1,16 +1,18 @@
1
1
  ## Changelog
2
- - 3.1.0:
2
+ - 4.0.0:
3
+ - Support puma 4.x
4
+ - 3.1.0:
3
5
  - Don't load puma hooks by default.
4
6
  - 3.0.0:
5
- - Require capistrano 3.7+
6
- - Implement the plugin system
7
- - don't fail if puma was already running
8
- - Added :puma_daemonize option (default is false)
7
+ - Require capistrano 3.7+
8
+ - Implement the plugin system
9
+ - don't fail if puma was already running
10
+ - Added :puma_daemonize option (default is false)
9
11
 
10
12
  - 2.0.0:
11
- - Require puma 3.4+
12
- - Require Capistrano 3.5+
13
- - Require capistrano-bundler
13
+ - Require puma 3.4+
14
+ - Require Capistrano 3.5+
15
+ - Require capistrano-bundler
14
16
 
15
17
  - 1.2.0: add support for puma user for puma user @mcb & @seuros
16
18
  - 1.1.0: Set :puma_preload_app to false; Reload Monit after uploading any monit configuration; Always refresh Gemfile @rafaelgoulart @suhailpatel @sime
data/README.md CHANGED
@@ -36,6 +36,15 @@ To prevent loading the hooks of the plugin, add false to the load_hooks param.
36
36
  install_plugin Capistrano::Puma::Monit, load_hooks: false # Monit tasks without hooks
37
37
  ```
38
38
 
39
+ To make it work with rvm, rbenv and chruby, install the plugin after corresponding library inclusion.
40
+ ```ruby
41
+ # Capfile
42
+
43
+ require 'capistrano/rbenv'
44
+ require 'capistrano/puma'
45
+ install_plugin Capistrano::Puma
46
+ ```
47
+
39
48
  ### Config
40
49
 
41
50
  To list available tasks use `cap -T`
@@ -44,7 +53,7 @@ To upload puma config use:
44
53
  ```ruby
45
54
  cap production puma:config
46
55
  ```
47
- By default the file located in `shared/puma.config`
56
+ By default the file located in `shared/puma.rb`
48
57
 
49
58
 
50
59
  Ensure that `tmp/pids` and ` tmp/sockets log` are shared (via `linked_dirs`):
@@ -92,7 +101,7 @@ Multi-bind can be set with an array in the puma_bind variable
92
101
  ```ruby
93
102
  set :puma_bind, %w(tcp://0.0.0.0:9292 unix:///tmp/puma.sock)
94
103
  ```
95
- * Listening on tcp://0.0.0.0:9220
104
+ * Listening on tcp://0.0.0.0:9292
96
105
  * Listening on unix:///tmp/puma.sock
97
106
 
98
107
  ### Active Record
@@ -127,6 +136,7 @@ Configurable options, shown here with defaults: Please note the configuration op
127
136
  set :puma_daemonize, false
128
137
  set :puma_plugins, [] #accept array of plugins
129
138
  set :puma_tag, fetch(:application)
139
+ set :puma_restart_command, 'bundle exec puma'
130
140
 
131
141
  set :nginx_config_name, "#{fetch(:application)}_#{fetch(:stage)}"
132
142
  set :nginx_flags, 'fail_timeout=0'
@@ -135,9 +145,10 @@ Configurable options, shown here with defaults: Please note the configuration op
135
145
  set :nginx_sites_available_path, '/etc/nginx/sites-available'
136
146
  set :nginx_sites_enabled_path, '/etc/nginx/sites-enabled'
137
147
  set :nginx_socket_flags, fetch(:nginx_flags)
138
- set :nginx_ssl_certificate, "/etc/ssl/certs/{fetch(:nginx_config_name)}.crt"
139
- set :nginx_ssl_certificate_key, "/etc/ssl/private/{fetch(:nginx_config_name)}.key"
148
+ set :nginx_ssl_certificate, "/etc/ssl/certs/#{fetch(:nginx_config_name)}.crt"
149
+ set :nginx_ssl_certificate_key, "/etc/ssl/private/#{fetch(:nginx_config_name)}.key"
140
150
  set :nginx_use_ssl, false
151
+ set :nginx_downstream_uses_ssl, false
141
152
  ```
142
153
 
143
154
  __Notes:__ If you are setting values for variables that might be used by other plugins, use `append` instead of `set`. For example:
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency 'capistrano', '~> 3.7'
22
22
  spec.add_dependency 'capistrano-bundler'
23
- spec.add_dependency 'puma' , '~> 3.4'
23
+ spec.add_dependency 'puma' , '~> 4.0'
24
24
  spec.post_install_message = %q{
25
25
  All plugins need to be explicitly installed with install_plugin.
26
26
  Please see README.md
@@ -76,6 +76,7 @@ module Capistrano
76
76
  set_if_empty :puma_preload_app, false
77
77
  set_if_empty :puma_daemonize, false
78
78
  set_if_empty :puma_tag, ''
79
+ set_if_empty :puma_restart_command, 'bundle exec puma'
79
80
 
80
81
  # Chruby, Rbenv and RVM integration
81
82
  append :chruby_map_bins, 'puma', 'pumactl'
@@ -11,6 +11,7 @@ module Capistrano
11
11
  set_if_empty :nginx_http_flags, fetch(:nginx_flags)
12
12
  set_if_empty :nginx_socket_flags, fetch(:nginx_flags)
13
13
  set_if_empty :nginx_use_ssl, false
14
+ set_if_empty :nginx_downstream_uses_ssl, false
14
15
  end
15
16
 
16
17
  def define_tasks
@@ -1,3 +1,3 @@
1
1
  module Capistrano
2
- PUMAVERSION = '3.1.1'
2
+ PUMAVERSION = '4.0.0'
3
3
  end
@@ -39,7 +39,7 @@ namespace :puma do
39
39
  task :add do
40
40
  on roles(fetch(:puma_role)) do|role|
41
41
  begin
42
- sudo "/etc/init.d/puma add '#{current_path}' #{fetch(:puma_user, role.user)}"
42
+ sudo "/etc/init.d/puma add '#{current_path}' #{fetch(:puma_user, role.user)} '#{fetch(:puma_conf)}'"
43
43
  rescue => error
44
44
  warn error
45
45
  end
@@ -46,6 +46,7 @@ server {
46
46
  error_page 503 @503;
47
47
 
48
48
  location @puma_<%= fetch(:nginx_config_name) %> {
49
+ proxy_http_version 1.1;
49
50
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
50
51
  proxy_set_header Host $host;
51
52
  proxy_redirect off;
@@ -54,7 +55,11 @@ server {
54
55
  <% if fetch(:nginx_use_ssl) -%>
55
56
  proxy_set_header X-Forwarded-Proto https;
56
57
  <% else -%>
58
+ <% if fetch(:nginx_downstream_uses_ssl) -%>
59
+ proxy_set_header X-Forwarded-Proto https;
60
+ <% else -%>
57
61
  proxy_set_header X-Forwarded-Proto http;
62
+ <% end -%>
58
63
  <% end -%>
59
64
  proxy_pass http://puma_<%= fetch(:nginx_config_name) %>;
60
65
  # limit_req zone=one;
@@ -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 %>
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.1.1
4
+ version: 4.0.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: 2017-07-04 00:00:00.000000000 Z
11
+ date: 2019-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.4'
47
+ version: '4.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.4'
54
+ version: '4.0'
55
55
  description: Puma integration for Capistrano 3
56
56
  email:
57
57
  - Terminale@gmail.com
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.6.8
111
+ rubygems_version: 2.7.6
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Puma integration for Capistrano