eac_cli 0.45.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/eac_cli/definition/option_or_positional.rb +2 -2
- data/lib/eac_cli/definition.rb +2 -2
- data/lib/eac_cli/parser/alternative/long_options.rb +1 -1
- data/lib/eac_cli/parser/alternative/short_options.rb +1 -1
- data/lib/eac_cli/patches/object/runner_with.rb +1 -0
- data/lib/eac_cli/patches/object.rb +1 -1
- data/lib/eac_cli/runner/context.rb +4 -4
- data/lib/eac_cli/runner/context_responders/parent.rb +2 -2
- data/lib/eac_cli/runner/context_responders/runner.rb +2 -2
- data/lib/eac_cli/runner/context_responders/runner_missing_method.rb +2 -2
- data/lib/eac_cli/runner_with/output_item/asciidoc_formatter/section.rb +31 -0
- data/lib/eac_cli/runner_with/output_item/asciidoc_formatter.rb +1 -21
- data/lib/eac_cli/runner_with/subcommands.rb +2 -2
- data/lib/eac_cli/version.rb +1 -1
- metadata +15 -15
- data/Gemfile +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b103f559a5e998c87f383a57e13ece78c32d667304c5eb23d1f7a4ced5a911bf
|
|
4
|
+
data.tar.gz: 003003314c01960993d67eb43f9fb434b0bfc446b38f40558ac77d7f7f8821f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8c56048566cce312b629197d04eae57256f7c5f282d208b1009f279199d51fb879726478a368c51326ea582ef90ae95c7e77914e00a8b344424970253be6c3b
|
|
7
|
+
data.tar.gz: 5bbeec3b88ec65a374ce56ed86497f63892cb4eea6590a51d74e42ed3d4ad6c8d5c696f031763cde7a31d579ce812b713c5d2bab9a3c88db3f22d39510311c30
|
data/lib/eac_cli/definition.rb
CHANGED
|
@@ -15,13 +15,13 @@ module EacCli
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# @return [EacCli::Definition::Alternative]
|
|
18
|
-
def alt(key = nil, &
|
|
18
|
+
def alt(key = nil, &)
|
|
19
19
|
key ||= new_alternative_key
|
|
20
20
|
raise(::EacCli::Definition::Error, "A alternative with key=\"#{key}\" already exists") if
|
|
21
21
|
key.present? && alternatives_set.key?(key)
|
|
22
22
|
|
|
23
23
|
r = ::EacCli::Definition::Alternative.new
|
|
24
|
-
r.instance_eval(&
|
|
24
|
+
r.instance_eval(&)
|
|
25
25
|
alternatives_set[key] = r
|
|
26
26
|
r
|
|
27
27
|
end
|
|
@@ -14,8 +14,8 @@ module EacCli
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# Call a method in the runner or in one of it ancestors.
|
|
17
|
-
def call(method_name,
|
|
18
|
-
context_call_responder(method_name).call(
|
|
17
|
+
def call(method_name, *, &)
|
|
18
|
+
context_call_responder(method_name).call(*, &)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
# @return [EacCli::Runner::ContextResponders]
|
|
@@ -40,8 +40,8 @@ module EacCli
|
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def parent_call(method_name,
|
|
44
|
-
return parent.runner_context.call(method_name,
|
|
43
|
+
def parent_call(method_name, *, &)
|
|
44
|
+
return parent.runner_context.call(method_name, *, &) if
|
|
45
45
|
parent.respond_to?(:runner_context)
|
|
46
46
|
|
|
47
47
|
raise "Parent #{parent} do not respond to .context or .runner_context (Runner: #{runner})"
|
|
@@ -12,8 +12,8 @@ module EacCli
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def call(
|
|
16
|
-
return parent.runner_context.call(method_name,
|
|
15
|
+
def call(*, &)
|
|
16
|
+
return parent.runner_context.call(method_name, *, &) if
|
|
17
17
|
parent.respond_to?(:runner_context)
|
|
18
18
|
|
|
19
19
|
raise "Parent #{parent} do not respond to .context or .runner_context (Runner: #{runner})"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EacCli
|
|
4
|
+
module RunnerWith
|
|
5
|
+
module OutputItem
|
|
6
|
+
class AsciidocFormatter < ::EacCli::RunnerWith::OutputItem::BaseFormatter
|
|
7
|
+
class Section
|
|
8
|
+
acts_as_instance_method
|
|
9
|
+
common_constructor :caller, :title, :content, :level
|
|
10
|
+
|
|
11
|
+
# @return [String]
|
|
12
|
+
def result
|
|
13
|
+
"#{formatted_title}#{formatted_content}"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
protected
|
|
17
|
+
|
|
18
|
+
# @return [String]
|
|
19
|
+
def formatted_title
|
|
20
|
+
title.if_present('') { |_e| "#{'=' * level} #{title}\n\n" }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @return [String]
|
|
24
|
+
def formatted_content
|
|
25
|
+
caller.send(:output_object, content, level + 1)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -43,27 +43,7 @@ module EacCli
|
|
|
43
43
|
"* #{string.to_s.strip}\n"
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
# @param content [String]
|
|
48
|
-
# @param level [Integer]
|
|
49
|
-
# @return [String]
|
|
50
|
-
def section(title, content, level)
|
|
51
|
-
"#{section_title(title, level)}\n\n#{section_content(content, level)}"
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# @param title [String]
|
|
55
|
-
# @param level [Integer]
|
|
56
|
-
# @return [String]
|
|
57
|
-
def section_title(title, level)
|
|
58
|
-
"#{'=' * level} #{title}"
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# @param content [String]
|
|
62
|
-
# @param level [Integer]
|
|
63
|
-
# @return [String]
|
|
64
|
-
def section_content(content, level)
|
|
65
|
-
output_object(content, level)
|
|
66
|
-
end
|
|
46
|
+
require_sub __FILE__, require_mode: :kernel
|
|
67
47
|
end
|
|
68
48
|
end
|
|
69
49
|
end
|
|
@@ -49,8 +49,8 @@ module EacCli
|
|
|
49
49
|
help_list_section('Subcommands', available_subcommands.keys.sort)
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
def method_missing(method_name,
|
|
53
|
-
return run_with_subcommand(
|
|
52
|
+
def method_missing(method_name, *, &)
|
|
53
|
+
return run_with_subcommand(*, &) if
|
|
54
54
|
run_with_subcommand_alias_run?(method_name)
|
|
55
55
|
|
|
56
56
|
super
|
data/lib/eac_cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eac_cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.47.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esquilo Azul Company
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-05-15 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: clipboard
|
|
@@ -63,20 +64,14 @@ dependencies:
|
|
|
63
64
|
requirements:
|
|
64
65
|
- - "~>"
|
|
65
66
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: '0.
|
|
67
|
-
- - ">="
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: 0.128.6
|
|
67
|
+
version: '0.131'
|
|
70
68
|
type: :runtime
|
|
71
69
|
prerelease: false
|
|
72
70
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
71
|
requirements:
|
|
74
72
|
- - "~>"
|
|
75
73
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: '0.
|
|
77
|
-
- - ">="
|
|
78
|
-
- !ruby/object:Gem::Version
|
|
79
|
-
version: 0.128.6
|
|
74
|
+
version: '0.131'
|
|
80
75
|
- !ruby/object:Gem::Dependency
|
|
81
76
|
name: tty-table
|
|
82
77
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -97,19 +92,20 @@ dependencies:
|
|
|
97
92
|
requirements:
|
|
98
93
|
- - "~>"
|
|
99
94
|
- !ruby/object:Gem::Version
|
|
100
|
-
version: '0.
|
|
95
|
+
version: '0.13'
|
|
101
96
|
type: :development
|
|
102
97
|
prerelease: false
|
|
103
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
104
99
|
requirements:
|
|
105
100
|
- - "~>"
|
|
106
101
|
- !ruby/object:Gem::Version
|
|
107
|
-
version: '0.
|
|
102
|
+
version: '0.13'
|
|
103
|
+
description:
|
|
104
|
+
email:
|
|
108
105
|
executables: []
|
|
109
106
|
extensions: []
|
|
110
107
|
extra_rdoc_files: []
|
|
111
108
|
files:
|
|
112
|
-
- Gemfile
|
|
113
109
|
- lib/eac_cli.rb
|
|
114
110
|
- lib/eac_cli/config.rb
|
|
115
111
|
- lib/eac_cli/config/entry.rb
|
|
@@ -171,6 +167,7 @@ files:
|
|
|
171
167
|
- lib/eac_cli/runner_with/output/clipboard_writer.rb
|
|
172
168
|
- lib/eac_cli/runner_with/output_item.rb
|
|
173
169
|
- lib/eac_cli/runner_with/output_item/asciidoc_formatter.rb
|
|
170
|
+
- lib/eac_cli/runner_with/output_item/asciidoc_formatter/section.rb
|
|
174
171
|
- lib/eac_cli/runner_with/output_item/base_formatter.rb
|
|
175
172
|
- lib/eac_cli/runner_with/output_item/csv_formatter.rb
|
|
176
173
|
- lib/eac_cli/runner_with/output_item/yaml_formatter.rb
|
|
@@ -191,8 +188,10 @@ files:
|
|
|
191
188
|
- lib/eac_cli/speaker/options.rb
|
|
192
189
|
- lib/eac_cli/speaker/request_from_list.rb
|
|
193
190
|
- lib/eac_cli/version.rb
|
|
191
|
+
homepage:
|
|
194
192
|
licenses: []
|
|
195
193
|
metadata: {}
|
|
194
|
+
post_install_message:
|
|
196
195
|
rdoc_options: []
|
|
197
196
|
require_paths:
|
|
198
197
|
- lib
|
|
@@ -200,14 +199,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
200
199
|
requirements:
|
|
201
200
|
- - ">="
|
|
202
201
|
- !ruby/object:Gem::Version
|
|
203
|
-
version: 2
|
|
202
|
+
version: '3.2'
|
|
204
203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
204
|
requirements:
|
|
206
205
|
- - ">="
|
|
207
206
|
- !ruby/object:Gem::Version
|
|
208
207
|
version: '0'
|
|
209
208
|
requirements: []
|
|
210
|
-
rubygems_version: 3.
|
|
209
|
+
rubygems_version: 3.4.19
|
|
210
|
+
signing_key:
|
|
211
211
|
specification_version: 4
|
|
212
212
|
summary: Utilities to build CLI applications with Ruby.
|
|
213
213
|
test_files: []
|