puma-redeploy 0.4.2 → 0.4.3

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: bcf56320609f94a60b537570bcbad7d60e9bab8c8c7537381b589b9242aa5b70
4
- data.tar.gz: a4f4615e8d0e44635377f7e3c3b3f33c8b4c0e03b44a365cab64dbe8cdb90118
3
+ metadata.gz: 85bcaa8e7aa5f21015a2bc251b74e997282cec708b3dad7f8fd7a535afa01861
4
+ data.tar.gz: 62bc2f26c1761301ef0369d02bb8e7df5e5f756ac66a6b152b57bec8edd7bdfa
5
5
  SHA512:
6
- metadata.gz: 5c62bab8bc64b1c3004863c8194eaedb78da21183136bd6ee66c176e2fcf31740e75923aaace8cdb42ce20fe34cc98302514bb3b047a03dbb43affeb938c8cf3
7
- data.tar.gz: 3eb73e8ebbc13ae361bae2b4e350e3c169b2d99b77acf3ed54f0ed5986227c0a76aeea2f27b4099f41f436a4a211fdaac363ecd4fa3496bd8b582878d053728d
6
+ metadata.gz: '026328f064b8d9589902e5236eda5c030a3ab7f0abc12196ceb2a4b684ec44e172927ec8bfd3c739e9810e5c01e2cfa472be60c8b7e6b673a789578a962d08b6'
7
+ data.tar.gz: 5a350ec550b53b9a45cca883dfea0a9da792e076cc70d11573e28f4a115f04bcad00a1e9d9e4178624df5b5bf96357b223e8136f2ea6715011026502ee397a10
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.4.3
4
+
5
+ **Features:**
6
+
7
+ - Add DSL option to specify the puma restart method type
8
+
3
9
  ## v0.4.2
4
10
 
5
11
  **Fixes:**
data/README.md CHANGED
@@ -45,6 +45,8 @@ plugin :redeploy
45
45
  # Specify the redeploy watch file from an environment variable. This can a file system location or S3 URL. For example `/app/pkg/watch.me` or `s3://puma-test-app-archives/watch.me`.
46
46
  redeploy_watch_file ENV['WATCH_FILE']
47
47
 
48
+ # Specify the Puma restart method type. This can be :phased_restart or :restart. If not specified defaults to :phased_restart
49
+ redeploy_restart_method :restart
48
50
 
49
51
  # Specify the number of seconds between checking watch file. Defaults to 30.
50
52
  redeploy_watch_delay 15
@@ -16,6 +16,7 @@ Puma::Plugin.create do
16
16
  end
17
17
  end
18
18
  end
19
+
19
20
  def monitor_loop(handler, delay, launcher, logger)
20
21
  loop do
21
22
  sleep delay
@@ -31,6 +32,7 @@ def monitor_loop(handler, delay, launcher, logger)
31
32
 
32
33
  Puma::Redeploy::CommandRunner.new(commands: watch_file_data[:commands], logger:).run
33
34
 
34
- launcher.phased_restart
35
+ restart_method = launcher.options[:restart_method] || :phased_restart
36
+ launcher.send(restart_method)
35
37
  end
36
38
  end
@@ -18,5 +18,12 @@ module Puma
18
18
  def redeploy_logger(logger)
19
19
  @options[:redeploy_logger] = logger
20
20
  end
21
+
22
+ def redeploy_restart_method(restart_method)
23
+ raise "Invalid Puma restart method: #{restart_method}" unless %i[phased_restart
24
+ restart].include?(restart_method.to_sym)
25
+
26
+ @options[:restart_method] = restart_method
27
+ end
21
28
  end
22
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Redeploy
5
- VERSION = '0.4.2'
5
+ VERSION = '0.4.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-redeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - tbeauvais
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-01 00:00:00.000000000 Z
11
+ date: 2024-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3