dorian-arguments 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/dorian/arguments.rb +4 -3
- 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: d87282bf8b2865a5d902061364c6676b007f7c3ea33d7d1bffb1c3ac06dad7d4
|
4
|
+
data.tar.gz: de56a25f6c9cee3a576c3e3d607ab1e10594f9857758f221f9f15ad31e38f3eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3805164dbf37361497c93ac3984b66a672240344492f923b9cb6854e3e5be3ea9a1f5a05db0c7b58b84e9ab501790c60c0aa35f546c3b2a3f6b1109b4c59efd6
|
7
|
+
data.tar.gz: 90cbcfc94edd5772f6e86bd903b87618d6e87ac3b7417049e74f75b3b3ad1ef6f18068833bec9e5849f141610a8b7c253b89dd6d9b9a646e4ef1980a2282ffdb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/dorian/arguments.rb
CHANGED
@@ -31,14 +31,14 @@ class Dorian
|
|
31
31
|
}
|
32
32
|
|
33
33
|
MATCHES = {
|
34
|
-
BOOLEAN => /^(
|
34
|
+
BOOLEAN => /^(true|false)$/i,
|
35
35
|
STRING => /^.+$/i,
|
36
36
|
NUMBER => /^[0-9.]+$/i,
|
37
37
|
INTEGER => /^[0-9]+$/i,
|
38
38
|
DECIMAL => /^[0-9.]+$/i
|
39
39
|
}
|
40
40
|
|
41
|
-
BOOLEANS = { "
|
41
|
+
BOOLEANS = { "true" => true, "false" => false }
|
42
42
|
|
43
43
|
def initialize(**definition)
|
44
44
|
@definition = definition
|
@@ -125,7 +125,8 @@ class Dorian
|
|
125
125
|
.map { |key| key.size == 1 ? "-#{key}" : "--#{key}" }
|
126
126
|
.join("|")
|
127
127
|
|
128
|
-
message +=
|
128
|
+
message +=
|
129
|
+
" #{keys_message} #{type.upcase}, default: #{cast(type, default).inspect}\n"
|
129
130
|
end
|
130
131
|
|
131
132
|
message
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorian-arguments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|