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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f4816a86d6b802c97493e9961b17d2a3db19c3f00de186fe59b40b4de53a8cc
4
- data.tar.gz: dc86cba3ab4c96a2c071f6bdf517c5db19e7186caaee9e8962954484139ce1ca
3
+ metadata.gz: 57be6c0879e7d923ece91db99463f558eea2618264a65fb9d75a26a402886b5d
4
+ data.tar.gz: 5153c943beb52a0cbd0057e9be0afae4c8195ac83ef0e5697b75403c5e252503
5
5
  SHA512:
6
- metadata.gz: df10c1919a31273bedac7729af01334743854afceff9feb138daf880424db897fcc006812296334d0ab08036152d4a25ac7f8a88093e1a205d0dbc935f5b1929
7
- data.tar.gz: cc4be6f1c00b1c91664847444f31b3cfd0065df07f85d1d9a4cf8083984cf59f30b0c7aded89da189de319452fda1a063d22b315af4d0b1a62d0999367186875
6
+ metadata.gz: 1caf4c5fb6a4ca094b48a3449c5362a85107f2983889d1f5a9c36c758c678e39c08e64fb20ebcee5bff95d0afefdee9c642f9e4dc7855aef3d7a9cb52b7312fc
7
+ data.tar.gz: ccff67f4f0b1ff39284ca6e04f6045fbe7d6357178d21b2f836ed59257e2ace83e4dcb48f50c8105a0e06c44e5fbc24f6e0e3ae00cd76444e54ddb081641b302
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.13
1
+ 0.4.2
@@ -10,10 +10,8 @@ module Simple::CLI
10
10
  _ = verbose
11
11
 
12
12
  action_name = H.command_to_action(command)
13
- Simple::Service.with_context do
14
- flags = extract_flags!(args)
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
- Helper.help_on_command! service, options.command, verbose: false
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 = '~> 2.3'
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.1.5"
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.3.13
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-06-06 00:00:00.000000000 Z
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.1.5
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.1.5
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.3'
78
+ version: '2.5'
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="