lib/deploy_rubygem/inspec.rb in deploy_rubygem-0.1.0 vs lib/deploy_rubygem/inspec.rb in deploy_rubygem-0.54.2

- old
+ new

@@ -1,37 +1,16 @@ -# frozen_string_literal: true -# DeployRubygem - deploy a gem using rake -# Containing a class module DeployRubygem - # Using Inspec to deploy and manage Inspec class Inspec - attr_reader :inspec_name, :input_file + attr_reader :inspec_name - def initialize(inspec_name, input_file = nil, waiver_file = nil) + def initialize(inspec_name) @inspec_name = inspec_name - @input_file = input_file - @waiver_file = waiver_file end def apply - puts "ActuaL Dir #{Dir.pwd}" - puts "inspec_name = #{inspec_name}" - puts "input_file = #{input_file}" - puts "waiver_file = #{waiver_file}" system("inspec check compliance/profiles/#{inspec_name}") - cmd_opt = [] - - unless input_file.nil? - cmd_opt << '--input-file' - cmd_opt << input_file - end - - unless waiver_file.nil? - cmd_opt << '--waiver-file' - cmd_opt << waiver_file - end - system("inspec exec compliance/profiles/#{inspec_name} #{cmd_opt.join(' ')}") + system("inspec exec compliance/profiles/#{inspec_name}") end def update system("rm -rf compliance/profiles/#{inspec_name}/vendor") system("rm compliance/profiles/#{inspec_name}/inspec.lock")