command_kit 0.5.4 → 0.5.5
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 +13 -0
- data/lib/command_kit/interactive.rb +2 -2
- data/lib/command_kit/options.rb +9 -8
- data/lib/command_kit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a99a41f5bf2442e5523f9f7019dcd6b916f1b645786eefa9b0fb2a84aadd28c
|
4
|
+
data.tar.gz: 3fb73eaa7b3a5730baafd0d0bd02cc567e82020acc96dec6a87bf726666f4250
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44673dd7cb91fe176210e319c4055010c4e81af5dabf7eb420b202c1d42637e4844a1f5c99e0d81eeb52d32bfe9221de843b86c8d1f7fc91cc4aece561b46402
|
7
|
+
data.tar.gz: 2470a9c111f829fc858c03f8b9be2726028d59da449bd68f778f7d87dc3f6bd93051ad4339ea896fa15f81dbcba3fe06af0b3b1b72f4705108a6cbab5157cba1
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 0.5.5 / 2024-04-08
|
2
|
+
|
3
|
+
#### CommandKit::Interactive
|
4
|
+
|
5
|
+
* Ensure that the interactive prompt is re-printed when no input is entered
|
6
|
+
and input is required from the user.
|
7
|
+
|
8
|
+
#### CommandKit::Options
|
9
|
+
|
10
|
+
* Do not pass an Array of Regexp captures for an option's value Regexp type
|
11
|
+
into an option's block, if the option's block only accepts one argument.
|
12
|
+
Instead, only pass the option's value as a String.
|
13
|
+
|
1
14
|
### 0.5.4 / 2024-03-14
|
2
15
|
|
3
16
|
#### CommandKit::Options
|
data/lib/command_kit/options.rb
CHANGED
@@ -307,15 +307,16 @@ module CommandKit
|
|
307
307
|
end
|
308
308
|
|
309
309
|
option_parser.on(*option.usage,option.type,*option.desc) do |value|
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
310
|
+
if option.type.is_a?(Regexp) && value.is_a?(Array)
|
311
|
+
# separate the optiona value from the additional Regexp captures
|
312
|
+
value, *args = value
|
313
|
+
else
|
314
|
+
args = nil
|
315
|
+
end
|
316
316
|
|
317
|
-
|
318
|
-
|
317
|
+
@options[option.name] = value
|
318
|
+
instance_exec(value,*args,&option.block) if option.block
|
319
|
+
end
|
319
320
|
end
|
320
321
|
end
|
321
322
|
end
|
data/lib/command_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: command_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|