mirror of
https://github.com/inspec/inspec
synced 2024-12-18 09:03:12 +00:00
7a59d9ce76
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
18 lines
320 B
Ruby
18 lines
320 B
Ruby
# encoding: utf-8
|
|
|
|
module Vulcano::Targets
|
|
class FileHelper
|
|
def handles?(target)
|
|
File::file?(target) and target.end_with?('.rb')
|
|
end
|
|
|
|
def resolve(target)
|
|
{
|
|
content: File::read(target),
|
|
ref: target
|
|
}
|
|
end
|
|
end
|
|
|
|
Vulcano::Targets.add_module('file', FileHelper.new)
|
|
end
|