hammer_cli_foreman 3.16.0 → 3.16.1
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_foreman/exception_handler.rb +1 -1
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ka/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/test/unit/exception_handler_test.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56ab16582d2722bf8d07e9af6b68460187a722a3824a89e5cd8c2cdc1cc1ac31
|
|
4
|
+
data.tar.gz: 1c10a0f3fe7bed5ba0f0a267cc4b124141747755f89c1de23baf050a3239652c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ccca7c0a3fc08162e74147fd81f0348c682a65d5af623ab910a62954d14b2173b2c73904bfe9ce35ab765122c40c626ca8336da184e483be83836f11832baf9
|
|
7
|
+
data.tar.gz: 69383dd8c5efd59a2b52489b4a085f4b346baa35468f1ea7f2cd57bdd13db49775c76e67c03dabe5b92ecc76bdac49b22dbd985d3d84d2467ec629bf448e31de
|
|
@@ -35,7 +35,7 @@ module HammerCLIForeman
|
|
|
35
35
|
def handle_unprocessable_entity(e)
|
|
36
36
|
response = JSON.parse(e.response)
|
|
37
37
|
response = HammerCLIForeman.record_to_common_format(response) unless response.has_key?('message')
|
|
38
|
-
print_error response['message'] || response['full_messages']
|
|
38
|
+
print_error response['message'] || response['full_messages'] || response['displayMessage']
|
|
39
39
|
HammerCLI::EX_DATAERR
|
|
40
40
|
end
|
|
41
41
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -29,6 +29,17 @@ describe HammerCLIForeman::ExceptionHandler do
|
|
|
29
29
|
_(err_code).must_equal HammerCLI::EX_DATAERR
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
it "should print displayMessage on unprocessable entity exception" do
|
|
33
|
+
response = <<-RESPONSE
|
|
34
|
+
{"displayMessage":"Validation failed: Cannot add content view environment to content facet.","errors":{"base":["Cannot add content view environment to content facet."]}}
|
|
35
|
+
RESPONSE
|
|
36
|
+
|
|
37
|
+
ex = RestClient::UnprocessableEntity.new(response)
|
|
38
|
+
output.expects(:print_error).with(heading, "Validation failed: Cannot add content view environment to content facet.")
|
|
39
|
+
err_code = handler.handle_exception(ex, :heading => heading)
|
|
40
|
+
_(err_code).must_equal HammerCLI::EX_DATAERR
|
|
41
|
+
end
|
|
42
|
+
|
|
32
43
|
it "should handle argument error" do
|
|
33
44
|
ex = ArgumentError.new
|
|
34
45
|
output.expects(:print_error).with(heading, ex.message)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hammer_cli_foreman
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.16.
|
|
4
|
+
version: 3.16.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tomáš Strachota
|
|
@@ -354,7 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
354
354
|
- !ruby/object:Gem::Version
|
|
355
355
|
version: '0'
|
|
356
356
|
requirements: []
|
|
357
|
-
rubygems_version:
|
|
357
|
+
rubygems_version: 4.0.22
|
|
358
358
|
specification_version: 4
|
|
359
359
|
summary: Foreman commands for Hammer
|
|
360
360
|
test_files:
|