benry-cmdopt 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51be94488014a32dabfc2f524a850fa657a11c4c1d9d9b92761d00e57e24969e
4
- data.tar.gz: d2078058fec806f194f0bfd1d5d6705a78430c7989d7eb9ddccadea2daa3311b
3
+ metadata.gz: eb91a08288099f5e011818d0dc0790f4a0ce39885417a248365bc1d34342f51b
4
+ data.tar.gz: 16ac9a7a312d7fac7ee082b20e18f16dfd0303f685028db29290bebd6e95fdf5
5
5
  SHA512:
6
- metadata.gz: 41e0e1a914cb6022f31244d6770067bd38636f27c0ce9e30dbcd37a731bc8d3f485329e0c0b49ff3aa322250f6d475ee0c28032a1053132e0f8c2bf061b2aa7c
7
- data.tar.gz: e5e3922ccf2d06e9b56997cc07e7616dfa905fedb1974953f7bc9138d7b888cab6d5b5c8025000cd574b8b608ead71ef772571fa71486c5467294d20376bdb9e
6
+ metadata.gz: cd5db670a903764317a3cc0a4a35f96b8c80b3bcc9e422c5d48da7d53a12847017c1175aef861af6abaaa43791e27824557f341d7b4038197fc8bdbfd7285bba
7
+ data.tar.gz: bf0c0b66d9c5972662c8bd45db7956fd1cb9a8b8562c3bb1e76fa3ff0421ab42feb8195c76fd04eeb110dd63f06cd787e394090d338b1571be6d9570f3852e28
data/CHANGES.md CHANGED
@@ -1,8 +1,41 @@
1
- =======
2
1
  CHANGES
3
2
  =======
4
3
 
5
4
 
5
+ Release 2.0.0 (2023-10-10)
6
+ --------------------------
7
+
8
+ * [change] rename `Benry::Cmdopt` to `Benry::CmdOpt`, and the old name is still available for backward compatibility.
9
+ * [change] `Parser#parse()` parses all options even after arguments.
10
+ * [change] treat argument `-` as normal argument (in before release, `-` is ignored because treated as option).
11
+ * [change] keyword parameter `pattern:` is renamed to `rexp:` (`pattern:` is also available for backward compatibilidy).
12
+ * [change] `SchemaItem#help` is renamed to `SchemaItem#desc` (old name `#help` is also available for backward compatibility).
13
+ * [change] `add(..., type: Integer, enum: ['1','2'])` now raises error because enum contains non-Integer value.
14
+ * [change] freeze enum value of `enum:` keyword arg of `Facade#add()` and `Schema#add()`.
15
+ * [enhance] `Parser#parse(argv, false)` parses options only before arguments.
16
+ * [enhance] define `#to_s()` which is alias of `#option_help()`.
17
+ * [enhance] `Facade#add()` and `Schema#add()` supports `range:` keyword arg which validates option value.
18
+ * [enhance] `Facade#add()` and `Schema#add()` supports `value:` keyword arg for additional value.
19
+ * [enhance] `Facade#add()` and `Schema#add()` supports `detail:` keyword arg for detailed description.
20
+ * [enhance] `Facade#add()` and `Schema#add()` supports `tag:` keyword arg which accepts arbitrary value.
21
+ * [enhance] regard options which key name starts with '_' as hidden, as well as options which description is nil.
22
+ * [enhance] add `Schema#get()` which finds option item by key name.
23
+ * [enhance] add `Schema#delete()` which deletes option item by key name.
24
+ * [enhance] add `Schema#each()` which yields option items.
25
+ * [enhance] add `Schema#empty?(all: true)` which returns true if schema has no option items.
26
+ * [enhance] add `Schema#dup()` which duplicates each object.
27
+ * [enhance] add `Schema#copy_from(other)` which copies option items from other schema.
28
+ * [change] switch testing library from MiniTest to Oktest.
29
+ * [change] capitalize the first letter of error messages.
30
+
31
+
32
+ Release 1.1.0 (2021-01-18)
33
+ --------------------------
34
+
35
+ * [change] rename `build_option_help()` to `option_help()`.
36
+ * [change] shorten option help width when no long options defined.
37
+
38
+
6
39
  Release 1.0.0 (2021-01-17)
7
40
  --------------------------
8
41
 
data/MIT-LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021-2023 kuwata-lab.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.