foreman_openscap 4.0.3 → 4.0.4

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: 9252b8e5a2b6e1d8c6fb846ad7d9057ba60791dd5f1dba7a64bb5e38899ddb56
4
- data.tar.gz: ce78ad017257f0ed398b3e898d4e3245083e0fe6d0c0011e89f4760049090969
3
+ metadata.gz: f4a4ecc74498e831daaf3b06da9a2ab475c1eac67f34ef698fe7aabc949e7fa3
4
+ data.tar.gz: b917c3d1c392311306404f261541bbabbc63fcabdfb5ee277a25a794eb3cf0f2
5
5
  SHA512:
6
- metadata.gz: c15b7190aea03e446fa77c35c162453d93c755888630efc4db503543f823769dba36a3ab071631d522d9ed39d556ab0637758e9dd9cc2e35f019f0c7a20da7e3
7
- data.tar.gz: 14de584928d7d4f2913deb9c93b9d634a8f5c491929eed27242c8ce05f9cd65927b3df2e9bf1f348d4285cd112500578516b7d0e4bd505b8469216bad65d14aa
6
+ metadata.gz: 2f50b5057eac300b2f23d006d2523d0a1241d1133ce108a2836f4833a1b491a8b365ba3bb9428b9a120b7c89bf1278274844eb8e02304d2dc8edc37952477629
7
+ data.tar.gz: d7c772636e3a3406cf1df32cdb6521716800acc61b31825ed7a9c1d4819411ca4047aaf43c16c346eb715b83c7778b5b37daf6d41ad38a20b89435be4b5466c0
@@ -22,18 +22,10 @@ module ForemanOpenscap
22
22
  end
23
23
 
24
24
  def inherited_openscap_proxy_id
25
- inherited_ancestry_attribute(:openscap_proxy_id)
26
- end
27
-
28
- unless defined?(Katello::System)
29
- private
30
-
31
- def inherited_ancestry_attribute(attribute)
32
- if ancestry.present?
33
- self[attribute] || self.class.sort_by_ancestry(ancestors.where("#{attribute} is not NULL")).last.try(attribute)
34
- else
35
- self.send(attribute)
36
- end
25
+ if ancestry.present?
26
+ self[:openscap_proxy_id] || self.class.sort_by_ancestry(ancestors.where.not(openscap_proxy_id: nil)).last.try(:openscap_proxy_id)
27
+ else
28
+ self.send(:openscap_proxy_id)
37
29
  end
38
30
  end
39
31
  end
@@ -33,10 +33,6 @@ module ForemanOpenscap
33
33
  end
34
34
  end
35
35
 
36
- def inherited_openscap_proxy_id
37
- inherited_ancestry_attribute(:openscap_proxy_id)
38
- end
39
-
40
36
  private
41
37
 
42
38
  def scap_client_lookup_values_for(lookup_keys, model_match)
@@ -1,3 +1,3 @@
1
1
  module ForemanOpenscap
2
- VERSION = "4.0.3".freeze
2
+ VERSION = "4.0.4".freeze
3
3
  end
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: 4.0.3
4
+ version: 4.0.4
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: 2020-09-08 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -349,52 +349,52 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
349
  - !ruby/object:Gem::Version
350
350
  version: '0'
351
351
  requirements: []
352
- rubygems_version: 3.0.3
352
+ rubygems_version: 3.1.2
353
353
  signing_key:
354
354
  specification_version: 4
355
355
  summary: Foreman plug-in for displaying OpenSCAP audit reports
356
356
  test_files:
357
- - test/factories/policy_factory.rb
358
- - test/factories/compliance_host_factory.rb
359
357
  - test/factories/arf_report_factory.rb
360
358
  - test/factories/asset_factory.rb
359
+ - test/factories/compliance_host_factory.rb
361
360
  - test/factories/compliance_log_factory.rb
362
- - test/factories/scap_content_related.rb
363
361
  - test/factories/policy_arf_report_factory.rb
364
- - test/test_plugin_helper.rb
365
- - test/unit/policy_test.rb
366
- - test/unit/services/lookup_key_overrider_test.rb
367
- - test/unit/services/report_dashboard/data_test.rb
368
- - test/unit/services/hostgroup_overrider_test.rb
369
- - test/unit/services/config_name_service_test.rb
370
- - test/unit/services/tailoring_files_proxy_check_test.rb
371
- - test/unit/policy_mailer_test.rb
372
- - test/unit/tailoring_file_test.rb
373
- - test/unit/scap_content_test.rb
374
- - test/unit/message_cleaner_test.rb
375
- - test/unit/arf_report_status_calculator_test.rb
376
- - test/unit/compliance_status_test.rb
377
- - test/unit/openscap_host_test.rb
378
- - test/unit/concerns/openscap_proxy_extenstions_test.rb
379
- - test/unit/concerns/host_extensions_test.rb
380
- - test/unit/arf_report_test.rb
381
- - test/lib/foreman_openscap/bulk_upload_test.rb
382
- - test/functional/tailoring_files_controller_test.rb
383
- - test/functional/api/v2/compliance/scap_content_profiles_controller_test.rb
384
- - test/functional/api/v2/compliance/tailoring_files_controller_test.rb
362
+ - test/factories/policy_factory.rb
363
+ - test/factories/scap_content_related.rb
364
+ - test/files/arf_report/arf_report.bz2
365
+ - test/files/arf_report/arf_report.html
366
+ - test/files/arf_report/arf_report.json
367
+ - test/files/arf_report/arf_report_msg_desc_changed.json
368
+ - test/files/arf_report/arf_report_msg_value_changed.json
369
+ - test/files/scap_contents/ssg-fedora-ds.xml
370
+ - test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
371
+ - test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
372
+ - test/functional/api/v2/compliance/arf_reports_controller_test.rb
385
373
  - test/functional/api/v2/compliance/policies_controller_test.rb
374
+ - test/functional/api/v2/compliance/scap_content_profiles_controller_test.rb
386
375
  - test/functional/api/v2/compliance/scap_contents_controller_test.rb
387
- - test/functional/api/v2/compliance/arf_reports_controller_test.rb
376
+ - test/functional/api/v2/compliance/tailoring_files_controller_test.rb
388
377
  - test/functional/api/v2/hosts_controller_test.rb
389
378
  - test/functional/arf_reports_controller_test.rb
390
379
  - test/functional/openscap_proxies_controller_test.rb
391
- - test/helpers/policy_dashboard_helper_test.rb
380
+ - test/functional/tailoring_files_controller_test.rb
392
381
  - test/helpers/arf_report_dashboard_helper_test.rb
393
- - test/files/arf_report/arf_report.json
394
- - test/files/arf_report/arf_report_msg_desc_changed.json
395
- - test/files/arf_report/arf_report.html
396
- - test/files/arf_report/arf_report.bz2
397
- - test/files/arf_report/arf_report_msg_value_changed.json
398
- - test/files/scap_contents/ssg-fedora-ds.xml
399
- - test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
400
- - test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
382
+ - test/helpers/policy_dashboard_helper_test.rb
383
+ - test/lib/foreman_openscap/bulk_upload_test.rb
384
+ - test/unit/arf_report_status_calculator_test.rb
385
+ - test/unit/arf_report_test.rb
386
+ - test/unit/compliance_status_test.rb
387
+ - test/unit/concerns/host_extensions_test.rb
388
+ - test/unit/concerns/openscap_proxy_extenstions_test.rb
389
+ - test/unit/message_cleaner_test.rb
390
+ - test/unit/openscap_host_test.rb
391
+ - test/unit/policy_mailer_test.rb
392
+ - test/unit/scap_content_test.rb
393
+ - test/unit/services/config_name_service_test.rb
394
+ - test/unit/services/hostgroup_overrider_test.rb
395
+ - test/unit/services/lookup_key_overrider_test.rb
396
+ - test/unit/services/report_dashboard/data_test.rb
397
+ - test/unit/services/tailoring_files_proxy_check_test.rb
398
+ - test/unit/tailoring_file_test.rb
399
+ - test/unit/policy_test.rb
400
+ - test/test_plugin_helper.rb