mirror of
https://github.com/inspec/inspec
synced 2024-12-01 00:49:24 +00:00
17 lines
345 B
Ruby
17 lines
345 B
Ruby
require 'yaml'
|
|
|
|
class GordonConfig < Inspec.resource(1)
|
|
name 'gordon_config'
|
|
|
|
def initialize
|
|
@path = '/etc/gordon/config.yaml'
|
|
@file = inspec.file(@path)
|
|
return skip_resource "Can't find file \"#{@path}\"" if !@file.file?
|
|
|
|
@params = YAML.load(@file.content)
|
|
end
|
|
|
|
def method_missing(name)
|
|
@params[name.to_s]
|
|
end
|
|
end
|