Module: DeployRubygem::InspecCookbookTask

Included in:
RakeCookbookTask
Defined in:
lib/deploy_rubygem/rake/cookbook/inspec.rb

Overview

RakeTask to use with DeployRubygem projects

Instance Method Summary collapse

Instance Method Details

#complianceObject

:nodoc:



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/deploy_rubygem/rake/cookbook/inspec.rb', line 7

def compliance # :nodoc:
  desc "@desc with #{__method__}"
  task :compliance do
    inspect_opts = [
      '--input-file', File.join('compliance', 'inputs', "#{@task_name}.yml"),
      '--waiver-file', File.join('compliance', 'waivers', "#{@task_name}.yml"),
      '--reporter', "html:/tmp/html/#{@task_name}_rake_report.html"
    ]
    inspec_cmd = "inspec exec compliance/profiles/#{@task_name}-accept #{inspect_opts.join(' ')}"
    puts "inspec_cmd = #{inspec_cmd}"
    system(inspec_cmd)
  end
end