eac_cli 0.44.3 → 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: 7e743c42c782689bd51e0f38150ae4e339b8d4081188682e0418a1775c37bb59
4
- data.tar.gz: 88f5176481933c16a1ed01c8150f144b1c3c77ed867c581fb1f8eaba0e09a485
3
+ metadata.gz: e7dfc71f934fde7f3dd043951cddaa4df5b4c82645e1711d892a5e0ede457ecb
4
+ data.tar.gz: d11d44025c04b4f910a3d9e4579783f62bc4b92cd754559a81d643255e5b30ad
5
5
  SHA512:
6
- metadata.gz: d689ee20be52e33891b18e884b9749f85e09a359afceec1b9a66c293b26ae7f812a4b7bd2d1f54375a8957b8a4d9eb8d9d38b6a01d63492f0e5fd573c71f2456
7
- data.tar.gz: b6acede36c5921c006f1a4fbd15d4780655e160c4d23fa32bf4fb5d65449a3282929ecb101a4a4db7af1af0dc5cd8e6ebe14d057d4cdc5f4f51e332626ced7e8
6
+ metadata.gz: 799c470b77e41ae0701690b5b72a4c1198da34bc113e8a10e5cb8bf1c20c70d1ba61bea2c7836da9a01c7b86c7ea17f740998b83b68e0b3e2e01e2bc7f950ee6
7
+ data.tar.gz: 5c0a6f5c1a312aec19dc389cf6d44f2eaf90c330d6b95447b450428aac9bbbf11a4c1d4297d4030a3e55c630f09a71dbd37e141393e49f2f5ff8d2013bf6e011
@@ -2,8 +2,6 @@
2
2
 
3
3
  module EacCli
4
4
  class Config < ::SimpleDelegator
5
- require_sub __FILE__
6
-
7
5
  def entry(path, options = {})
8
6
  ::EacCli::Config::Entry.new(self, path, options)
9
7
  end
@@ -4,8 +4,6 @@ module EacCli
4
4
  class Definition
5
5
  # @abstract
6
6
  class Option < ::EacCli::Definition::OptionOrPositional
7
- require_sub __FILE__
8
-
9
7
  class << self
10
8
  # @param args [Enumerable<String>]
11
9
  # @return [EacCli::Definition::Option]
@@ -2,8 +2,6 @@
2
2
 
3
3
  module EacCli
4
4
  class Definition
5
- require_sub __FILE__
6
-
7
5
  MAIN_ALTERNATIVE_KEY = :main
8
6
  SUBCOMMAND_NAME_ARG = 'subcommand'
9
7
  SUBCOMMAND_ARGS_ARG = 'subcommand_args'
@@ -2,7 +2,6 @@
2
2
 
3
3
  module EacCli
4
4
  class OldConfigs
5
- require_sub __FILE__
6
5
  enable_speaker
7
6
 
8
7
  class << self
@@ -2,7 +2,6 @@
2
2
 
3
3
  module EacCli
4
4
  class Parser
5
- require_sub __FILE__
6
5
  enable_simple_cache
7
6
  common_constructor :definition, :argv
8
7
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  module EacCli
4
4
  module Runner
5
- require_sub __FILE__
6
5
  extend ::ActiveSupport::Concern
7
6
 
8
7
  class << self
@@ -58,8 +58,6 @@ module EacCli
58
58
  def for_all_answers_uncached
59
59
  {}
60
60
  end
61
-
62
- require_sub __FILE__
63
61
  end
64
62
  end
65
63
  end
@@ -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
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'clipboard'
4
+
5
+ module EacCli
6
+ module RunnerWith
7
+ module Output
8
+ class ClipboardWriter
9
+ def write(content)
10
+ ::Clipboard.copy(content)
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -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
- file = file_to_output
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 file_to_output
32
+ def object_to_write
37
33
  case output_option
38
- when STDOUT_OPTION then nil
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
@@ -3,8 +3,6 @@
3
3
  module EacCli
4
4
  module RunnerWith
5
5
  module OutputItem
6
- require_sub __FILE__
7
-
8
6
  FORMATS = %w[asciidoc csv yaml].freeze
9
7
 
10
8
  common_concern do
@@ -3,8 +3,6 @@
3
3
  module EacCli
4
4
  module RunnerWith
5
5
  module OutputList
6
- require_sub __FILE__
7
-
8
6
  FORMATS = {
9
7
  'csv' => ::EacCli::RunnerWith::OutputList::CsvFormatter,
10
8
  'tty' => ::EacCli::RunnerWith::OutputList::TtyFormatter,
@@ -3,8 +3,6 @@
3
3
  module EacCli
4
4
  module RunnerWith
5
5
  module Subcommands
6
- require_sub __FILE__
7
-
8
6
  class << self
9
7
  delegate :runner?, to: :'::EacCli::Runner'
10
8
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/hash_with_indifferent_access'
4
- require 'ostruct'
5
4
 
6
5
  module EacCli
7
6
  class Speaker
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.44.3'
4
+ VERSION = '0.45.0'
5
5
  end
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.44.3
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: 2025-12-04 00:00:00.000000000 Z
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
@@ -53,7 +66,7 @@ dependencies:
53
66
  version: '0.128'
54
67
  - - ">="
55
68
  - !ruby/object:Gem::Version
56
- version: 0.128.5
69
+ version: 0.128.6
57
70
  type: :runtime
58
71
  prerelease: false
59
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -63,7 +76,7 @@ dependencies:
63
76
  version: '0.128'
64
77
  - - ">="
65
78
  - !ruby/object:Gem::Version
66
- version: 0.128.5
79
+ version: 0.128.6
67
80
  - !ruby/object:Gem::Dependency
68
81
  name: tty-table
69
82
  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: []
@@ -149,7 +160,6 @@ files:
149
160
  - lib/eac_cli/runner/exit.rb
150
161
  - lib/eac_cli/runner/for_context.rb
151
162
  - lib/eac_cli/runner/instance_methods.rb
152
- - lib/eac_cli/runner_with.rb
153
163
  - lib/eac_cli/runner_with/confirmation.rb
154
164
  - lib/eac_cli/runner_with/confirmation/input_result.rb
155
165
  - lib/eac_cli/runner_with/help.rb
@@ -158,6 +168,7 @@ files:
158
168
  - lib/eac_cli/runner_with/help/layout.rb
159
169
  - lib/eac_cli/runner_with/input.rb
160
170
  - lib/eac_cli/runner_with/output.rb
171
+ - lib/eac_cli/runner_with/output/clipboard_writer.rb
161
172
  - lib/eac_cli/runner_with/output_item.rb
162
173
  - lib/eac_cli/runner_with/output_item/asciidoc_formatter.rb
163
174
  - lib/eac_cli/runner_with/output_item/base_formatter.rb
@@ -180,10 +191,8 @@ files:
180
191
  - lib/eac_cli/speaker/options.rb
181
192
  - lib/eac_cli/speaker/request_from_list.rb
182
193
  - lib/eac_cli/version.rb
183
- homepage:
184
194
  licenses: []
185
195
  metadata: {}
186
- post_install_message:
187
196
  rdoc_options: []
188
197
  require_paths:
189
198
  - lib
@@ -198,8 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
207
  - !ruby/object:Gem::Version
199
208
  version: '0'
200
209
  requirements: []
201
- rubygems_version: 3.1.6
202
- signing_key:
210
+ rubygems_version: 3.7.1
203
211
  specification_version: 4
204
212
  summary: Utilities to build CLI applications with Ruby.
205
213
  test_files: []
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module EacCli
4
- module RunnerWith
5
- require_sub __FILE__
6
- end
7
- end