foreman_templates 10.0.1 → 10.0.2

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
  SHA256:
3
- metadata.gz: 2512cb79f63ec81d066a6cc3c1cc2a4e94d54338eab9f078d65810ec83190d08
4
- data.tar.gz: 1d8235df97bbb7c6e5fd900157f0e513081afeff73bb42c20bc65a3544f4ebc7
3
+ metadata.gz: 77124631f7963a781df6866f42e0922a266027ad0134e35630d23457634034f7
4
+ data.tar.gz: e754a93d35ac579534588c894e9748d4ea008128082f29336b9645e2134fc45a
5
5
  SHA512:
6
- metadata.gz: f1b085f1d72243b6a618caa3d5c4c5b568f6be3009738551ae74c098725fdcdb3139a61dd21cb949acb3f6c396436de84a6a3a11de02d834f3dd4b6b2a55ac69
7
- data.tar.gz: a8257f3f8a8fc2509a4d4746f79b7c43b3c03996dddb1282ea199d06800e0d76b2680c585715cd3f20162c8aadc5b2c2a36a6b396db49102d38701c61777daca
6
+ metadata.gz: 2766a25a5f0aebe798619b947e1639861084b17959f696e789c25e4b53f1d613bdbc0379082b2adfb00b4db1ef7e0072f46c7218b494c2f61eed34fe34303d3f
7
+ data.tar.gz: 85c50c42fb8ac75ee95b51510e1a5c6d2b63ec19e93c2a3d016f9cf5f28f66253d1158b340dba503a5bc5debc5f0437da41f826a4ea511ff5f7d65880b7c2eba
@@ -16,7 +16,7 @@ module ForemanTemplates
16
16
  :additional_errors => @additional_errors,
17
17
  :additional_info => @additional_info,
18
18
  :exception => @exception&.message,
19
- :validation_errors => errors,
19
+ :validation_errors => transformed_errors,
20
20
  :file => @template_file,
21
21
  :type => @template.present? ? @template.class.name.underscore : nil
22
22
  }
@@ -27,9 +27,7 @@ module ForemanTemplates
27
27
  end
28
28
 
29
29
  def errors
30
- @template&.errors&.messages&.transform_values do |v|
31
- v.join(', ')
32
- end
30
+ @template&.errors
33
31
  end
34
32
 
35
33
  def corrupted_metadata
@@ -99,5 +97,13 @@ module ForemanTemplates
99
97
  nil
100
98
  end
101
99
  end
100
+
101
+ private
102
+
103
+ def transformed_errors
104
+ return {} unless errors
105
+
106
+ errors.to_hash.transform_values(&:last)
107
+ end
102
108
  end
103
109
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanTemplates
2
- VERSION = "10.0.1".freeze
2
+ VERSION = "10.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.1
4
+ version: 10.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-29 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy