inspec/lib/vulcano/targets/file.rb
Dominik Richter 07cb7efe36 lint targets
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00

18 lines
319 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