exe/mdqt in mdqt-0.2.1 vs exe/mdqt in mdqt-0.3.0
- old
+ new
@@ -14,27 +14,52 @@
default_command :help
command :version do |c|
c.syntax = 'mdqt version'
- c.description = 'Display version information'
+ c.description = 'Show version of MDQT'
c.action do |args, options|
- say "mdqt version #{MDQT::VERSION}"
+ options.default MDQT::CLI::Defaults.cli_defaults
+ options.default({service: :not_required })
+ MDQT::CLI::Version.run(args, options)
end
end
command :get do |c|
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 PATH', String, 'Validate downloads using specified certificate'
+ c.option '--verify-with PATHS', Array, 'Validate downloads using specified certificates'
#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 '--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?
MDQT::CLI::Get.run(args, options)
+ end
+ end
+
+ command :reset do |c|
+ c.syntax = 'mdqt reset'
+ c.description = 'Delete all cached data'
+ c.action do |args, options|
+ options.default MDQT::CLI::Defaults.cli_defaults
+ options.default({service: :not_required })
+ MDQT::CLI::Reset.run(args, options)
+ end
+ end
+
+ command :transform do |c|
+ c.syntax = 'mdqt transform ENTITYIDS'
+ 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
end