puma-redeploy 0.3.1 → 0.3.2

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: 95576842e0df654976d5f2ec42a799b6f069216f5904c1365aa77207bd8c9ba3
4
- data.tar.gz: 0211c3134cad5f3cdfc0982c5378cfbc5270d16360d030f2cee8b739c412e940
3
+ metadata.gz: 438b5a1a33d18652f621427ffcee0dab9a5ed4a867786e3a36300bf573441d0c
4
+ data.tar.gz: 477f2d13c06ec397c884714756154d23585f97fb5612d2105fb4f700b2c1a9de
5
5
  SHA512:
6
- metadata.gz: ff3c3600e965c7101b2a28803297a446d4be1fddc63d852341dde3114cf24a4d5ef9bac25556b2a3b4e1a3f51a8af54f25f04167d1ef9b49144e26e087acf893
7
- data.tar.gz: cf2d71b61daec38e7ad35a32a6c737ea995b9572637a378faa661fa6c895add5df2a9be5d99e8a518ff6f4b91ecb3263958680919313293023488177a22993e9
6
+ metadata.gz: 00df55137d4a94b9dde2c1b59060fb2a2e3fed0a07f281fe2fc323c878d79a24026ddec962110c42f15372b991b81d10953145948e16102e3eaf260f6348a503
7
+ data.tar.gz: 457965823bad1a219663774a4ad9dfb16e91993e86a744c768c3eeb90b5b0d2af438d17837c6cf58d216e15b77803e653d4fc6bd6c6c6eb625f56406e8b4c3ef
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.3.2
4
+
5
+ **Fixes and enhancements:**
6
+
7
+ - Improve s3 error handling
8
+
3
9
  ## v0.3.1
4
10
 
5
11
  **Fixes and enhancements:**
@@ -18,6 +18,8 @@ module Puma
18
18
 
19
19
  def archive_file
20
20
  s3_url = read_watch_object
21
+ return unless s3_url
22
+
21
23
  archive_bucket_name, archive_object_key = s3_object_reference(s3_url)
22
24
 
23
25
  response = s3_client.get_object(bucket: archive_bucket_name, key: archive_object_key)
@@ -26,6 +28,8 @@ module Puma
26
28
  # Write the object data to a local file
27
29
  File.binwrite(file_name, response.body.read)
28
30
  file_name
31
+ rescue StandardError => e
32
+ logger.warn "Error reading fetching archive file for #{s3_url}. Error:#{e.message}"
29
33
  end
30
34
 
31
35
  private
@@ -44,6 +48,8 @@ module Puma
44
48
  object = s3_client.get_object(bucket: bucket_name, key: object_key)
45
49
 
46
50
  object.body.read.strip
51
+ rescue StandardError => e
52
+ logger.warn "Error reading url from watch file #{bucket_name}/#{object_key}. Error:#{e.message}"
47
53
  end
48
54
 
49
55
  def touched_at
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Redeploy
5
- VERSION = '0.3.1'
5
+ VERSION = '0.3.2'
6
6
  end
7
7
  end
@@ -12,6 +12,8 @@ module Puma
12
12
  end
13
13
 
14
14
  def deploy(source:)
15
+ return unless source
16
+
15
17
  Dir.chdir(@target) do
16
18
  stdout, stderr, status = Open3.capture3("unzip -o -K #{source}")
17
19
  @logger.info "stdout: #{stdout}"
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.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tbeauvais
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-22 00:00:00.000000000 Z
11
+ date: 2023-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3