tty-option 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -1
- data/LICENSE.txt +1 -1
- data/README.md +1204 -492
- data/lib/tty/option/aggregate_errors.rb +3 -3
- data/lib/tty/option/const.rb +17 -0
- data/lib/tty/option/conversions.rb +52 -34
- data/lib/tty/option/converter.rb +2 -2
- data/lib/tty/option/deep_dup.rb +43 -20
- data/lib/tty/option/dsl.rb +5 -5
- data/lib/tty/option/errors.rb +33 -3
- data/lib/tty/option/formatter.rb +369 -74
- data/lib/tty/option/param_conversion.rb +11 -9
- data/lib/tty/option/param_permitted.rb +8 -4
- data/lib/tty/option/param_validation.rb +125 -21
- data/lib/tty/option/parameter.rb +23 -15
- data/lib/tty/option/parameters.rb +15 -1
- data/lib/tty/option/parser/arguments.rb +1 -1
- data/lib/tty/option/parser/arity_check.rb +1 -1
- data/lib/tty/option/parser/environments.rb +2 -2
- data/lib/tty/option/parser/keywords.rb +1 -1
- data/lib/tty/option/parser/options.rb +6 -1
- data/lib/tty/option/parser/param_types.rb +16 -4
- data/lib/tty/option/parser/required_check.rb +1 -1
- data/lib/tty/option/parser.rb +1 -1
- data/lib/tty/option/pipeline.rb +1 -1
- data/lib/tty/option/result.rb +25 -3
- data/lib/tty/option/usage.rb +58 -1
- data/lib/tty/option/usage_wrapper.rb +3 -2
- data/lib/tty/option/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23b473052889e94aa53877288da8ad830387161bbfff5ed597fe7ee627f49733
|
4
|
+
data.tar.gz: '00864bc5efb5edc98530aaf3cd703ca7acc0c09e7bc7981e4db2b5f2f1ceb22d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e424023712581be249787dc19ba915c57adf7a95b97992cbb7ee47f9cb2b7e21e8da81b42ece107b76b38dea18c849fc21fbbab4ba10715438a32240af99c1a0
|
7
|
+
data.tar.gz: 64917726d927190bdb7ab6e4d62f019823328931906340f7de3b087e29691adbd3b8538e6c3e0bca7fa127087dc0387debe9ec79835f3baef0373d1d8b8604dd
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,47 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.3.0] - 2023-05-29
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
* Change permit setting to work with parameters converted to an array or a hash
|
7
|
+
* Change formatting of a hash value in parameter validation error message
|
8
|
+
* Change array and hash conversions to work with non-string values
|
9
|
+
* Change date conversion to work with date objects
|
10
|
+
* Change pathname conversion to only work with strings and pathname objects
|
11
|
+
* Change regexp conversion to only work with strings and regexp objects
|
12
|
+
* Change uri conversion to work with uri objects
|
13
|
+
* Change deep cloning to stop making copies of unbound methods
|
14
|
+
* Change deep cloning to copy objects with the same identity only once
|
15
|
+
* Change deep cloning to work with recursive arrays and hashes
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
* Fix argument check against permitted values to allow nil value when optional
|
19
|
+
* Fix parsing values provided with abbreviated long option names
|
20
|
+
* Fix any object type to symbol conversion failure to return an undefined value
|
21
|
+
* Fix parameter validation to stop transforming hash value into an array
|
22
|
+
* Fix help display when formatting only short options
|
23
|
+
* Fix parameter name alignment formatting to ignore hidden parameters
|
24
|
+
* Fix description alignment formatting for parameters with only default or permit
|
25
|
+
* Fix short option name alignment formatting to check whether a long name is set
|
26
|
+
|
27
|
+
## [v0.2.0] - 2021-08-04
|
28
|
+
|
29
|
+
### Added
|
30
|
+
* Add predicate methods for checking if a given parameter is supported
|
31
|
+
|
32
|
+
### Changed
|
33
|
+
* Change Conversions to stop raising error and return Undefined value instead
|
34
|
+
* Change to skip conversion of parameters with nil value
|
35
|
+
|
36
|
+
### Fixed
|
37
|
+
* Fix conversion of nil into array or hash to stop raising an error
|
38
|
+
* Fix #no_command to correctly mark command as not present
|
39
|
+
* Fix warnings about shadowing local variables
|
40
|
+
|
3
41
|
## [v0.1.0] - 2020-05-18
|
4
42
|
|
5
43
|
* Initial implementation and release
|
6
44
|
|
7
|
-
[v0.
|
45
|
+
[v0.3.0]: https://github.com/piotrmurach/tty-option/compare/v0.2.0...v0.3.0
|
46
|
+
[v0.2.0]: https://github.com/piotrmurach/tty-option/compare/v0.1.0...v0.2.0
|
47
|
+
[v0.1.0]: https://github.com/piotrmurach/tty-option/compare/95179f0...v0.1.0
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2020 Piotr Murach
|
3
|
+
Copyright (c) 2020 Piotr Murach (piotrmurach.com)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|