hammer_cli_foreman 3.18.1 → 3.18.3

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: 654e57efea71eefcaac27aeebcf015cd4e258d303cd374b7bb3305670c5f9ae5
4
- data.tar.gz: 32b5ab61fededf354c1a37d6646f6180348c2ee9e27bc856538bd2584b4988d9
3
+ metadata.gz: 1be0b419c7a727ccb9e81835ce8d19e460e08d07366622690774bce7a16424bd
4
+ data.tar.gz: a71ce4dbeca01329b7ae7c13140793d69f8b6177de11257a9ce765421a6f7457
5
5
  SHA512:
6
- metadata.gz: 47dae7398a0a25c9d501af220f1cd519d0571c5fd1d41101d32bc744e4d17cf2cca26a6562fc128b6ff7be82d0e90b5d916eb2da438483cb83aa2c70072f4815
7
- data.tar.gz: c585e4bd9b64cc0e5dd6fc95e8a5e9b9078aa06f6fdaa81b4491498980d8815fd95d63c2547ed33f3b67dc852894ed4dc86275178849fc37bfc8f9e1380569b9
6
+ metadata.gz: 2ad863d0e5061412fb48e211e238b9f8db6e46851d45b2a5e335904cc89ea5a1b4d76730865fd70a4e8f53b03bbf47b504662454b8c4ba12d575e65b072b57b6
7
+ data.tar.gz: a10d96735ffb2ca9989584279027983ce4b0550cb3a8e20cb84666dd2a5a5a22ed0f755a41a4d29167b0b679c9d948aec87c0875d9133312a173591f92c02739
data/doc/release_notes.md CHANGED
@@ -1,5 +1,12 @@
1
1
  Release notes
2
2
  =============
3
+ ### 3.18.3 (2026-10-23)
4
+ * Fix release tag pattern and drop redundant manual gem push ([PR #667](https://github.com/theforeman/hammer-cli-foreman/pull/667))
5
+ * Extract displayMessage from validation errors ([PR #666](https://github.com/theforeman/hammer-cli-foreman/pull/666)), [#39372](http://projects.theforeman.org/issues/39372)
6
+
7
+ ### 3.18.2 (2026-10-23)
8
+ * Extract displayMessage from validation errors ([PR #666](https://github.com/theforeman/hammer-cli-foreman/pull/666)), [#39372](http://projects.theforeman.org/issues/39372)
9
+
3
10
  ### 3.18.1 (2026-03-04)
4
11
  * Provide empty provider_vm_specific_fields in cr::base, [#39126](http://projects.theforeman.org/issues/39126)
5
12
  * Always print vm data, even if the provider is absent, [#39125](http://projects.theforeman.org/issues/39125)
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForeman
2
2
  def self.version
3
- @version ||= Gem::Version.new "3.18.1"
3
+ @version ||= Gem::Version.new "3.18.3"
4
4
  end
5
5
  end
@@ -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.18.1
4
+ version: 3.18.3
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: 3.6.9
357
+ rubygems_version: 4.0.20
358
358
  specification_version: 4
359
359
  summary: Foreman commands for Hammer
360
360
  test_files: