Releases: postmodern/command_mapper.rb
Releases · postmodern/command_mapper.rb
0.3.2
0.3.1
- Use
File.exist?inCommandMapper::Types::InputPath#validatefor Ruby 3.2.0.
0.3.0
- Added
CommandMapper::Types::Dec.
0.2.1
- Properly validate in
CommandMapper::OptionValue#validatewhen an option,
who's value is not required, is giventrue. - Omit
nilarguments fromCommandMapper::Command#command_argvif the
argument is not required. - Improve validation error message for
CommandMapper::Types::Numwhen
initialized with arange:value. - Improve validation error message for
CommandMapper::Types::Mapand
CommandMapper::Types::Enum.
v0.2.0
- Added
CommandMapper::Command.spawnandCommandMapper::Command#spawn_command. - Added checks to
CommandMapper::Command.option,CommandMapper::Command.argument, and
CommandMapper::Command.subcommandto avoid overwriting an existing option/argument/subcommand
with the same name. - Added the
value_in_flag:keyword argument to
CommandMapper::Command.optionwhich indicates an option's value
should be appended to the flag (ex:-Fvalue). - Added the
range:keyword argument toCommandMapper::Types::Num#initialize
for specifying the acceptable range of numbers. - Allow options with
equals: true(aka--opt=...) orvalue_in_flag: true
(aka-Fvalue) to accept values that start with a-character.
0.1.2
- Fixed a bug where
CommandMapper::Command.command_namewas not checking the
superclass for thecommand_name, if nocommand "..."was defined in the subclass.
0.1.1
- Fixed a bug where
CommandMapper::Types::Num,CommandMapper::Types::Hex,
CommandMapper::Types::Enum,CommandMapper::Types::InputPath,
CommandMapper::Types::InputFil, andCommandMapper::Types::InputDirwere
not being required by default. - Allow
CommandMapper::Types::Mapto accept values that have already been
mapped to a String.
0.1.0
- Initial release:
- Added
CommandMapper::Error. - Added
CommandMapper::ValidationError. - Added
CommandMapper::ArgumentRequired. - Added
CommandMapper::Types::Type. - Added
CommandMapper::Types::Str. - Added
CommandMapper::Types::Num. - Added
CommandMapper::Types::Hex. - Added
CommandMapper::Types::Map. - Added
CommandMapper::Types::Enum. - Added
CommandMapper::Types::InputPath. - Added
CommandMapper::Types::InputFile. - Added
CommandMapper::Types::InputDir. - Added
CommandMapper::Types::List. - Added
CommandMapper::Types::KeyValue. - Added
CommandMapper::Types::KeyValueList. - Added
CommandMapper::Arg. - Added
CommandMapper::Argument. - Added
CommandMapper::OptionValue. - Added
CommandMapper::Option. - Added
CommandMapper::Command. - Added
CommandMapper::Sudo.
- Added