exe/mdqt in mdqt-0.3.1 vs exe/mdqt in mdqt-0.4.0

- old
+ new

@@ -28,13 +28,15 @@ c.syntax = 'mdqt get [options] entityidentifier ' c.description = 'Download one entity record or an aggregate of entity records' c.option '--service URL', String, 'MDQ service to search for entities. Defaults to MDQT_SERVICE or MDQ_BASE_URL env variables' c.option '--cache', "Cache downloads and try to fetch from cache where appropriate" c.option '--verify-with PATHS', Array, 'Validate downloads using specified certificates' + c.option '--validate', 'Validate downloaded metadata against SAML2 schema (not normally needed)' #c.option '--stdin', 'accept one or more entity ids from STDIN' c.option '--all', 'Request all entity records' c.option '--explain', 'Show details of client request and server response' + c.option '--tls-risky', "Don't check certificate used for TLS (usually a bad idea)" c.option '--save-to PATH', String, 'Write all data to files in the specified directory' c.option '--link-id', 'If saving files, save files with aliases (requires `--save-to`)' c.action do |args, options| options.default MDQT::CLI::Defaults.cli_defaults options.default({service: MDQT::CLI::Defaults.base_url }) if options.service.nil? @@ -57,9 +59,20 @@ c.description = 'Show transformed entity IDs' c.action do |args, options| options.default MDQT::CLI::Defaults.cli_defaults options.default({service: :not_required }) MDQT::CLI::Transform.run(args, options) + end + end + + command :check do |c| + c.syntax = 'mdqt check XML_FILENAME CERTIFICATE_FILENAME' + c.description = 'Validate XML and check signatures' + c.option '--verify-with PATHS', Array, 'Validate file using specified certificates' + c.action do |args, options| + options.default MDQT::CLI::Defaults.cli_defaults + options.default({service: :not_required, validate: true }) + MDQT::CLI::Check.run(args, options) end end end