puma-redeploy 0.4.2 → 0.4.4
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/.rubocop.yml +5 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile +8 -8
- 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/s3_handler.rb +3 -2
- data/lib/puma/redeploy/version.rb +1 -1
- data/puma-redeploy.gemspec +2 -1
- metadata +21 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94f2d31f7ed9dbda59575449c86095023cda04a7e6f5440975d906573df9c0fd
|
4
|
+
data.tar.gz: 5bc16aa6e1f27200a5f27e67be24d8bd2b358e69ae83b13e53688f9ecd59d5e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b0435521dd905f73eca0bd1aa3e0156aed936652debede98abf45112ebed3ab75efd1582cb320af03c727ebe2d572c473bb2436df905f2a58bbe69f06eb5133
|
7
|
+
data.tar.gz: 97f123b9732e7e25ad788e76db42ac35cc9eb7549a9085856bb32e49878807f59f1dcbe30a68b09affbb6e28959896049bab4769f8e2dce363ebfacd97de784a
|
data/.rubocop.yml
CHANGED
@@ -6,7 +6,7 @@ AllCops:
|
|
6
6
|
Exclude:
|
7
7
|
- 'lib/puma-redeploy.rb'
|
8
8
|
|
9
|
-
|
9
|
+
plugins:
|
10
10
|
- rubocop-rake
|
11
11
|
- rubocop-performance
|
12
12
|
- rubocop-rspec
|
@@ -35,3 +35,7 @@ RSpec/StubbedMock:
|
|
35
35
|
|
36
36
|
RSpec/MessageSpies:
|
37
37
|
Enabled: false
|
38
|
+
|
39
|
+
# Need to look into this one
|
40
|
+
ThreadSafety/DirChdir:
|
41
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.2
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -5,11 +5,11 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in puma-redeploy.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem 'rake'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rubocop'
|
11
|
-
gem 'rubocop-performance'
|
12
|
-
gem 'rubocop-rake'
|
13
|
-
gem 'rubocop-rspec'
|
14
|
-
gem 'rubocop-thread_safety'
|
15
|
-
gem 'timecop'
|
8
|
+
gem 'rake'
|
9
|
+
gem 'rspec'
|
10
|
+
gem 'rubocop'
|
11
|
+
gem 'rubocop-performance'
|
12
|
+
gem 'rubocop-rake'
|
13
|
+
gem 'rubocop-rspec'
|
14
|
+
gem 'rubocop-thread_safety'
|
15
|
+
gem 'timecop'
|
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
|
@@ -61,8 +61,9 @@ module Puma
|
|
61
61
|
logger.info "The S3 object #{bucket_name}/#{object_key} does not exist"
|
62
62
|
0
|
63
63
|
end
|
64
|
-
rescue StandardError
|
65
|
-
|
64
|
+
rescue StandardError
|
65
|
+
# TODO: handle object missing vs access denied. For now disable logging to avoid spam
|
66
|
+
# logger.warn "Error accessing the S3 object #{bucket_name}/#{object_key}. Error:#{e.message}"
|
66
67
|
0
|
67
68
|
end
|
68
69
|
end
|
data/puma-redeploy.gemspec
CHANGED
@@ -30,7 +30,8 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.bindir = 'bin'
|
31
31
|
spec.require_paths = ['lib']
|
32
32
|
|
33
|
-
spec.
|
33
|
+
spec.add_dependency 'aws-sdk-s3'
|
34
|
+
spec.add_dependency 'nokogiri'
|
34
35
|
|
35
36
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
36
37
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tbeauvais
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: nokogiri
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Puma plugin to redeploy and reload app from a remote artifact. This will
|
28
42
|
detect app changes, once detected a new artifact will be pulled and the app will
|
29
43
|
be reloaded.
|
@@ -40,6 +54,7 @@ files:
|
|
40
54
|
- ".gitignore"
|
41
55
|
- ".rspec"
|
42
56
|
- ".rubocop.yml"
|
57
|
+
- ".ruby-version"
|
43
58
|
- CHANGELOG.md
|
44
59
|
- CODE_OF_CONDUCT.md
|
45
60
|
- Gemfile
|
@@ -67,7 +82,7 @@ metadata:
|
|
67
82
|
source_code_uri: https://github.com/tbeauvais/puma-redeploy
|
68
83
|
changelog_uri: https://github.com/tbeauvais/puma-redeploy/CHANGELOG.md
|
69
84
|
rubygems_mfa_required: 'true'
|
70
|
-
post_install_message:
|
85
|
+
post_install_message:
|
71
86
|
rdoc_options: []
|
72
87
|
require_paths:
|
73
88
|
- lib
|
@@ -82,8 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
97
|
- !ruby/object:Gem::Version
|
83
98
|
version: '0'
|
84
99
|
requirements: []
|
85
|
-
rubygems_version: 3.
|
86
|
-
signing_key:
|
100
|
+
rubygems_version: 3.4.20
|
101
|
+
signing_key:
|
87
102
|
specification_version: 4
|
88
103
|
summary: Puma plugin to redeploy and reload app from artifact.
|
89
104
|
test_files: []
|