eac_cli 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_cli/default_runner.rb +6 -14
- data/lib/eac_cli/runner_with.rb +9 -0
- data/lib/eac_cli/runner_with/help.rb +19 -0
- data/lib/eac_cli/runner_with/output_file.rb +26 -0
- data/lib/eac_cli/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2394340a91e194094ac27e21e6db64b5b6492b007ab6404843986e56f0807391
|
4
|
+
data.tar.gz: f5fc6d5e1bee5b9823de665dea129692c033b456835d6e622aa1911ee88663f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 481e7358a387eb583e4c52543800bd00f83ebb678d56a8c9998fef2559da41dcea911c79b0fc0802b4453f56d3ca70fb11a6643da6dc2f9783207c6a465e4bb7
|
7
|
+
data.tar.gz: 6d96d7e85ab52bb5be2ac121faac418780147c5491b978a170791d087ed7a9be3dcba6bc4f1f5812d0dc45ec482ea25459c63f49ce95db1df65aff196d4e8725
|
@@ -1,22 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require 'eac_ruby_utils/console/speaker'
|
6
|
-
require 'eac_ruby_utils/simple_cache'
|
3
|
+
require 'eac_cli/runner_with/help'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
7
5
|
|
8
6
|
module EacCli
|
9
7
|
module DefaultRunner
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
include ::EacRubyUtils::Console::Speaker
|
15
|
-
include ::EacRubyUtils::SimpleCache
|
16
|
-
runner_definition.alt do
|
17
|
-
options_arg false
|
18
|
-
bool_opt '-h', '--help', 'Show help.', usage: true
|
19
|
-
end
|
8
|
+
common_concern do
|
9
|
+
include ::EacCli::RunnerWith::Help
|
10
|
+
enable_console_speaker
|
11
|
+
enable_simple_cache
|
20
12
|
end
|
21
13
|
end
|
22
14
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/runner'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module EacCli
|
7
|
+
module RunnerWith
|
8
|
+
module Help
|
9
|
+
common_concern do
|
10
|
+
include ::EacCli::Runner
|
11
|
+
|
12
|
+
runner_definition.alt do
|
13
|
+
options_arg false
|
14
|
+
bool_opt '-h', '--help', 'Show help.', usage: true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/runner'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module EacCli
|
7
|
+
module RunnerWith
|
8
|
+
module OutputFile
|
9
|
+
common_concern do
|
10
|
+
include ::EacCli::Runner
|
11
|
+
|
12
|
+
runner_definition do
|
13
|
+
arg_opt '-o', '--output-file', 'Output to file.'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def run_output
|
18
|
+
if parsed.output_file.present?
|
19
|
+
::File.write(parsed.output_file, output_content)
|
20
|
+
else
|
21
|
+
out output_content
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/eac_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +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.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_ruby_utils
|
@@ -68,6 +68,9 @@ files:
|
|
68
68
|
- lib/eac_cli/parser/positional_collection.rb
|
69
69
|
- lib/eac_cli/runner.rb
|
70
70
|
- lib/eac_cli/runner/context.rb
|
71
|
+
- lib/eac_cli/runner_with.rb
|
72
|
+
- lib/eac_cli/runner_with/help.rb
|
73
|
+
- lib/eac_cli/runner_with/output_file.rb
|
71
74
|
- lib/eac_cli/version.rb
|
72
75
|
homepage:
|
73
76
|
licenses: []
|