From 61394c50f73fe705acee30f00ce58b41ebc42c84 Mon Sep 17 00:00:00 2001 From: Wiebe Verweij Date: Wed, 22 Aug 2018 15:31:08 +0200 Subject: [PATCH] Add support for platform and suite flag to reporter configuration option This makes it possible to create custom file paths more easily Signed-off-by: Wiebe Verweij --- lib/kitchen/verifier/inspec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kitchen/verifier/inspec.rb b/lib/kitchen/verifier/inspec.rb index 759f333..7d0d151 100644 --- a/lib/kitchen/verifier/inspec.rb +++ b/lib/kitchen/verifier/inspec.rb @@ -202,7 +202,7 @@ def runner_options(transport, state = {}, platform = nil, suite = nil) # rubocop runner_options["format"] = config[:format] unless config[:format].nil? runner_options["output"] = config[:output] % { platform: platform, suite: suite } unless config[:output].nil? runner_options["profiles_path"] = config[:profiles_path] unless config[:profiles_path].nil? - runner_options["reporter"] = config[:reporter] unless config[:reporter].nil? + runner_options["reporter"] = config[:reporter].map { |s| s % { platform: platform, suite: suite } } unless config[:reporter].nil? runner_options[:controls] = config[:controls] # check to make sure we have a valid version for caching