simple-cli 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/simple/cli/runner.rb +10 -1
- data/lib/simple/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b82f6957d9167a66b92ba38862c4e99dfec7a110
|
4
|
+
data.tar.gz: 410a5e01f6c238aae72639196c31de3132ffce35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffd51cc1a8c68b7f18f48d107cb0372bb9df5b8e4c22acefc7669e14f34ad90544c47e09a46cb067895cc0f064e8fcc37dd8f3b5766536d1cc15e8aa26699ebb
|
7
|
+
data.tar.gz: d6786981885955ff79d78d6699e26995ffd8052d1e6a0d96198aee6f6528b31445fac3b83620088e9dde0b19f3c2168a1d2e495faa315c6dd2127c141a4aa087
|
data/Gemfile.lock
CHANGED
data/lib/simple/cli/runner.rb
CHANGED
@@ -32,6 +32,8 @@ class Simple::CLI::Runner
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
attr_accessor :subcommand
|
36
|
+
|
35
37
|
def run(*args)
|
36
38
|
extract_default_flags!(args)
|
37
39
|
|
@@ -46,6 +48,7 @@ class Simple::CLI::Runner
|
|
46
48
|
elsif command == :autocomplete_bash
|
47
49
|
autocomplete_bash(*args)
|
48
50
|
elsif commands.include?(command)
|
51
|
+
self.subcommand = command
|
49
52
|
@instance.run! command, *args_with_options(args)
|
50
53
|
else
|
51
54
|
help!
|
@@ -70,6 +73,8 @@ class Simple::CLI::Runner
|
|
70
73
|
|
71
74
|
#{edoc.full}
|
72
75
|
MSG
|
76
|
+
|
77
|
+
exit 1
|
73
78
|
end
|
74
79
|
|
75
80
|
def logger
|
@@ -82,7 +87,11 @@ class Simple::CLI::Runner
|
|
82
87
|
case e
|
83
88
|
when ArgumentError
|
84
89
|
logger.error "#{e}\n\n"
|
85
|
-
|
90
|
+
if subcommand
|
91
|
+
help_subcommand! subcommand
|
92
|
+
else
|
93
|
+
help!
|
94
|
+
end
|
86
95
|
else
|
87
96
|
msg = e.to_s
|
88
97
|
msg += " (#{e.class.name})" unless $!.class.name == "RuntimeError"
|
data/lib/simple/cli/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.8
|
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: 2018-
|
12
|
+
date: 2018-08-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|