eac_cli 0.44.4 → 0.45.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7dfc71f934fde7f3dd043951cddaa4df5b4c82645e1711d892a5e0ede457ecb
|
|
4
|
+
data.tar.gz: d11d44025c04b4f910a3d9e4579783f62bc4b92cd754559a81d643255e5b30ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 799c470b77e41ae0701690b5b72a4c1198da34bc113e8a10e5cb8bf1c20c70d1ba61bea2c7836da9a01c7b86c7ea17f740998b83b68e0b3e2e01e2bc7f950ee6
|
|
7
|
+
data.tar.gz: 5c0a6f5c1a312aec19dc389cf6d44f2eaf90c330d6b95447b450428aac9bbbf11a4c1d4297d4030a3e55c630f09a71dbd37e141393e49f2f5ff8d2013bf6e011
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'clipboard'
|
|
4
|
+
|
|
3
5
|
module EacCli
|
|
4
6
|
module RunnerWith
|
|
5
7
|
module Input
|
|
8
|
+
CLIPBOARD_OPTION = '!'
|
|
6
9
|
STDIN_OPTION = '-'
|
|
7
10
|
BLANK_OPTION = '+'
|
|
8
11
|
DEFAULT_DEFAULT_INPUT_OPTION = BLANK_OPTION
|
|
@@ -18,6 +21,7 @@ module EacCli
|
|
|
18
21
|
|
|
19
22
|
def input_content
|
|
20
23
|
case input_option
|
|
24
|
+
when CLIPBOARD_OPTION then ::Clipboard.paste
|
|
21
25
|
when STDIN_OPTION then $stdin.read
|
|
22
26
|
when BLANK_OPTION then ''
|
|
23
27
|
else input_option.to_pathname.read
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
module EacCli
|
|
4
4
|
module RunnerWith
|
|
5
5
|
module Output
|
|
6
|
+
CLIPBOARD_OPTION = '!'
|
|
6
7
|
STDOUT_OPTION = '-'
|
|
7
8
|
DEFAULT_FILE_OPTION = '+'
|
|
8
9
|
DEFAULT_DEFAULT_OUTPUT_OPTION = STDOUT_OPTION
|
|
@@ -21,23 +22,19 @@ module EacCli
|
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
def run_output
|
|
24
|
-
|
|
25
|
-
if file
|
|
26
|
-
file.to_pathname.write(output_content)
|
|
27
|
-
else
|
|
28
|
-
$stdout.write(output_content)
|
|
29
|
-
end
|
|
25
|
+
object_to_write.write(output_content)
|
|
30
26
|
end
|
|
31
27
|
|
|
32
28
|
def output_option
|
|
33
29
|
parsed.output || default_output_option_value
|
|
34
30
|
end
|
|
35
31
|
|
|
36
|
-
def
|
|
32
|
+
def object_to_write
|
|
37
33
|
case output_option
|
|
38
|
-
when
|
|
34
|
+
when CLIPBOARD_OPTION then ::EacCli::RunnerWith::Output::ClipboardWriter.new
|
|
35
|
+
when STDOUT_OPTION then $stdout
|
|
39
36
|
when DEFAULT_FILE_OPTION then default_file_to_output_value
|
|
40
|
-
else output_option
|
|
37
|
+
else output_option.to_pathname
|
|
41
38
|
end
|
|
42
39
|
end
|
|
43
40
|
|
|
@@ -46,8 +43,9 @@ module EacCli
|
|
|
46
43
|
default: DEFAULT_DEFAULT_OUTPUT_OPTION)
|
|
47
44
|
end
|
|
48
45
|
|
|
46
|
+
# @return [Pathname]
|
|
49
47
|
def default_file_to_output_value
|
|
50
|
-
setting_value(:default_file_to_output, default: DEFAULT_DEFAULT_FILE_TO_OUTPUT)
|
|
48
|
+
setting_value(:default_file_to_output, default: DEFAULT_DEFAULT_FILE_TO_OUTPUT).to_pathname
|
|
51
49
|
end
|
|
52
50
|
end
|
|
53
51
|
end
|
data/lib/eac_cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eac_cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.45.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esquilo Azul Company
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: clipboard
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '2.0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '2.0'
|
|
13
26
|
- !ruby/object:Gem::Dependency
|
|
14
27
|
name: colorize
|
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -92,8 +105,6 @@ dependencies:
|
|
|
92
105
|
- - "~>"
|
|
93
106
|
- !ruby/object:Gem::Version
|
|
94
107
|
version: '0.12'
|
|
95
|
-
description:
|
|
96
|
-
email:
|
|
97
108
|
executables: []
|
|
98
109
|
extensions: []
|
|
99
110
|
extra_rdoc_files: []
|
|
@@ -157,6 +168,7 @@ files:
|
|
|
157
168
|
- lib/eac_cli/runner_with/help/layout.rb
|
|
158
169
|
- lib/eac_cli/runner_with/input.rb
|
|
159
170
|
- lib/eac_cli/runner_with/output.rb
|
|
171
|
+
- lib/eac_cli/runner_with/output/clipboard_writer.rb
|
|
160
172
|
- lib/eac_cli/runner_with/output_item.rb
|
|
161
173
|
- lib/eac_cli/runner_with/output_item/asciidoc_formatter.rb
|
|
162
174
|
- lib/eac_cli/runner_with/output_item/base_formatter.rb
|
|
@@ -179,10 +191,8 @@ files:
|
|
|
179
191
|
- lib/eac_cli/speaker/options.rb
|
|
180
192
|
- lib/eac_cli/speaker/request_from_list.rb
|
|
181
193
|
- lib/eac_cli/version.rb
|
|
182
|
-
homepage:
|
|
183
194
|
licenses: []
|
|
184
195
|
metadata: {}
|
|
185
|
-
post_install_message:
|
|
186
196
|
rdoc_options: []
|
|
187
197
|
require_paths:
|
|
188
198
|
- lib
|
|
@@ -197,8 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
197
207
|
- !ruby/object:Gem::Version
|
|
198
208
|
version: '0'
|
|
199
209
|
requirements: []
|
|
200
|
-
rubygems_version: 3.
|
|
201
|
-
signing_key:
|
|
210
|
+
rubygems_version: 3.7.1
|
|
202
211
|
specification_version: 4
|
|
203
212
|
summary: Utilities to build CLI applications with Ruby.
|
|
204
213
|
test_files: []
|