foreman_openscap 11.1.1 → 11.1.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: 5134096644a9dbb466a863dfcc7530deb271322247877564b4b0edf050072447
4
- data.tar.gz: 8cc55bf6e8f477c36bbb48c98df06e58ac2619e65c6f0ced61eef1d5582d774f
3
+ metadata.gz: 9fceb7c0dbe0b3dc2d57b7e068a06c0c9d0b66c467bc7286ebe9b6650b32f1cf
4
+ data.tar.gz: 291fe3fd95cc3fc7a86f31bdd902c7e6bc9a8f6307481fe77dae2c2445132991
5
5
  SHA512:
6
- metadata.gz: '08b459527dfa059b50ccdb60ffc2cd6ecd983afb778d9b5d5ceb77fb0b415301d0794053865ad0bca41d9476f5895da71c56dc1165183ec738159080f9c83398'
7
- data.tar.gz: 9eab3b0a20193b070b4f41cc0f998ece12ce2ab0a8f7cf616c7367794d6fb48d931d1b0c83316742c5cc49f1b2ac997dc8f1c20796dbcbb59fcb7126c6f64924
6
+ metadata.gz: 3a26a60e4776443ad08bddd485e79e00b6c66e26210f4a700c246816b2e658355d783b1c378caeef62ddaa59c403e73c59938a12b76ec32f009f2e583b875fa4
7
+ data.tar.gz: 7348969566f31ee4ef1799464a1a59f14efaaca3c953394c93c9099a451ea72a6759aba14676f1e47ce51cd772bc4d51ffd835bf23aa357ba145e429a3e9bd4b
@@ -2,11 +2,10 @@ module ForemanOpenscap
2
2
  module BookmarkControllerValidatorExtensions
3
3
  module ClassMethods
4
4
  def valid_controllers_list
5
- super + ActiveRecord::Base.connection
6
- .tables
7
- .map(&:to_s)
8
- .select { |table| table.start_with? 'foreman_openscap_' }
9
- .map { |table| table.sub('foreman_openscap_', '') }
5
+ controllers = super
6
+ controllers + controllers
7
+ .select { |controller| controller.start_with?('foreman_openscap_', 'foreman_openscap/') }
8
+ .map { |controller| controller.sub(%r{^foreman_openscap[/_]}, '') }
10
9
  end
11
10
  end
12
11
 
@@ -1,3 +1,3 @@
1
1
  module ForemanOpenscap
2
- VERSION = "11.1.1".freeze
2
+ VERSION = "11.1.2".freeze
3
3
  end
@@ -0,0 +1,16 @@
1
+ require 'test_plugin_helper'
2
+
3
+ class BookmarkControllerValidatorExtensionsTest < ActiveSupport::TestCase
4
+ # All controllers including AutoCompleteSearch, except ComplianceDashboardController which is broken anyway
5
+ [ArfReportsController, ScapContentsController,
6
+ PoliciesController, TailoringFilesController].each do |controller_class|
7
+ test "#{controller_class.controller_name} should be a valid bookmark controller" do
8
+ controller = controller_class.controller_name
9
+ bookmark = FactoryBot.build_stubbed(:bookmark, :name => "#{controller} bookmark",
10
+ :controller => controller,
11
+ :query => 'search query',
12
+ :public => true)
13
+ assert bookmark.valid?, "#{controller} should be a valid bookmark controller, errors: #{bookmark.errors.full_messages}"
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.1.1
4
+ version: 11.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - slukasik@redhat.com
@@ -376,6 +376,7 @@ files:
376
376
  - test/unit/arf_report_status_calculator_test.rb
377
377
  - test/unit/arf_report_test.rb
378
378
  - test/unit/compliance_status_test.rb
379
+ - test/unit/concerns/bookmark_controller_validator_extensions_test.rb
379
380
  - test/unit/concerns/host_extensions_test.rb
380
381
  - test/unit/concerns/hostgroup_extensions_test.rb
381
382
  - test/unit/concerns/openscap_proxy_extenstions_test.rb
@@ -451,7 +452,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
451
452
  - !ruby/object:Gem::Version
452
453
  version: '0'
453
454
  requirements: []
454
- rubygems_version: 3.6.9
455
+ rubygems_version: 4.0.16
455
456
  specification_version: 4
456
457
  summary: Foreman plug-in for displaying OpenSCAP audit reports
457
458
  test_files:
@@ -489,6 +490,7 @@ test_files:
489
490
  - test/unit/arf_report_status_calculator_test.rb
490
491
  - test/unit/arf_report_test.rb
491
492
  - test/unit/compliance_status_test.rb
493
+ - test/unit/concerns/bookmark_controller_validator_extensions_test.rb
492
494
  - test/unit/concerns/host_extensions_test.rb
493
495
  - test/unit/concerns/hostgroup_extensions_test.rb
494
496
  - test/unit/concerns/openscap_proxy_extenstions_test.rb