mirror of
https://github.com/inspec/inspec
synced 2024-11-27 23:20:33 +00:00
20 lines
374 B
Ruby
20 lines
374 B
Ruby
# encoding: utf-8
|
|
# author: Dominik Richter
|
|
# author: Christoph Hartmann
|
|
|
|
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
|