Sha256: 7ee85bb048fc719388dbd7aadbeabe9da7d934e8dc86677ff12d4e5e90fb8236
Contents?: true
Size: 1.12 KB
Versions: 6
Compression:
Stored size: 1.12 KB
Contents
require 'yaml' require 'json' require 'inspec-objects' require 'inspec' require_relative './plugin_cli' # This tells the ruby cli app to use the same argument parsing as the plugin module InspecTools CLI = InspecPlugins::InspecToolsPlugin::CliCommand end #=====================================================================# # Pre-Flight Code #=====================================================================# help_commands = ['-h', '--help', 'help'] log_commands = ['-l', '--log-directory'] version_commands = ['-v', '--version', 'version'] #---------------------------------------------------------------------# # Adjustments for non-required version commands #---------------------------------------------------------------------# unless (version_commands & ARGV).empty? puts InspecTools::VERSION exit 0 end #---------------------------------------------------------------------# # Adjustments for non-required log-directory #---------------------------------------------------------------------# ARGV.push("--log-directory=#{Dir.pwd}/logs") if (log_commands & ARGV).empty? && (help_commands & ARGV).empty?
Version data entries
6 entries across 6 versions & 1 rubygems