simple-cli 0.3.9 → 0.3.10

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: 297e161fcb2c8426beada50757d3107cde05b7f9858deaf0389726a3a2b85ad3
4
- data.tar.gz: 033eeb5d13ea4cebce51064c0456a51851abac2c43dc181388c8c202a61870e5
3
+ metadata.gz: 6149378f42ba8e4b7d5075801a3a56e2a4a98bf37a8e29229a14a0b81c3ab0f9
4
+ data.tar.gz: 4629cc796373fc73cb241318500ed336c029144eee97d99eb38f97401c364811
5
5
  SHA512:
6
- metadata.gz: 416a29e951d6df41e96392fc9e0c2e61c03684c87935aeecf51aba26b06239bde54ebdb3cd1a6d4e21f39fddb7b8eb61284fe8f9d912cbcdf7877b8b95b27aa1
7
- data.tar.gz: e26f3357392635d9e158b32702291eb046ae2e4ec6a0f4a736f71ea6471bcdaaf0010a5ee5b2baddf22d25552ba2f721d027554c4f07f933691b00e54913d17d
6
+ metadata.gz: 9ad86c6176ec1b22d3e30c8a8337de41a3365b18cff6482e98b7ef682516d161b78c046aca0825120f2ae5db16e76fd0e2f47ffe5b133ad1eed1fda292984b23
7
+ data.tar.gz: db3f806ad398c8f79ffbddc019750a493a056ac76c1b7549d6e30ccf69adaefcb4fd9508e2b00b8bb44af132f0ea8774f114dc9c3cc0fa003ef16b820421e366
data/Gemfile CHANGED
@@ -3,4 +3,8 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in {gemname}.gemspec
4
4
  gemspec
5
5
 
6
- # gem "simple-service", path: "../simple-service"
6
+ # development gems
7
+ gem 'rake', '~> 12'
8
+ gem 'rspec', '~> 3.7'
9
+ gem 'simplecov', '~> 0'
10
+ gem 'rubocop', '= 0.52.1'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.9
1
+ 0.3.10
@@ -2,13 +2,13 @@ module Simple::CLI
2
2
  module Helper
3
3
  def help!(service, verbose:)
4
4
  STDERR.puts <<~MSG
5
- #{H.binary_name} <command> [ options... ]
5
+ #{H.binary_name} <subcommand> [ options... ]
6
6
 
7
- Commands:
7
+ Subcommands:
8
8
 
9
9
  #{format_usages usages(service, verbose: verbose), prefix: " "}
10
10
 
11
- Default options and commands include:
11
+ Default options and subcommands include:
12
12
 
13
13
  #{format_usages default_usages(service, verbose: verbose), prefix: " "}
14
14
 
@@ -8,16 +8,32 @@ module Simple::CLI
8
8
  actions, hidden_actions = actions.partition(&:short_description)
9
9
 
10
10
  STDERR.puts <<~MSG
11
- #{H.binary_name} <command> [ options... ]
11
+ #{H.binary_name} <subcommand> [ options... ]
12
12
 
13
13
  MSG
14
14
 
15
- subcommands = actions.map { |action| "'" + H.action_to_command(action.name) + "'" }
16
- msg = "Subcommands include #{subcommands.sort.join(", ")}"
17
- msg += " (and an additional #{hidden_actions.count} internal commands)"
15
+ # if we don't have too many subcommands we print them here. If not, we only print their names
16
+ # and mention the help command.
17
+ if actions.count < 1
18
+ STDERR.puts <<~MSG
19
+ Subcommands:
20
+
21
+ #{format_usages usages(service, verbose: false), prefix: " "}
22
+
23
+ MSG
24
+ else
25
+ subcommands = actions.map { |action| "'" + H.action_to_command(action.name) + "'" }
26
+ msg = "Subcommands include #{subcommands.sort.join(", ")}"
27
+ msg += " (and, in addition, #{hidden_actions.count} internal commands)" if hidden_actions.count > 0
28
+
29
+ STDERR.puts <<~MSG
30
+ #{msg}. Run with "-h" for more details.
31
+
32
+ MSG
33
+ end
18
34
 
19
35
  STDERR.puts <<~MSG
20
- #{msg}. Default options and commands include:
36
+ Default options and subcommands include:
21
37
 
22
38
  #{format_usages default_usages(service, verbose: false), prefix: " "}
23
39
 
@@ -28,10 +28,4 @@ Gem::Specification.new do |gem|
28
28
 
29
29
  # optional gems (required by some of the parts)
30
30
  gem.add_dependency "simple-service", "~> 0.1.5"
31
-
32
- # development gems
33
- gem.add_development_dependency 'rake', '~> 12'
34
- gem.add_development_dependency 'rspec', '~> 3.7'
35
- gem.add_development_dependency 'simplecov', '~> 0'
36
- gem.add_development_dependency 'rubocop', '= 0.52.1'
37
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-01-27 00:00:00.000000000 Z
12
+ date: 2020-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simple-service
@@ -25,62 +25,6 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.1.5
28
- - !ruby/object:Gem::Dependency
29
- name: rake
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '12'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: '12'
42
- - !ruby/object:Gem::Dependency
43
- name: rspec
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '3.7'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '3.7'
56
- - !ruby/object:Gem::Dependency
57
- name: simplecov
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- - !ruby/object:Gem::Dependency
71
- name: rubocop
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - '='
75
- - !ruby/object:Gem::Version
76
- version: 0.52.1
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - '='
82
- - !ruby/object:Gem::Version
83
- version: 0.52.1
84
28
  description: Simple CLI builder
85
29
  email: eno@radiospiel.org
86
30
  executables: []