capistrano-ops 1.0.8 → 1.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb9a8459b0906318eb8149333da576558e4f232c35ca3bd453756a1ba4031036
4
- data.tar.gz: e6e1342c6a847e029583db4824b1f69e63b687db53f42ce3f6e4e933d5d7aa27
3
+ metadata.gz: c704ca49f84574a85d2c47a54a03973232d6186275e95d8058821b9576594f8b
4
+ data.tar.gz: dd1da7bb882eed3d1d94c7d3e7207747a7ec882308d7c6d543eaddffaf2da615
5
5
  SHA512:
6
- metadata.gz: b8e3b49f6fc1fbc179713f06ec82a06b3e6bc953b256ad1f5e6b564ff47a28c9d3705e4e4b8add425de28aea1e0d5830fa055b42c9a6bc46d2244f5e645d3fb3
7
- data.tar.gz: 19516277d0a171017ad63b526f602a47056ab469defe6d6b3e5292ffe9a1a0221ed8dedd5e2012d49ea4dca5c233eb283d11fd05df6111a723a9bf13e48d5867
6
+ metadata.gz: '011919060f16a1ac77da503fb9fda693a46a77f62ecba22946fc38c02c3a93f89f88ac92439813c7e533af9219f8bd9d8bb62fad3fd70fea0c9e783443f108f6'
7
+ data.tar.gz: a04fdf286d5cb8be105da2304d85011c063b3906d6d32d11923e678cd3433917e6da0db1a869048d97d26e1945530cc99e3435ba32520b686dfc9d25c59b5b5a
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
20
20
  s.require_paths = ['lib']
21
21
 
22
- s.required_ruby_version = '>= 2.7.0', '< 3.3.0'
22
+ s.required_ruby_version = '>= 2.7.0', '< 3.4.0'
23
23
  s.add_dependency 'aws-sdk-s3', '~> 1.175'
24
24
  s.add_dependency 'faraday'
25
25
  s.add_dependency 'nokogiri'
@@ -56,8 +56,6 @@ module Backup
56
56
 
57
57
  uploaded_size = 0
58
58
 
59
- # Initiate multipart upload
60
-
61
59
  # Upload the tar.gz data from the file in parts
62
60
  part_number = 1
63
61
  parts = []
@@ -66,12 +64,12 @@ module Backup
66
64
  total_wait_time = 0
67
65
 
68
66
  begin
67
+ multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
69
68
  File.open(file_path, 'rb') do |file|
70
69
  while (part = file.read(chunk_size)) # Read calculated chunk size
71
70
  retry_count = 0
72
71
  begin
73
72
  # Initiate multipart upload
74
- multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
75
73
  part_upload = s3_client.upload_part(
76
74
  bucket: bucket,
77
75
  key: key,
@@ -156,11 +154,11 @@ module Backup
156
154
  total_wait_time = 0
157
155
 
158
156
  begin
157
+ # Initiate multipart upload
158
+ multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
159
159
  while (part = read_io.read(chunk_size)) # Read calculated chunk size
160
160
  retry_count = 0
161
161
  begin
162
- # Initiate multipart upload
163
- multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
164
162
  part_upload = s3_client.upload_part(
165
163
  bucket: bucket,
166
164
  key: key,
@@ -225,8 +223,6 @@ module Backup
225
223
  end
226
224
  # rubocop:enable Metrics/MethodLength
227
225
 
228
- private
229
-
230
226
  def start_writer_thread(folder_path, write_io)
231
227
  Thread.new do
232
228
  parent_folder = File.dirname(folder_path)
@@ -32,7 +32,7 @@ module Backup
32
32
 
33
33
  def calculate_chunk_size(total_size)
34
34
  max_chunks = 10_000
35
- min_chunk_size = 20 * 1024 * 1024 # 20MB
35
+ min_chunk_size = 50 * 1024 * 1024 # 50MB
36
36
  max_chunk_size = 105 * 1024 * 1024 # 105MB
37
37
  chunk_size = [total_size / max_chunks, min_chunk_size].max
38
38
  [chunk_size, max_chunk_size].min
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capistrano
4
4
  module Ops
5
- VERSION = '1.0.8'
5
+ VERSION = '1.0.10'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Crusius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-16 00:00:00.000000000 Z
11
+ date: 2025-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -223,7 +223,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
223
223
  version: 2.7.0
224
224
  - - "<"
225
225
  - !ruby/object:Gem::Version
226
- version: 3.3.0
226
+ version: 3.4.0
227
227
  required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - ">="