puma-redeploy 0.3.4 → 0.4.1

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: 9c3ab66d43e2e0873f599be9539d9ed53a3cb9e6903559d14e99e6621948bb1a
4
- data.tar.gz: 16cb84d8f89796065d3447d28af9bbfefd8b9cfc7c628536010d7053402e7ee7
3
+ metadata.gz: e169bb626da9c5e902dcab601274ff12463346bfb8eea5efc7bafa2950e96cac
4
+ data.tar.gz: 6a15c8d7a7f403ab49b633f5ce9d96dd23e61eb1f1d3327ccee2241097e60578
5
5
  SHA512:
6
- metadata.gz: 378a9de4c851ed162ef10c3c8fe374cc9a0d54aeca59c09f94059c1371c1bad4915863a9b69f8ad7140f93a35e56efc607c5e0a4701be88859cf24f99093e27d
7
- data.tar.gz: ba10ba1dd934b22cc087b81a1086481c0b08bb33d47c6939c2f06a13eefd9aa0a19fa0767fef1388cc7643be7a34ec88047d787bb62b2edcdb146e9f2b22626d
6
+ metadata.gz: 34992846409fff5f842402b533de687ac523defaef84c687257d6894cd24ec80727181f23ca82fd96f34d5823b4f41049c32be0ee74a0bbb8b2c716b4b277b40
7
+ data.tar.gz: 66f1bf3e0cb9a754bb7e8e5fe3e11f6aee146df3ab725385260b1a08e59dc6f9b74ff3feb266418a712c7e71b79f83a3b61d8bd8a574f5b1b017ff00ae959519
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.4.1
4
+
5
+ **Fixes:**
6
+
7
+ - Fix issue when watch file is initially missing
8
+
9
+ ## v0.4.0
10
+
11
+ **Fixes and enhancements:**
12
+
13
+ - Fix the order when running commands to run after unzip archive. Also bump to 0.4.0
14
+
15
+
3
16
  ## v0.3.4
4
17
 
5
18
  **Features:**
@@ -1,11 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'puma-redeploy'
4
- # require 'puma/plugin'
5
- # require 'puma/redeploy/dsl'
6
- # require 'puma/redeploy/file_handler'
7
- # require 'puma/redeploy/file_deployer'
8
- # require 'puma/redeploy/deployer_factory'
9
4
  require 'logger'
10
5
 
11
6
  Puma::Plugin.create do
@@ -28,15 +23,14 @@ def monitor_loop(handler, delay, launcher, logger)
28
23
  next unless handler.needs_redeploy?
29
24
 
30
25
  watch_file_data = handler.watch_file_data
31
-
32
26
  archive_file = handler.archive_file(watch_file_data[:archive_location])
33
27
 
34
28
  logger.info "Puma phased_restart begin file=#{handler.watch_file} archive=#{archive_file}"
35
29
 
36
- Puma::Redeploy::CommandRunner.new(commands: watch_file_data[:commands], logger:).run
37
-
38
30
  handler.deploy(source: archive_file)
39
31
 
32
+ Puma::Redeploy::CommandRunner.new(commands: watch_file_data[:commands], logger:).run
33
+
40
34
  launcher.phased_restart
41
35
  end
42
36
  end
@@ -32,6 +32,8 @@ module Puma
32
32
 
33
33
  # old style where the file contains only the archive location
34
34
  { commands: [], archive_location: results }
35
+ rescue StandardError
36
+ {}
35
37
  end
36
38
 
37
39
  private
@@ -21,6 +21,7 @@ module Puma
21
21
  File.read(watch_file).strip
22
22
  rescue StandardError => e
23
23
  logger.warn "Error reading watch file #{watch_file}. Error:#{e.message}"
24
+ nil
24
25
  end
25
26
 
26
27
  def touched_at
@@ -49,6 +49,7 @@ module Puma
49
49
  object.body.read.strip
50
50
  rescue StandardError => e
51
51
  logger.warn "Error reading watch file #{bucket_name}/#{object_key}. Error:#{e.message}"
52
+ nil
52
53
  end
53
54
 
54
55
  def touched_at
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Redeploy
5
- VERSION = '0.3.4'
5
+ VERSION = '0.4.1'
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.3.4
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - tbeauvais
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-09 00:00:00.000000000 Z
11
+ date: 2024-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3