hammer_cli_katello 0.13.3 → 0.13.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/lib/hammer_cli_katello/repository.rb +20 -4
- data/lib/hammer_cli_katello/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4556bee10b52aedbf3caa32c550a164d21ff2ca7
|
4
|
+
data.tar.gz: 667182ec87a5e00546aca103c4edb87d7aeac9b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9e0a2894fad21f851f1c82393cc99515846e0175e0aecbd5a46c2fba5867f102359c4e49b2cc520e7ed848bf963af2ad5760776c1c1fd514b0524a1f1eef196
|
7
|
+
data.tar.gz: 71da3a347a16002c09230ccce59b0e65ed0e5225c31fe7e2a4f8808b0f395631d8ae018e63bf94198424e276e7c7eb92480f2590f2e33d8edd5e3d21f32304a9
|
@@ -238,8 +238,9 @@ module HammerCLIKatello
|
|
238
238
|
}
|
239
239
|
], last_file: true)
|
240
240
|
print_message _("Repository updated")
|
241
|
-
rescue
|
241
|
+
rescue => e
|
242
242
|
@failure = true
|
243
|
+
logger.error e
|
243
244
|
output.print_error _("Failed to upload tag '%s' to repository.") % tag
|
244
245
|
ensure
|
245
246
|
content_upload_resource.call(:destroy, :repository_id => get_identifier, :id => upload_id)
|
@@ -282,7 +283,7 @@ module HammerCLIKatello
|
|
282
283
|
|
283
284
|
resource :repositories, :upload_content
|
284
285
|
command_name "upload-content"
|
285
|
-
CONTENT_CHUNK_SIZE =
|
286
|
+
CONTENT_CHUNK_SIZE = 2_500_000 # bytes to make sure it's lower than django's default 2621440
|
286
287
|
|
287
288
|
class BinaryPath < HammerCLI::Options::Normalizers::File
|
288
289
|
def format(path)
|
@@ -379,8 +380,9 @@ module HammerCLIKatello
|
|
379
380
|
], opts)
|
380
381
|
|
381
382
|
print_results(filename, results)
|
382
|
-
rescue
|
383
|
+
rescue => e
|
383
384
|
@failure = true
|
385
|
+
logger.error e
|
384
386
|
output.print_error _("Failed to upload file '%s' to repository. Please check "\
|
385
387
|
"the file and try again.") % filename
|
386
388
|
ensure
|
@@ -405,7 +407,11 @@ module HammerCLIKatello
|
|
405
407
|
:multipart => true
|
406
408
|
}
|
407
409
|
|
408
|
-
|
410
|
+
# To workaround rest-client bug with false negative warnings,
|
411
|
+
# see https://github.com/rest-client/rest-client/pull/670 for more details
|
412
|
+
silence_warnings do
|
413
|
+
content_upload_resource.call(:update, params, request_headers)
|
414
|
+
end
|
409
415
|
offset += CONTENT_CHUNK_SIZE
|
410
416
|
end
|
411
417
|
end
|
@@ -441,6 +447,16 @@ module HammerCLIKatello
|
|
441
447
|
end
|
442
448
|
end
|
443
449
|
end
|
450
|
+
|
451
|
+
def silence_warnings
|
452
|
+
original_verbose = $VERBOSE
|
453
|
+
$VERBOSE = nil
|
454
|
+
begin
|
455
|
+
yield
|
456
|
+
ensure
|
457
|
+
$VERBOSE = original_verbose
|
458
|
+
end
|
459
|
+
end
|
444
460
|
end
|
445
461
|
# rubocop:enable ClassLength
|
446
462
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
@@ -34,7 +34,7 @@ authors:
|
|
34
34
|
autorequire:
|
35
35
|
bindir: bin
|
36
36
|
cert_chain: []
|
37
|
-
date: 2018-
|
37
|
+
date: 2018-07-19 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: hammer_cli_foreman
|