dorian-arguments 0.3.0 → 0.3.1
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: '09d9d32b127d6c1fa25991cc9cff847085177dc3172aaa819899922c6e959cba'
|
4
|
+
data.tar.gz: 8de0feb1f2b38a19e5c03de71f4b9d8327cb8dee3f156a2bb2430fe19910331e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30b7aea21028ceed58ae95be8ddee8d47f39e6bd3266c54aa7950307cd603ada2a26ba788d14d05e190d643113e269b5b09f3bd00a12428d8de9c527fa9107ad
|
7
|
+
data.tar.gz: dbbc563bd0387c247dba669edfbccc72775fdd19f8e2962dfdb759dd0c3c57cf5e9366f35d38c2c9473a4a8f5ec2effe4759cc14b9429d34ec2a51928cc8e37b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
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.1
|
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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|