hammer_cli_foreman 3.14.1 → 3.14.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76bbbe5060645db0ca02b867065dd761816ea20828e85c86ef0104de6b371596
|
|
4
|
+
data.tar.gz: f3f601e231923c78ad1f90ea8b5133dab9387fc2a9031a9d6cff5037a1bbebf2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94c8d1b23d02dea1a6e837328c57abb1c4954480cbadd41f5a12bc46687c228b5155065ba99ae467d0f52adb6bd47258b97cb5bc56152f8174ae4b4555582885
|
|
7
|
+
data.tar.gz: c22c438d7c43b68628cc6626e735ce7e3d0aa0bb22f1d5bd73ca4a66b04a07cc1e518bae388e585601c395878fcfc5f271f0481601df6756a2d63c88ee4a61e3
|
|
@@ -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
|
|
|
@@ -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,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hammer_cli_foreman
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.14.
|
|
4
|
+
version: 3.14.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tomáš Strachota
|
|
8
8
|
- Martin Bačovský
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: hammer_cli
|
|
@@ -80,6 +79,7 @@ email: tstracho@redhat.com
|
|
|
80
79
|
executables: []
|
|
81
80
|
extensions: []
|
|
82
81
|
extra_rdoc_files:
|
|
82
|
+
- README.md
|
|
83
83
|
- doc/configuration.md
|
|
84
84
|
- doc/developer_docs.md
|
|
85
85
|
- doc/host_create.md
|
|
@@ -89,7 +89,6 @@ extra_rdoc_files:
|
|
|
89
89
|
- doc/release_notes.md
|
|
90
90
|
- doc/testing.md
|
|
91
91
|
- doc/using_hammer_cli_foreman_command.md
|
|
92
|
-
- README.md
|
|
93
92
|
files:
|
|
94
93
|
- LICENSE
|
|
95
94
|
- README.md
|
|
@@ -341,7 +340,6 @@ homepage: https://github.com/theforeman/hammer-cli-foreman
|
|
|
341
340
|
licenses:
|
|
342
341
|
- GPL-3.0-or-later
|
|
343
342
|
metadata: {}
|
|
344
|
-
post_install_message:
|
|
345
343
|
rdoc_options: []
|
|
346
344
|
require_paths:
|
|
347
345
|
- lib
|
|
@@ -356,8 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
356
354
|
- !ruby/object:Gem::Version
|
|
357
355
|
version: '0'
|
|
358
356
|
requirements: []
|
|
359
|
-
rubygems_version:
|
|
360
|
-
signing_key:
|
|
357
|
+
rubygems_version: 4.0.22
|
|
361
358
|
specification_version: 4
|
|
362
359
|
summary: Foreman commands for Hammer
|
|
363
360
|
test_files:
|