cri 2.15.5 → 2.15.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/NEWS.md +6 -0
- data/lib/cri/help_renderer.rb +8 -2
- data/lib/cri/version.rb +1 -1
- data/test/test_help_renderer.rb +25 -0
- 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: 79a5265f39985bdcfc272fda054b0c9351be2e249d14ce8dd85d3cbff3964479
|
4
|
+
data.tar.gz: 9dcbb3ab7addc6dda23d1419370882401b91747c754e6a39d7777bbfc8e6c354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e5fd6d1a6c496fb1887e99c02255f438b9fa6734180bb2d09d3dbb349f30136ee16007195c2848bdb26d797f38c6d22473beaa06bf7bdc7d86734619955136d
|
7
|
+
data.tar.gz: c02067bfb085935f46cf8b35c37862a3eac282c1dfe2eb3bc6c6162f1370d4c5bfa390a2d8a80fc536e7207a5031e225c2e7c7a3bdf3ae8efa329c561402f8b2
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cri (2.15.
|
4
|
+
cri (2.15.6)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.0)
|
10
|
-
coveralls (0.8.
|
10
|
+
coveralls (0.8.23)
|
11
11
|
json (>= 1.8, < 3)
|
12
12
|
simplecov (~> 0.16.1)
|
13
13
|
term-ansicolor (~> 1.3)
|
14
|
-
thor (
|
14
|
+
thor (>= 0.19.4, < 2.0)
|
15
15
|
tins (~> 1.6)
|
16
16
|
docile (1.3.1)
|
17
17
|
jaro_winkler (1.5.2)
|
@@ -22,13 +22,13 @@ GEM
|
|
22
22
|
ast (~> 2.4.0)
|
23
23
|
rainbow (3.0.0)
|
24
24
|
rake (12.3.2)
|
25
|
-
rubocop (0.
|
25
|
+
rubocop (0.69.0)
|
26
26
|
jaro_winkler (~> 1.5.1)
|
27
27
|
parallel (~> 1.10)
|
28
|
-
parser (>= 2.
|
28
|
+
parser (>= 2.6)
|
29
29
|
rainbow (>= 2.2.2, < 4.0)
|
30
30
|
ruby-progressbar (~> 1.7)
|
31
|
-
unicode-display_width (>= 1.4.0, < 1.
|
31
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
32
32
|
ruby-progressbar (1.10.0)
|
33
33
|
simplecov (0.16.1)
|
34
34
|
docile (~> 1.1)
|
@@ -37,9 +37,9 @@ GEM
|
|
37
37
|
simplecov-html (0.10.2)
|
38
38
|
term-ansicolor (1.7.1)
|
39
39
|
tins (~> 1.0)
|
40
|
-
thor (0.
|
40
|
+
thor (0.20.3)
|
41
41
|
tins (1.20.2)
|
42
|
-
unicode-display_width (1.
|
42
|
+
unicode-display_width (1.6.0)
|
43
43
|
yard (0.9.19)
|
44
44
|
|
45
45
|
PLATFORMS
|
data/NEWS.md
CHANGED
data/lib/cri/help_renderer.rb
CHANGED
@@ -45,10 +45,16 @@ module Cri
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def append_summary(text)
|
48
|
-
return if @cmd.
|
48
|
+
return if @cmd.name.nil?
|
49
49
|
|
50
50
|
text << fmt.format_as_title('name', @io) << "\n"
|
51
|
-
|
51
|
+
|
52
|
+
text << ' ' << fmt.format_as_command(@cmd.name, @io)
|
53
|
+
if @cmd.summary
|
54
|
+
text << ' - ' << @cmd.summary
|
55
|
+
end
|
56
|
+
text << "\n"
|
57
|
+
|
52
58
|
unless @cmd.aliases.empty?
|
53
59
|
text << ' aliases: ' << @cmd.aliases.map { |a| fmt.format_as_command(a, @io) }.join(' ') << "\n"
|
54
60
|
end
|
data/lib/cri/version.rb
CHANGED
data/test/test_help_renderer.rb
CHANGED
@@ -43,5 +43,30 @@ module Cri
|
|
43
43
|
|
44
44
|
assert_match(/^ --with-animal\[=<value>\] Add animal \(default: giraffe\)$/, help)
|
45
45
|
end
|
46
|
+
|
47
|
+
def test_with_summary
|
48
|
+
cmd = Cri::Command.define do
|
49
|
+
name 'build'
|
50
|
+
summary 'do some buildage'
|
51
|
+
|
52
|
+
optional nil, :'with-animal', 'Add animal', default: 'giraffe'
|
53
|
+
end
|
54
|
+
|
55
|
+
help = help_for(cmd)
|
56
|
+
|
57
|
+
assert_match(/^NAME\n build - do some buildage\n$/, help)
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_without_summary
|
61
|
+
cmd = Cri::Command.define do
|
62
|
+
name 'build'
|
63
|
+
|
64
|
+
optional nil, :'with-animal', 'Add animal', default: 'giraffe'
|
65
|
+
end
|
66
|
+
|
67
|
+
help = help_for(cmd)
|
68
|
+
|
69
|
+
assert_match(/^NAME\n build\n$/, help)
|
70
|
+
end
|
46
71
|
end
|
47
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Cri allows building easy-to-use command-line interfaces with support
|
14
14
|
for subcommands.
|