Release 2.2.8
Update CLI processor:
- Add
:control
field toCLI::Options
for HTML layout - Allow
CLI::Options#call
to provide options along witharg
based on arity of receiver (this allows options to add other options). - Extract most built-in options to structure.
CLI.options
does not use callback any longer. It takes anargv
parameter and figures out commands from there.- CLI.commands now accept a
format
named parameter; if used with:json
, it returns a JSON structure - CLI::Options now implements
#to_hash
. - Add
args
accessor toOptionParser
to retain arguments after options have been extracted. - Note potential addition of
:messages
component to options passed to command lambda. - Note that status updates should be logged (info) rather than output to $stdout.
- Add
required
parameter/option to Option to indicate that the option must be specified. - Overload
RDF::CLI.options
to also return a JSON representation of options in addition to normal processing. - Make
class_name
option required for Vocabulary CLI options. - In
CLI.parse
if using evaluated input, take sample to use if no format is specified. - Make sure CLI logger is set in options, using that from option_parser if not provided explicitly.
- In CLI runner, if messages are set, display them. This is in preference to text formatting in the command.
- Change
CLI::Option#required
toCLI::Option#use
with states:disabled
,:removed
,:required
, and:optional
. - Allow commands to override option use using
option_use
.