Class: Suma::Cli::Validate

Inherits:
Thor
  • Object
show all
Defined in:
lib/suma/cli/validate.rb

Overview

Validate command group. Thin Thor adapter around Suma::LinkValidation — argument parsing, result presentation. All orchestration (manifest loading, link extraction, schema indexing, validation) lives in the deep module and is reachable from specs without invoking Thor.

Instance Method Summary collapse

Instance Method Details



15
16
17
18
19
20
21
22
23
24
# File 'lib/suma/cli/validate.rb', line 15

def links(schemas_file = "schemas-srl.yml",
          documents_path = "documents",
          output_file = "validation_results.txt")
  result = LinkValidation.new(
    schemas_file: schemas_file,
    documents_path: documents_path,
    output_file: output_file,
  ).call
  puts LinkValidation.generate_summary(result)
end