capistrano3-puma 5.1.1 → 5.2.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
  SHA256:
3
- metadata.gz: 35a491d73286ea1106e102209ae0f109db2505ebe1997ae4069ffdf063769dff
4
- data.tar.gz: aee6845893c931caeaf32b0c4c2e99ce2e9eebc8db28d9e225bbec687a7a6f77
3
+ metadata.gz: 98e0fb64cfd73c2183c8ac641ec0e426f1721657254eeae1b6cebea4d9b34e78
4
+ data.tar.gz: 658219686493acef08d13c050c6d3c8536c980a6820d3d1165dcb5c3e3c80f89
5
5
  SHA512:
6
- metadata.gz: 03f3f2f88622cbb6373f30569027d9df482a62ab41d0659023771fcf864dddf9b83d657967aaa1c8a9f82de6495f2cdd267219ec35b72289dd681d193ff48483
7
- data.tar.gz: 2e3391e54baebd42cce79ff8c41af3682843a7757d8bd4ca2de9e671f7cd020e802d2af0c131a49b83b617b82e03298182ee61eafda16ee3fc7e5474334e531e
6
+ metadata.gz: 2423e9acfe501fe4404592ae5099e619aa168e055372ea7e56762a001e59cbefbdf6d32373e7c003a6abe2fefcde429887bddb5d02d7806b8969fa92297d70ad
7
+ data.tar.gz: f629c899266cbc6a97b40243c1edfdfa7ba23e6f519f837e6c05209de2845261ca25a823a84ecbf1045fe8566845deff8fb71c7fee967e1c9b46d67896f9652b
data/CHANGELOG.md CHANGED
@@ -1,8 +1,16 @@
1
1
  # Changelog
2
2
 
3
- ## [5.1.1](https://github.com/seuros/capistrano-puma/tree/5.1.1) (2021-09-03)
3
+ ## [5.2.0](https://github.com/seuros/capistrano-puma/tree/5.2.0) (2021-09-11)
4
4
 
5
- [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.0...5.1.1)
5
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.1...5.2.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Add option for phased restart of puma [\#333](https://github.com/seuros/capistrano-puma/pull/333) ([phylor](https://github.com/phylor))
10
+
11
+ ## [v5.1.1](https://github.com/seuros/capistrano-puma/tree/v5.1.1) (2021-09-03)
12
+
13
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.0...v5.1.1)
6
14
 
7
15
  **Merged pull requests:**
8
16
 
data/README.md CHANGED
@@ -128,6 +128,12 @@ To use customize environment variables
128
128
  ]
129
129
  ```
130
130
 
131
+ To use [phased restart](https://github.com/puma/puma/blob/master/docs/restart.md) for zero downtime deployments:
132
+
133
+ ```ruby
134
+ set :puma_phased_restart, true
135
+ ```
136
+
131
137
  ### Systemd Socket Activation
132
138
 
133
139
  Systemd socket activation starts your app upon first request if it is not already running
@@ -192,6 +198,7 @@ Configurable options, shown here with defaults: Please note the configuration op
192
198
  set :puma_lingering_user, fetch(:user)
193
199
  set :puma_service_unit_env_file, nil
194
200
  set :puma_service_unit_env_vars, []
201
+ set :puma_phased_restart, false
195
202
 
196
203
  set :nginx_config_name, "#{fetch(:application)}_#{fetch(:stage)}"
197
204
  set :nginx_flags, 'fail_timeout=0'
data/Rakefile CHANGED
@@ -5,5 +5,5 @@ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
5
5
  config.user = 'seuros'
6
6
  config.project = 'capistrano-puma'
7
7
  config.issues = false
8
- config.future_release = '5.1.1'
8
+ config.future_release = '5.2.0'
9
9
  end
@@ -3,7 +3,7 @@ module Capistrano
3
3
  include PumaCommon
4
4
 
5
5
  def register_hooks
6
- after 'deploy:finished', 'puma:reload'
6
+ after 'deploy:finished', 'puma:smart_restart'
7
7
  end
8
8
 
9
9
  def define_tasks
@@ -17,6 +17,7 @@ module Capistrano
17
17
  set_if_empty :puma_systemctl_user, :system
18
18
  set_if_empty :puma_enable_lingering, -> { fetch(:puma_systemctl_user) != :system }
19
19
  set_if_empty :puma_lingering_user, -> { fetch(:user) }
20
+ set_if_empty :puma_phased_restart, -> { false }
20
21
  end
21
22
 
22
23
  def expanded_bundle_command
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Capistrano
2
- PUMAVERSION = '5.1.1'
4
+ PUMAVERSION = '5.2.0'
3
5
  end
@@ -90,6 +90,15 @@ namespace :puma do
90
90
  end
91
91
  end
92
92
 
93
+ desc 'Restarts or reloads Puma service via systemd'
94
+ task :smart_restart do
95
+ if fetch(:puma_phased_restart)
96
+ invoke 'puma:reload'
97
+ else
98
+ invoke 'puma:restart'
99
+ end
100
+ end
101
+
93
102
  desc 'Restart Puma service via systemd'
94
103
  task :restart do
95
104
  on roles(fetch(:puma_role)) do
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: 5.1.1
4
+ version: 5.2.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: 2021-09-03 00:00:00.000000000 Z
11
+ date: 2021-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano