foreman_openscap 12.1.1 → 12.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: 68d51670aa5f210af3ae583fb2827a3dc8122f57f05302a84e59a2eb2fbb0080
4
- data.tar.gz: 06555545bb55784438737b3a7367490697d26e4bfd6adc827e5f4465ee02fd54
3
+ metadata.gz: 7d8a562f0b445928773ee7d56fb55865ed3209a6d91b87c1ee8f39d414f1f772
4
+ data.tar.gz: 3b30bb1362e2ce2cc5105cd54f84cc643f809026c207f17b9118ea5357a73f4b
5
5
  SHA512:
6
- metadata.gz: 7b73f954b7f5d5eac98d3160a961eb383ea7c48ca744c68eae82b41f024e7f5b95137ef3213c84570b794ccf648662d7c0721bccc10dc4a1a05be595443ee821
7
- data.tar.gz: de3a0a00d0fadeee768d3b5a398f580233097e585b60622074896609287876e8ac7695090d9eaa89dc5a6afc1d65b251daae7ddce9008b24a0841b6585775eb1
6
+ metadata.gz: 8dab6bff24fe0a6bf0a757f097f11dbcf598f55fa258bb973f018365ef42c574d579734caa9ec353ced159bb085adf77d49a3a45f1e5bfcfb19e7f219b5d7e00
7
+ data.tar.gz: 3733b383bd767e0e606f2625904eae09899ec39aea038a6bae0ba4a45b127b71a9e16f25a571f107039db67d3e7cb67402cdb7156de9f3cec9a7dfb0eec26d6c
@@ -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 = "12.1.1".freeze
2
+ VERSION = "12.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: 12.1.1
4
+ version: 12.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - slukasik@redhat.com
@@ -349,6 +349,7 @@ files:
349
349
  - test/unit/arf_report_status_calculator_test.rb
350
350
  - test/unit/arf_report_test.rb
351
351
  - test/unit/compliance_status_test.rb
352
+ - test/unit/concerns/bookmark_controller_validator_extensions_test.rb
352
353
  - test/unit/concerns/host_extensions_test.rb
353
354
  - test/unit/concerns/hostgroup_extensions_test.rb
354
355
  - test/unit/concerns/openscap_proxy_extenstions_test.rb
@@ -462,6 +463,7 @@ test_files:
462
463
  - test/unit/arf_report_status_calculator_test.rb
463
464
  - test/unit/arf_report_test.rb
464
465
  - test/unit/compliance_status_test.rb
466
+ - test/unit/concerns/bookmark_controller_validator_extensions_test.rb
465
467
  - test/unit/concerns/host_extensions_test.rb
466
468
  - test/unit/concerns/hostgroup_extensions_test.rb
467
469
  - test/unit/concerns/openscap_proxy_extenstions_test.rb