From 27d04b56d78a62bcc3724e7caa9f7d76d92830e9 Mon Sep 17 00:00:00 2001 From: Elliott Davis Date: Thu, 27 Apr 2017 10:17:17 -0500 Subject: [PATCH] Update postgresql conf resource to accept include_dir as a string as well as an array Even though I couldn't find any docs around include_dir accepting anything other than a string I left the existing functionality alone. This forces include_dir to check multiple directories as well as single string directories for additional conf files. Signed-off-by: Elliott Davis --- lib/resources/postgres_conf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resources/postgres_conf.rb b/lib/resources/postgres_conf.rb index ffa3499a4..fde4c3546 100644 --- a/lib/resources/postgres_conf.rb +++ b/lib/resources/postgres_conf.rb @@ -93,7 +93,7 @@ module Inspec::Resources def include_files(params) include_files = params['include'] || [] include_files += params['include_if_exists'] || [] - dirs = params['include_dir'] || [] + dirs = Array(params['include_dir']) || [] dirs.each do |dir| dir = File.join(@conf_dir, dir) if dir[0] != '/' include_files += find_files(dir, depth: 1, type: 'file')