eac_ruby_base0 0.6.0 → 0.7.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_ruby_base0/runner_with/input.rb +36 -0
- data/lib/eac_ruby_base0/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2ae142d31cfaa28f6d870e2a2401624770c2cb16a56e82b0140a0451367b708
|
4
|
+
data.tar.gz: f1715aca8f09e2cdb9ad2e795498d591a32c6c3fdccdab592f7185a2e9e3f7f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62c88b779246c825454b48b225b9367ff7d0dedb8ff64d5e2208128929054c98ff7c459d6c864f859c8deeb7171abfc9c356a28156b647d6e3b91be819f1c094
|
7
|
+
data.tar.gz: a772912235c747dbb35224429c1870172c3aeb2a8763c2a0364a340f565b0f651bee91f910f93372e6e47cc57ed5e0f7f1bd0bcb22ff477072a6117da03a5323
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/runner'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
require 'eac_ruby_utils/abstract_methods'
|
6
|
+
|
7
|
+
module EacRubyBase0
|
8
|
+
module RunnerWith
|
9
|
+
module Input
|
10
|
+
STDIN_OPTION = '-'
|
11
|
+
BLANK_OPTION = '+'
|
12
|
+
DEFAULT_DEFAULT_INPUT_OPTION = BLANK_OPTION
|
13
|
+
|
14
|
+
common_concern do
|
15
|
+
enable_settings_provider
|
16
|
+
include ::EacCli::Runner
|
17
|
+
|
18
|
+
runner_definition do
|
19
|
+
arg_opt '-i', '--input', 'Input from file.'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def input_content
|
24
|
+
case input_option
|
25
|
+
when STDIN_OPTION then $stdin.read
|
26
|
+
when BLANK_OPTION then ''
|
27
|
+
else input_option.to_pathname.read
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def input_option
|
32
|
+
parsed.input || setting_value(:default_input_option, default: DEFAULT_DEFAULT_INPUT_OPTION)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_base0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02
|
11
|
+
date: 2021-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/eac_ruby_base0/runner_with.rb
|
99
99
|
- lib/eac_ruby_base0/runner_with/confirmation.rb
|
100
100
|
- lib/eac_ruby_base0/runner_with/filesystem_traverser.rb
|
101
|
+
- lib/eac_ruby_base0/runner_with/input.rb
|
101
102
|
- lib/eac_ruby_base0/runner_with/output.rb
|
102
103
|
- lib/eac_ruby_base0/version.rb
|
103
104
|
homepage:
|
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
119
|
- !ruby/object:Gem::Version
|
119
120
|
version: '0'
|
120
121
|
requirements: []
|
121
|
-
rubygems_version: 3.0.
|
122
|
+
rubygems_version: 3.0.9
|
122
123
|
signing_key:
|
123
124
|
specification_version: 4
|
124
125
|
summary: Put here de description.
|