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 +4 -4
- data/Gemfile +5 -1
- data/VERSION +1 -1
- data/lib/simple/cli/helper/help.rb +3 -3
- data/lib/simple/cli/helper/short_help.rb +21 -5
- data/simple-cli.gemspec +0 -6
- metadata +2 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6149378f42ba8e4b7d5075801a3a56e2a4a98bf37a8e29229a14a0b81c3ab0f9
|
4
|
+
data.tar.gz: 4629cc796373fc73cb241318500ed336c029144eee97d99eb38f97401c364811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
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.
|
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} <
|
5
|
+
#{H.binary_name} <subcommand> [ options... ]
|
6
6
|
|
7
|
-
|
7
|
+
Subcommands:
|
8
8
|
|
9
9
|
#{format_usages usages(service, verbose: verbose), prefix: " "}
|
10
10
|
|
11
|
-
Default options and
|
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} <
|
11
|
+
#{H.binary_name} <subcommand> [ options... ]
|
12
12
|
|
13
13
|
MSG
|
14
14
|
|
15
|
-
subcommands
|
16
|
-
|
17
|
-
|
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
|
-
|
36
|
+
Default options and subcommands include:
|
21
37
|
|
22
38
|
#{format_usages default_usages(service, verbose: false), prefix: " "}
|
23
39
|
|
data/simple-cli.gemspec
CHANGED
@@ -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.
|
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-
|
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: []
|