benry-cmdopt 1.1.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: e22704458cfcb32a806de14c4b4df853673de1309b964d4362e2cc9605f64fca
4
- data.tar.gz: 78a52a4a0d1b5d261bea63c58b454b0b68810f10fb3795e347644f269715580f
3
+ metadata.gz: eb91a08288099f5e011818d0dc0790f4a0ce39885417a248365bc1d34342f51b
4
+ data.tar.gz: 16ac9a7a312d7fac7ee082b20e18f16dfd0303f685028db29290bebd6e95fdf5
5
5
  SHA512:
6
- metadata.gz: b79a27875901ee9aaa5ef6f8bee208e2b5d76ff69511a9b47d741df9350c724f1b3c9530a48c80cc2e1bd69ce5283f447c104da0c2587ec96628750ce141031f
7
- data.tar.gz: e063f8ab5ab3d1054d96e1410b6b85d4517086d0c64772b1957951e6faada16e2e71d7333eb3388f981d545b1011db37a002fc7eb70cb7e637f5828165f1aef0
6
+ metadata.gz: cd5db670a903764317a3cc0a4a35f96b8c80b3bcc9e422c5d48da7d53a12847017c1175aef861af6abaaa43791e27824557f341d7b4038197fc8bdbfd7285bba
7
+ data.tar.gz: bf0c0b66d9c5972662c8bd45db7956fd1cb9a8b8562c3bb1e76fa3ff0421ab42feb8195c76fd04eeb110dd63f06cd787e394090d338b1571be6d9570f3852e28
data/CHANGES.md CHANGED
@@ -1,12 +1,38 @@
1
- =======
2
1
  CHANGES
3
2
  =======
4
3
 
5
4
 
6
- Release 1.0.0 (2021-01-18)
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)
7
33
  --------------------------
8
34
 
9
- * [change] rename 'build_option_help()' to 'option_help()'.
35
+ * [change] rename `build_option_help()` to `option_help()`.
10
36
  * [change] shorten option help width when no long options defined.
11
37
 
12
38
 
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.