eac_ruby_base0 0.9.0 → 0.10.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/application.rb +14 -3
- data/lib/eac_ruby_base0/runner.rb +7 -4
- data/lib/eac_ruby_base0/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34b99d130c097b0cc5861ef5bbf142142ce55196d3a7871ac301bad86591c2b6
|
4
|
+
data.tar.gz: 8fbd22d9230277a1658d234706639241b6838f36d02693d7763babfd8e2300b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 949b3bce253b5517eab405243f681ffb9851ea514386ef1cf3d4b117777245e4b90c018840307fcc66afa8716449ac78a7d795fd33b53b345a8b3b1f06253060
|
7
|
+
data.tar.gz: 537b3af24a0ce7cfa5bb4909b102c81d4c4ca5cb86e0e0003c2e458d96fba375fd5d14ab3a8235f2438e53e6b164e86ba095a036369056f3b9712e408c1fa0fe
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_cli/
|
3
|
+
require 'eac_cli/config'
|
4
|
+
require 'eac_config/envvars_node'
|
5
|
+
require 'eac_config/yaml_file_node'
|
4
6
|
require 'eac_ruby_base0/application_xdg'
|
5
7
|
require 'eac_ruby_gems_utils/gem'
|
6
8
|
require 'eac_ruby_utils/core_ext'
|
@@ -23,9 +25,18 @@ module EacRubyBase0
|
|
23
25
|
vendor_gems + [self_gem]
|
24
26
|
end
|
25
27
|
|
26
|
-
# @return [EacCli::
|
28
|
+
# @return [EacCli::Config]
|
27
29
|
def build_config(path = nil)
|
28
|
-
::
|
30
|
+
envvar_node = ::EacConfig::EnvvarsNode.new
|
31
|
+
file_node = ::EacConfig::YamlFileNode.new(path || config_default_path)
|
32
|
+
envvar_node.load_path.push(file_node.url)
|
33
|
+
envvar_node.write_node = file_node
|
34
|
+
::EacCli::Config.new(envvar_node)
|
35
|
+
end
|
36
|
+
|
37
|
+
# @return [EacCli::Config]
|
38
|
+
def config_default_path
|
39
|
+
config_dir.join('eac_config.yaml')
|
29
40
|
end
|
30
41
|
|
31
42
|
::EacRubyBase0::ApplicationXdg::DIRECTORIES.each_key do |item|
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/core_ext'
|
4
4
|
require 'eac_cli/speaker'
|
5
|
+
require 'eac_config/node'
|
5
6
|
require 'eac_ruby_utils/speaker'
|
6
7
|
|
7
8
|
module EacRubyBase0
|
@@ -23,10 +24,12 @@ module EacRubyBase0
|
|
23
24
|
|
24
25
|
def run
|
25
26
|
::EacRubyUtils::Speaker.context.on(build_speaker) do
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
::EacConfig::Node.context.on(runner_context.call(:application).build_config) do
|
28
|
+
if parsed.version?
|
29
|
+
show_version
|
30
|
+
else
|
31
|
+
run_with_subcommand
|
32
|
+
end
|
30
33
|
end
|
31
34
|
end
|
32
35
|
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.10.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-06-
|
11
|
+
date: 2021-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|