cicd-builder 0.9.39 → 0.9.40

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
  SHA1:
3
- metadata.gz: 427d7e067931f7a957d202d109adda34eefc9174
4
- data.tar.gz: b2066706ce2657e5c63e196e6728b65ddcd43487
3
+ metadata.gz: 18260696b0b012ac7829365baf9563565d756772
4
+ data.tar.gz: 3f62a59b205626956a73875be89bd1ef52b5ba2e
5
5
  SHA512:
6
- metadata.gz: f6cabfe0f0da509dd798ca359d4591182be418617d8cc8e2e5d8f6e43de2035063eca7a30f25a324109bc5e5412d8ea16fc8a7c179caad6dd8eaeaa76788238a
7
- data.tar.gz: 63fcbf4b39d8fdb15decfef21322d9e7946a257e22160bb91ba455dcedc25b719727dbdb91c9f918d230ea5c9a08228a532496ba57855b2e15a87efa6bfff27f
6
+ metadata.gz: 35e767175775594fa15a1156b54e6d33fa521ab23d2002ed97b1de252a4d171a5f5caf428f39c8f5809b52b008d81c3aaf43ee2775104a9d979ad6934ef6e7d4
7
+ data.tar.gz: 3257f84bf9bbd4a24346cc6d106f3a602815a039d380b5d4cff0a1f2cb88d64abe5c48ce6204b12a32f8cf596f504cac54508f9fd2679051f4ce6742b973a804
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cicd-builder (0.9.39)
4
+ cicd-builder (0.9.40)
5
5
  artifactory (>= 2.2.1, < 2.3)
6
6
  awesome_print (>= 1.6, < 2.0)
7
7
  aws-sdk (>= 2.0, < 2.1)
@@ -180,6 +180,7 @@ module CiCd
180
180
  stat = File.stat(local)
181
181
  size = stat.size
182
182
  end
183
+ @logger.debug "Calculate etag to match #{etag}"
183
184
  match = etag.match(%r'-(\d+)$')
184
185
  check = if match
185
186
  require 's3etag'
@@ -189,13 +190,16 @@ module CiCd
189
190
  part_size = mbs * 1024 * 1024
190
191
  chkit = S3Etag.calc(file: local, threshold: part_size, min_part_size: part_size, max_parts: parts)
191
192
  @logger.debug "S3Etag Calculated #{chkit} : (#{size} / #{part_size}) <= #{parts}"
192
- while chkit != etag and (size / part_size) <= parts
193
+ chunks = size / part_size
194
+ while chkit != etag and chunks <= parts and chunks > 0 and (size > part_size)
193
195
  # Go one larger if a modulus remains and we have the right number of parts
194
196
  mbs += 1
195
197
  part_size = mbs * 1024 * 1024
198
+ chunks = size.to_f / part_size
196
199
  chkit = S3Etag.calc(file: local, threshold: part_size, min_part_size: part_size, max_parts: parts)
197
200
  @logger.debug "S3Etag Calculated #{chkit} : (#{size} / #{part_size}) <= #{parts}"
198
201
  end
202
+ raise "Unable to match etag #{etag}!" if chkit != etag
199
203
  chkit
200
204
  else
201
205
  Digest::MD5.file(local).hexdigest
@@ -4,7 +4,7 @@ module CiCd
4
4
  # file = File.expand_path("#{File.dirname(__FILE__)}/../../../VERSION")
5
5
  # lines = File.readlines(file)
6
6
  # version = lines[0]
7
- version = '0.9.39'
7
+ version = '0.9.40'
8
8
  VERSION = version unless const_defined?('VERSION')
9
9
  major, minor, tiny = VERSION.split('.')
10
10
  MAJOR = major unless const_defined?('MAJOR')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cicd-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.39
4
+ version: 0.9.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christo De Lange