puma-redeploy 0.4.1 → 0.4.3
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +2 -0
- data/lib/puma/plugin/redeploy.rb +3 -1
- data/lib/puma/redeploy/dsl.rb +7 -0
- data/lib/puma/redeploy/version.rb +1 -1
- data/lib/puma/redeploy/zip_deployer.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85bcaa8e7aa5f21015a2bc251b74e997282cec708b3dad7f8fd7a535afa01861
|
4
|
+
data.tar.gz: 62bc2f26c1761301ef0369d02bb8e7df5e5f756ac66a6b152b57bec8edd7bdfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '026328f064b8d9589902e5236eda5c030a3ab7f0abc12196ceb2a4b684ec44e172927ec8bfd3c739e9810e5c01e2cfa472be60c8b7e6b673a789578a962d08b6'
|
7
|
+
data.tar.gz: 5a350ec550b53b9a45cca883dfea0a9da792e076cc70d11573e28f4a115f04bcad00a1e9d9e4178624df5b5bf96357b223e8136f2ea6715011026502ee397a10
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/puma/plugin/redeploy.rb
CHANGED
@@ -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
|
data/lib/puma/redeploy/dsl.rb
CHANGED
@@ -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
|
@@ -18,7 +18,7 @@ module Puma
|
|
18
18
|
stdout, stderr, status = Open3.capture3("unzip -o -K #{source}")
|
19
19
|
@logger.info "stdout: #{stdout}"
|
20
20
|
@logger.info "stderr: #{stderr}"
|
21
|
-
@logger.info "status: #{status
|
21
|
+
@logger.info "status: #{status&.exitstatus}"
|
22
22
|
end
|
23
23
|
end
|
24
24
|
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.
|
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-
|
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
|