14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/inspec-plugin-example/control.rb', line 14
def self.print
Inspec::Log.debug "Example::Control debugging message"
ctrl = ::Inspec::Control.new
ctrl.id = "InSpecPluginExample"
ctrl.title = "Example of an InSpec Control"
ctrl.desc = "Description of an Example InSpec Control"
ctrl.impact = "1.0"
describe = ::Inspec::Describe.new
describe.qualifier.push(["file", "/tmp/test.txt"])
describe.add_test(nil, "exist", nil)
describe.add_test("mode", "cmp", "0644")
ctrl.add_test(describe)
puts "title 'Example File Title'\n\n"
puts ctrl.to_ruby
end
|