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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aa6ef43a2c29d85b8117a0ebc74eb11ac6dd4da400b11d2e293a8aed7191f83
4
- data.tar.gz: f58d117040dcf1f7837b4424c9fb354ff511aef05e9efe59522289e1d0525448
3
+ metadata.gz: 79a5265f39985bdcfc272fda054b0c9351be2e249d14ce8dd85d3cbff3964479
4
+ data.tar.gz: 9dcbb3ab7addc6dda23d1419370882401b91747c754e6a39d7777bbfc8e6c354
5
5
  SHA512:
6
- metadata.gz: e0bcc46e15ee3ce256a68e97c665177a7ec310f4ecd547af56f427cb642490a037465c18bbf43d850125d51bdd8ab64d5726edfa7fd6b64872c89ca7c93da0f5
7
- data.tar.gz: b0903f9e3b20efc8a9940d10bec5324da81ffdda10ffe637d069df703b5845f144cbd22270dca1cd109c2f3d9de5efa07958bf040c61eaed9a29703ade8eb19a
6
+ metadata.gz: 2e5fd6d1a6c496fb1887e99c02255f438b9fa6734180bb2d09d3dbb349f30136ee16007195c2848bdb26d797f38c6d22473beaa06bf7bdc7d86734619955136d
7
+ data.tar.gz: c02067bfb085935f46cf8b35c37862a3eac282c1dfe2eb3bc6c6162f1370d4c5bfa390a2d8a80fc536e7207a5031e225c2e7c7a3bdf3ae8efa329c561402f8b2
@@ -1,17 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cri (2.15.5)
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.22)
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 (~> 0.19.4)
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.68.0)
25
+ rubocop (0.69.0)
26
26
  jaro_winkler (~> 1.5.1)
27
27
  parallel (~> 1.10)
28
- parser (>= 2.5, != 2.5.1.1)
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.6)
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.19.4)
40
+ thor (0.20.3)
41
41
  tins (1.20.2)
42
- unicode-display_width (1.5.0)
42
+ unicode-display_width (1.6.0)
43
43
  yard (0.9.19)
44
44
 
45
45
  PLATFORMS
data/NEWS.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Cri News
2
2
 
3
+ ## 2.15.6
4
+
5
+ Fixes:
6
+
7
+ * Fixed problem with help header not being shown if the summary is missing (#93)
8
+
3
9
  ## 2.15.5
4
10
 
5
11
  Fixes:
@@ -45,10 +45,16 @@ module Cri
45
45
  end
46
46
 
47
47
  def append_summary(text)
48
- return if @cmd.summary.nil?
48
+ return if @cmd.name.nil?
49
49
 
50
50
  text << fmt.format_as_title('name', @io) << "\n"
51
- text << " #{fmt.format_as_command(@cmd.name, @io)} - #{@cmd.summary}" << "\n"
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cri
4
4
  # The current Cri version.
5
- VERSION = '2.15.5'
5
+ VERSION = '2.15.6'
6
6
  end
@@ -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.5
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-04-29 00:00:00.000000000 Z
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.