Class: Abide::CLI::ComplyCompareReportCommand
- Inherits:
-
AbideCommand
- Object
- CmdParse::Command
- AbideCommand
- Abide::CLI::ComplyCompareReportCommand
- Defined in:
- lib/abide_dev_utils/cli/comply.rb
Constant Summary collapse
- CMD_NAME =
'compare-report'
- CMD_SHORT =
'Compare two Comply reports and get the differences.'
- CMD_LONG =
'Compare two Comply reports and get the differences. Report A is compared to report B, showing what changes it would take for A to equal B.'
- CMD_REPORT_A =
'The current Comply report yaml file'
- CMD_REPORT_B =
'The old Comply report yaml file name or full path'
Constants included from AbideDevUtils::Config
AbideDevUtils::Config::DEFAULT_PATH
Instance Method Summary collapse
- #execute(report_a, report_b) ⇒ Object
-
#initialize ⇒ ComplyCompareReportCommand
constructor
A new instance of ComplyCompareReportCommand.
Methods included from AbideDevUtils::Config
config_section, #config_section, fetch, #fetch, to_h, #to_h
Constructor Details
#initialize ⇒ ComplyCompareReportCommand
Returns a new instance of ComplyCompareReportCommand.
105 106 107 108 109 110 111 |
# File 'lib/abide_dev_utils/cli/comply.rb', line 105 def initialize super(CMD_NAME, CMD_SHORT, CMD_LONG, takes_commands: false) argument_desc(REPORT_A: CMD_REPORT_A, REPORT_B: CMD_REPORT_B) .on('-u', '--upload-new', 'If you want to upload the new scan report') { @data[:upload] = true } .on('-s [STORAGE]', '--remote-storage [STORAGE]', 'Remote storage to upload the report to. (Only supports "gcloud")') { |x| @data[:remote_storage] = x } .on('-r [NAME]', '--name [NAME]', 'The name to upload the report as') { |x| @data[:report_name] = x } end |
Instance Method Details
#execute(report_a, report_b) ⇒ Object
113 114 115 |
# File 'lib/abide_dev_utils/cli/comply.rb', line 113 def execute(report_a, report_b) AbideDevUtils::Comply.compare_reports(report_a, report_b, @data) end |