foreman_openscap 10.0.1 → 10.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/services/foreman_openscap/lookup_key_overrider.rb +6 -5
  3. data/app/views/job_templates/run_openscap_remediation_-_ansible_default.erb +2 -0
  4. data/config/routes.rb +9 -16
  5. data/lib/foreman_openscap/version.rb +1 -1
  6. data/test/functional/openscap_proxies_controller_test.rb +0 -1
  7. metadata +3 -35
  8. data/locale/cs_CZ/foreman_openscap.edit.po +0 -1442
  9. data/locale/cs_CZ/foreman_openscap.po.time_stamp +0 -0
  10. data/locale/de/foreman_openscap.edit.po +0 -1454
  11. data/locale/de/foreman_openscap.po.time_stamp +0 -0
  12. data/locale/en/foreman_openscap.edit.po +0 -1439
  13. data/locale/en/foreman_openscap.po.time_stamp +0 -0
  14. data/locale/en_GB/foreman_openscap.edit.po +0 -1440
  15. data/locale/en_GB/foreman_openscap.po.time_stamp +0 -0
  16. data/locale/es/foreman_openscap.edit.po +0 -1449
  17. data/locale/es/foreman_openscap.po.time_stamp +0 -0
  18. data/locale/fr/foreman_openscap.edit.po +0 -1455
  19. data/locale/fr/foreman_openscap.po.time_stamp +0 -0
  20. data/locale/gl/foreman_openscap.edit.po +0 -1440
  21. data/locale/gl/foreman_openscap.po.time_stamp +0 -0
  22. data/locale/it/foreman_openscap.edit.po +0 -1442
  23. data/locale/it/foreman_openscap.po.time_stamp +0 -0
  24. data/locale/ja/foreman_openscap.edit.po +0 -1450
  25. data/locale/ja/foreman_openscap.po.time_stamp +0 -0
  26. data/locale/ka/foreman_openscap.edit.po +0 -1444
  27. data/locale/ka/foreman_openscap.po.time_stamp +0 -0
  28. data/locale/ko/foreman_openscap.edit.po +0 -1440
  29. data/locale/ko/foreman_openscap.po.time_stamp +0 -0
  30. data/locale/pt_BR/foreman_openscap.edit.po +0 -1454
  31. data/locale/pt_BR/foreman_openscap.po.time_stamp +0 -0
  32. data/locale/ru/foreman_openscap.edit.po +0 -1444
  33. data/locale/ru/foreman_openscap.po.time_stamp +0 -0
  34. data/locale/sv_SE/foreman_openscap.edit.po +0 -1440
  35. data/locale/sv_SE/foreman_openscap.po.time_stamp +0 -0
  36. data/locale/zh_CN/foreman_openscap.edit.po +0 -1449
  37. data/locale/zh_CN/foreman_openscap.po.time_stamp +0 -0
  38. data/locale/zh_TW/foreman_openscap.edit.po +0 -1441
  39. data/locale/zh_TW/foreman_openscap.po.time_stamp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb8777fbcfc38a616d360ca6b386ae905d321f9cd6bcc4c55031dd6e2202311b
4
- data.tar.gz: 36ff65d50b221f099122bd03cdcb88bc4e381763576f38c3e2675214330881d7
3
+ metadata.gz: a336811c9ef74e3f336a1ebe5e4ae7ede49fba1e34c20c1c805a211928ef5a05
4
+ data.tar.gz: 502cae89f02856e4263f6957cfad53e31079d67c8313563cf877d26bdf756782
5
5
  SHA512:
6
- metadata.gz: 282d877864a2dd6108381246abe2cada805afe3e9afcf64f2cab10066d52ac0023f33dd406030e30286f68d9ac2018ed2d8e208c901463741048b0d9489bbb39
7
- data.tar.gz: ca3fe8ca835caf8468f8afe661a828bf43ddaefd1b6d9278fb749f2667c0bded86b2d238d3392840862ded03153b6b5a1c62c8cfd0586422406d14d81eb3d54f
6
+ metadata.gz: 9f26b453c1b9ee555912eeff899498bdd60798ce72ab723265bf1c0444e0a9c01097736416817fd88d3891711be18973f87f684281c9b3d4d2de66d3308dc77d
7
+ data.tar.gz: 891f9abfeddfeaa612fff54d2f9c3dbcf21069e53a9092791a44b6389cd453983a83451058e04aa578369ead1e7a5b048a21540b7f1079eb7b146a3b406a3b09
@@ -15,9 +15,10 @@ module ForemanOpenscap
15
15
 
16
16
  def handle_config_not_available(config)
17
17
  return true if config.available?
18
- @policy.errors[:deploy_by] <<
18
+ @policy.errors.add(:deploy_by,
19
19
  _("%{type} was selected to deploy policy to clients, but %{type} is not available. Are you missing a plugin?") %
20
20
  { :type => config.type.to_s.camelize }
21
+ )
21
22
  false
22
23
  end
23
24
 
@@ -25,7 +26,7 @@ module ForemanOpenscap
25
26
  return true if item
26
27
  err = _("Required %{msg_name} %{class} was not found, please ensure it is imported first.") %
27
28
  { :class => config.config_item_name, :msg_name => config.msg_name }
28
- @policy.errors[:base] << err
29
+ @policy.errors.add(:base, err)
29
30
  false
30
31
  end
31
32
 
@@ -34,7 +35,7 @@ module ForemanOpenscap
34
35
  err = _("The following %{key_name} were missing for %{item_name}: %{key_names}. Make sure they are imported before proceeding.") %
35
36
  { :key_name => config.lookup_key_plural_name, :key_names => key_names, :item_name => config.config_item_name }
36
37
 
37
- @policy.errors[:base] << err
38
+ @policy.errors.add(:base, err)
38
39
  false
39
40
  end
40
41
 
@@ -52,9 +53,9 @@ module ForemanOpenscap
52
53
 
53
54
  def handle_param_override(config, param)
54
55
  if param.changed? && !param.save
55
- @policy.errors[:base] <<
56
+ @policy.errors.add(:base,
56
57
  _('Failed to save when overriding parameters for %{config_tool}, cause: %{errors}') %
57
- { :config_tool => config.type, :errors => param.errors.full_messages.join(', ') }
58
+ { :config_tool => config.type, :errors => param.errors.full_messages.join(', ') })
58
59
  return false
59
60
  end
60
61
  true
@@ -16,6 +16,8 @@ template_inputs:
16
16
  description: Indicate wether the host should be rebooted after all the remediation
17
17
  input_type: user
18
18
  required: false
19
+ require:
20
+ - plugin: foreman_ansible
19
21
  %>
20
22
  ---
21
23
  - hosts: all
data/config/routes.rb CHANGED
@@ -62,7 +62,7 @@ Rails.application.routes.draw do
62
62
 
63
63
  namespace :api, :defaults => { :format => 'json' } do
64
64
  scope "(:apiv)", :module => :v2, :defaults => { :apiv => 'v2' },
65
- :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
65
+ :apiv => /v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
66
66
  namespace :compliance do
67
67
  resources :scap_contents, :except => %i[new edit] do
68
68
  member do
@@ -95,6 +95,14 @@ Rails.application.routes.draw do
95
95
  post 'arf_reports/:cname/:policy_id/:date', \
96
96
  :constraints => { :cname => /[^\/]+/ }, :to => 'arf_reports#create'
97
97
  end
98
+
99
+ constraints(:id => %r{[^\/]+}) do
100
+ resources :hosts, :except => [:new, :edit] do
101
+ member do
102
+ get :policies_enc
103
+ end
104
+ end
105
+ end
98
106
  end
99
107
  end
100
108
  end
@@ -113,19 +121,4 @@ Foreman::Application.routes.draw do
113
121
  post 'openscap_proxy_changed'
114
122
  end
115
123
  end
116
-
117
- namespace :api do
118
- scope "(:api_version)", :module => :v2,
119
- :defaults => { :api_version => 'v2' },
120
- :api_version => /v2/,
121
- :constraints => ApiConstraints.new(:version => 2, :default => true) do
122
- constraints(:id => %r{[^\/]+}) do
123
- resources :hosts, :only => [] do
124
- member do
125
- get :policies_enc
126
- end
127
- end
128
- end
129
- end
130
- end
131
124
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanOpenscap
2
- VERSION = "10.0.1".freeze
2
+ VERSION = "10.0.2".freeze
3
3
  end
@@ -1,5 +1,4 @@
1
1
  require 'test_plugin_helper'
2
- require 'application_helper'
3
2
 
4
3
  class OpenscapProxiesControllerTest < ActionController::TestCase
5
4
  include ActionView::Helpers::DateHelper
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_openscap
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
  - slukasik@redhat.com
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-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -295,71 +295,39 @@ files:
295
295
  - lib/tasks/foreman_openscap_tasks.rake
296
296
  - locale/Makefile
297
297
  - locale/cs_CZ/LC_MESSAGES/foreman_openscap.mo
298
- - locale/cs_CZ/foreman_openscap.edit.po
299
298
  - locale/cs_CZ/foreman_openscap.po
300
- - locale/cs_CZ/foreman_openscap.po.time_stamp
301
299
  - locale/de/LC_MESSAGES/foreman_openscap.mo
302
- - locale/de/foreman_openscap.edit.po
303
300
  - locale/de/foreman_openscap.po
304
- - locale/de/foreman_openscap.po.time_stamp
305
301
  - locale/en/LC_MESSAGES/foreman_openscap.mo
306
- - locale/en/foreman_openscap.edit.po
307
302
  - locale/en/foreman_openscap.po
308
- - locale/en/foreman_openscap.po.time_stamp
309
303
  - locale/en_GB/LC_MESSAGES/foreman_openscap.mo
310
- - locale/en_GB/foreman_openscap.edit.po
311
304
  - locale/en_GB/foreman_openscap.po
312
- - locale/en_GB/foreman_openscap.po.time_stamp
313
305
  - locale/es/LC_MESSAGES/foreman_openscap.mo
314
- - locale/es/foreman_openscap.edit.po
315
306
  - locale/es/foreman_openscap.po
316
- - locale/es/foreman_openscap.po.time_stamp
317
307
  - locale/foreman_openscap.pot
318
308
  - locale/fr/LC_MESSAGES/foreman_openscap.mo
319
- - locale/fr/foreman_openscap.edit.po
320
309
  - locale/fr/foreman_openscap.po
321
- - locale/fr/foreman_openscap.po.time_stamp
322
310
  - locale/gl/LC_MESSAGES/foreman_openscap.mo
323
- - locale/gl/foreman_openscap.edit.po
324
311
  - locale/gl/foreman_openscap.po
325
- - locale/gl/foreman_openscap.po.time_stamp
326
312
  - locale/it/LC_MESSAGES/foreman_openscap.mo
327
- - locale/it/foreman_openscap.edit.po
328
313
  - locale/it/foreman_openscap.po
329
- - locale/it/foreman_openscap.po.time_stamp
330
314
  - locale/ja/LC_MESSAGES/foreman_openscap.mo
331
- - locale/ja/foreman_openscap.edit.po
332
315
  - locale/ja/foreman_openscap.po
333
- - locale/ja/foreman_openscap.po.time_stamp
334
316
  - locale/ka/LC_MESSAGES/foreman_openscap.mo
335
- - locale/ka/foreman_openscap.edit.po
336
317
  - locale/ka/foreman_openscap.po
337
- - locale/ka/foreman_openscap.po.time_stamp
338
318
  - locale/ko/LC_MESSAGES/foreman_openscap.mo
339
- - locale/ko/foreman_openscap.edit.po
340
319
  - locale/ko/foreman_openscap.po
341
- - locale/ko/foreman_openscap.po.time_stamp
342
320
  - locale/pt_BR/LC_MESSAGES/foreman_openscap.mo
343
- - locale/pt_BR/foreman_openscap.edit.po
344
321
  - locale/pt_BR/foreman_openscap.po
345
- - locale/pt_BR/foreman_openscap.po.time_stamp
346
322
  - locale/ru/LC_MESSAGES/foreman_openscap.mo
347
- - locale/ru/foreman_openscap.edit.po
348
323
  - locale/ru/foreman_openscap.po
349
- - locale/ru/foreman_openscap.po.time_stamp
350
324
  - locale/sv_SE/LC_MESSAGES/foreman_openscap.mo
351
- - locale/sv_SE/foreman_openscap.edit.po
352
325
  - locale/sv_SE/foreman_openscap.po
353
- - locale/sv_SE/foreman_openscap.po.time_stamp
354
326
  - locale/zanata.xml
355
327
  - locale/zh_CN/LC_MESSAGES/foreman_openscap.mo
356
- - locale/zh_CN/foreman_openscap.edit.po
357
328
  - locale/zh_CN/foreman_openscap.po
358
- - locale/zh_CN/foreman_openscap.po.time_stamp
359
329
  - locale/zh_TW/LC_MESSAGES/foreman_openscap.mo
360
- - locale/zh_TW/foreman_openscap.edit.po
361
330
  - locale/zh_TW/foreman_openscap.po
362
- - locale/zh_TW/foreman_openscap.po.time_stamp
363
331
  - package.json
364
332
  - test/factories/arf_report_factory.rb
365
333
  - test/factories/asset_factory.rb
@@ -469,7 +437,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
437
  - !ruby/object:Gem::Version
470
438
  version: '0'
471
439
  requirements: []
472
- rubygems_version: 3.2.33
440
+ rubygems_version: 3.3.27
473
441
  signing_key:
474
442
  specification_version: 4
475
443
  summary: Foreman plug-in for displaying OpenSCAP audit reports