openscap 0.5.1 → 0.5.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: 9c8eddf3fa5a4c04f1655827ba4f4b8422f32f314a20f888b36c5ef85e2e04cf
4
- data.tar.gz: 3e9d497efc4543111a4fee03d8db323c85b96360e31e23cd9ebc4387ec354d17
3
+ metadata.gz: cf5877a6ea4ed1691b34456d8f1f75106a2d8a7d0ef69464a6c782ff8f404930
4
+ data.tar.gz: 4dcedbaab2520d6930b8c8815167e5c8674e7d3f321cad5020e36404692b563c
5
5
  SHA512:
6
- metadata.gz: 601b6ee58372cd9f943918611c5f10df28cf1245d1149547d2889531e4b623b3787fb70cc06c1b4a17d4fca7e4202dd27dcacc7a69eba5c99d156fcc7e2529f3
7
- data.tar.gz: 3a47312203579d8735b19032cfe427f76ede2467bbfb63b806dbd47edd79a8442ebd40fc61062fb4ece7b51742c38350e73c69d8677aafed5a5d8aef0d473db2
6
+ metadata.gz: 892db2957d5cad543f1326b593481c9c9b48a5e62564fc5d7cf182dd116d4b1083ba2ea7271fbb49d1a3b29906e90f1e00e09ab5d253ed22446ea61ccf78c7ea
7
+ data.tar.gz: e546ff56a90328f03c43c152408b2bf4fa34b2f8dd5589fa5e3d8febfa57edec0e5eeb915b3b0a0e77589344dd9b619c43593514f66e9cdb1d212e9cbaf49361
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenSCAP
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
  end
@@ -9,21 +9,14 @@ module OpenSCAP
9
9
  @raw = raw
10
10
  end
11
11
 
12
- def id
13
- OpenSCAP.xccdf_fix_get_id @raw
14
- end
15
-
16
- def platform
17
- OpenSCAP.xccdf_fix_get_platform @raw
18
- end
19
-
20
- def fix_system
21
- OpenSCAP.xccdf_fix_get_system @raw
22
- end
23
-
24
- def content
25
- OpenSCAP.xccdf_fix_get_content @raw
26
- end
12
+ def id = OpenSCAP.xccdf_fix_get_id @raw
13
+ def platform = OpenSCAP.xccdf_fix_get_platform @raw
14
+ def fix_system = OpenSCAP.xccdf_fix_get_system @raw
15
+ def content = OpenSCAP.xccdf_fix_get_content @raw
16
+ def reboot = OpenSCAP.xccdf_fix_get_reboot @raw
17
+ def strategy = OpenSCAP.xccdf_fix_get_strategy @raw
18
+ def disruption = OpenSCAP.xccdf_fix_get_disruption @raw
19
+ def complexity = OpenSCAP.xccdf_fix_get_complexity @raw
27
20
 
28
21
  def to_hash
29
22
  { id:, platform:, system: fix_system, content: }
@@ -34,4 +27,28 @@ module OpenSCAP
34
27
  attach_function :xccdf_fix_get_platform, [:pointer], :string
35
28
  attach_function :xccdf_fix_get_system, [:pointer], :string
36
29
  attach_function :xccdf_fix_get_content, [:pointer], :string
30
+ attach_function :xccdf_fix_get_reboot, [:pointer], :bool
31
+
32
+ XccdfStrategy = enum(
33
+ :strategy_unknown, 0, # Strategy not defined
34
+ :strategy_configure, # Adjust target config or settings
35
+ :strategy_disable, # Turn off or deinstall something
36
+ :strategy_enable, # Turn on or install something
37
+ :strategy_patch, # Apply a patch, hotfix, or update
38
+ :strategy_policy, # Remediation by changing policies/procedures
39
+ :strategy_restrict, # Adjust permissions or ACLs
40
+ :strategy_update, # Install upgrade or update the system
41
+ :strategy_combination # Combo of two or more of the above
42
+ )
43
+ attach_function :xccdf_fix_get_strategy, [:pointer], XccdfStrategy
44
+ XccdfLevel = enum(
45
+ :level_not_defined, 0,
46
+ :level_unknown, 1, # Unknown.
47
+ :level_info, # Info.
48
+ :level_low, # Low.
49
+ :level_medium, # Medium.
50
+ :level_high # High.
51
+ )
52
+ attach_function :xccdf_fix_get_disruption, [:pointer], XccdfLevel
53
+ attach_function :xccdf_fix_get_complexity, [:pointer], XccdfLevel
37
54
  end
@@ -9,11 +9,19 @@ module OpenSCAP
9
9
  @raw = raw
10
10
  end
11
11
 
12
- def text
13
- Text.new(OpenSCAP.xccdf_fixtext_get_text(@raw)).text
14
- end
12
+ def text = Text.new(OpenSCAP.xccdf_fixtext_get_text(@raw)).text
13
+ def fixref = OpenSCAP.xccdf_fixtext_get_fixref @raw
14
+ def reboot = OpenSCAP.xccdf_fixtext_get_reboot @raw
15
+ def strategy = OpenSCAP.xccdf_fixtext_get_strategy @raw
16
+ def disruption = OpenSCAP.xccdf_fixtext_get_disruption @raw
17
+ def complexity = OpenSCAP.xccdf_fixtext_get_complexity @raw
15
18
  end
16
19
  end
17
20
 
18
21
  attach_function :xccdf_fixtext_get_text, [:pointer], :pointer
22
+ attach_function :xccdf_fixtext_get_fixref, [:pointer], :string
23
+ attach_function :xccdf_fixtext_get_reboot, [:pointer], :bool
24
+ attach_function :xccdf_fixtext_get_strategy, [:pointer], XccdfStrategy
25
+ attach_function :xccdf_fixtext_get_disruption, [:pointer], XccdfLevel
26
+ attach_function :xccdf_fixtext_get_complexity, [:pointer], XccdfLevel
19
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Lukasik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-02 00:00:00.000000000 Z
11
+ date: 2023-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi