simple-cli 0.3.13 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/simple/cli/runner.rb +2 -4
- data/lib/simple/cli.rb +16 -1
- data/simple-cli.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57be6c0879e7d923ece91db99463f558eea2618264a65fb9d75a26a402886b5d
|
4
|
+
data.tar.gz: 5153c943beb52a0cbd0057e9be0afae4c8195ac83ef0e5697b75403c5e252503
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1caf4c5fb6a4ca094b48a3449c5362a85107f2983889d1f5a9c36c758c678e39c08e64fb20ebcee5bff95d0afefdee9c642f9e4dc7855aef3d7a9cb52b7312fc
|
7
|
+
data.tar.gz: ccff67f4f0b1ff39284ca6e04f6045fbe7d6357178d21b2f836ed59257e2ace83e4dcb48f50c8105a0e06c44e5fbc24f6e0e3ae00cd76444e54ddb081641b302
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.2
|
data/lib/simple/cli/runner.rb
CHANGED
@@ -10,10 +10,8 @@ module Simple::CLI
|
|
10
10
|
_ = verbose
|
11
11
|
|
12
12
|
action_name = H.command_to_action(command)
|
13
|
-
|
14
|
-
|
15
|
-
::Simple::Service.invoke(service, action_name, args: args, flags: flags)
|
16
|
-
end
|
13
|
+
flags = extract_flags!(args)
|
14
|
+
::Simple::Service.invoke(service, action_name, args: args, flags: flags)
|
17
15
|
end
|
18
16
|
|
19
17
|
private
|
data/lib/simple/cli.rb
CHANGED
@@ -87,7 +87,22 @@ module Simple::CLI
|
|
87
87
|
# Run service.
|
88
88
|
Runner.run! service, options.command, *args, verbose: options.verbose?
|
89
89
|
rescue ::Simple::Service::ArgumentError
|
90
|
-
|
90
|
+
STDERR.puts <<~MSG
|
91
|
+
#{$!}
|
92
|
+
|
93
|
+
You probably run the command with invalid arguments; to learn more run
|
94
|
+
|
95
|
+
#{$0} help #{options.command}
|
96
|
+
MSG
|
97
|
+
|
98
|
+
if options.verbose?
|
99
|
+
STDERR.puts <<~MSG
|
100
|
+
|
101
|
+
Error location:
|
102
|
+
|
103
|
+
- #{$!.backtrace[0,5].join("\n- ")}
|
104
|
+
MSG
|
105
|
+
end
|
91
106
|
rescue StandardError => e
|
92
107
|
on_exception(e)
|
93
108
|
exit 3
|
data/simple-cli.gemspec
CHANGED
@@ -24,8 +24,8 @@ Gem::Specification.new do |gem|
|
|
24
24
|
# executables are used for development purposes only
|
25
25
|
gem.executables = []
|
26
26
|
|
27
|
-
gem.required_ruby_version = '
|
27
|
+
gem.required_ruby_version = '>= 2.5'
|
28
28
|
|
29
29
|
# optional gems (required by some of the parts)
|
30
|
-
gem.add_dependency "simple-service", "~> 0.
|
30
|
+
gem.add_dependency "simple-service", "~> 0.2.2"
|
31
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.
|
4
|
+
version: 0.4.2
|
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: 2022-
|
12
|
+
date: 2022-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simple-service
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.2.2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.2.2
|
28
28
|
description: Simple CLI builder
|
29
29
|
email: eno@radiospiel.org
|
30
30
|
executables: []
|
@@ -73,9 +73,9 @@ require_paths:
|
|
73
73
|
- lib
|
74
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- - "
|
76
|
+
- - ">="
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: '2.
|
78
|
+
version: '2.5'
|
79
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - ">="
|