eac_ruby_base0 0.8.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10ee625f182f3829966f72f31ca5a5f8fd0e3014754ae85bcb77a4e0ddff1c34
4
- data.tar.gz: 27cc3c2e2b5b60d294eb225a67aac634774b73611ff4246d3f0929815664a407
3
+ metadata.gz: 630a1de50d1564747c0f1d41f3e902b24c0e65f6e42bdcc0dc4d5ba42d1b63d4
4
+ data.tar.gz: b092b47b6001a9344325f0a85dff539e8fd3aaab1d0f47b3b6bf8b99f48fe769
5
5
  SHA512:
6
- metadata.gz: 7764d32f1bac074a0d096f6642264b59aea8363f89b9d50c0c4402e5eccd0d0230f374a4fb57ac73a8668319b9e10dd7d026ef10cdfe0d400e08a19f15d014ec
7
- data.tar.gz: b420f162aa98c9772b63f171f5732b8d59865d45d4858071b8ceefcd6c91492aebedf3b8a7aa36a63e73bf0d639ccb6c2f9bc7218d061f05dff66c47b36abc7a
6
+ metadata.gz: e047ec6939b237ed87b79bdfa1866f6533c62cc26036339a11db52d2ce45031c6abba799354d4bc2922c45492eef43ca1eb6c1bbdf49124ad8332d12a8d3e984
7
+ data.tar.gz: 837a34b14b75c0bc8391c2fe018b64e7e714ce88e2eb7ab49f1c2c2c0c5c4e3752f02aad2db552c73cb9125b30434496ea0835c8ae820c3cfe08e962264bd205
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_cli/config'
4
+ require 'eac_config/envvars_node'
5
+ require 'eac_config/yaml_file_node'
6
+ require 'eac_fs/cache'
3
7
  require 'eac_ruby_base0/application_xdg'
4
8
  require 'eac_ruby_gems_utils/gem'
5
9
  require 'eac_ruby_utils/core_ext'
6
- require 'eac_ruby_utils/filesystem_cache'
7
10
 
8
11
  module EacRubyBase0
9
12
  class Application
@@ -22,13 +25,27 @@ module EacRubyBase0
22
25
  vendor_gems + [self_gem]
23
26
  end
24
27
 
28
+ # @return [EacCli::Config]
29
+ def build_config(path = nil)
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')
40
+ end
41
+
25
42
  ::EacRubyBase0::ApplicationXdg::DIRECTORIES.each_key do |item|
26
43
  delegate "#{item}_xdg_env", "#{item}_dir", to: :app_xdg
27
44
  end
28
45
 
29
46
  def fs_cache
30
- @fs_cache ||= ::EacRubyUtils::FilesystemCache.new(
31
- cache_dir.join(::EacRubyUtils::FilesystemCache.name.parameterize)
47
+ @fs_cache ||= ::EacFs::Cache.new(
48
+ cache_dir.join(::EacFs::Cache.name.parameterize)
32
49
  )
33
50
  end
34
51
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/core_ext'
4
+
3
5
  module EacRubyBase0
4
6
  # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
5
7
  class ApplicationXdg
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_cli/core_ext'
4
+ require 'eac_fs/patches'
4
5
  require 'eac_ruby_base0/patches'
@@ -2,6 +2,8 @@
2
2
 
3
3
  require 'eac_cli/core_ext'
4
4
  require 'eac_cli/speaker'
5
+ require 'eac_config/node'
6
+ require 'eac_fs/cache'
5
7
  require 'eac_ruby_utils/speaker'
6
8
 
7
9
  module EacRubyBase0
@@ -22,7 +24,7 @@ module EacRubyBase0
22
24
  end
23
25
 
24
26
  def run
25
- ::EacRubyUtils::Speaker.context.on(build_speaker) do
27
+ on_context do
26
28
  if parsed.version?
27
29
  show_version
28
30
  else
@@ -35,6 +37,16 @@ module EacRubyBase0
35
37
  runner_context.call(:application).version.to_s
36
38
  end
37
39
 
40
+ def on_context
41
+ ::EacRubyUtils::Speaker.context.on(build_speaker) do
42
+ ::EacConfig::Node.context.on(runner_context.call(:application).build_config) do
43
+ ::EacFs::Cache.context.on(application.fs_cache) do
44
+ yield
45
+ end
46
+ end
47
+ end
48
+ end
49
+
38
50
  def show_version
39
51
  out("#{application_version}\n")
40
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.8.0'
4
+ VERSION = '0.11.0'
5
5
  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.8.0
4
+ version: 0.11.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 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_cli
@@ -16,56 +16,82 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.20'
19
+ version: '0.22'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.22.2
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '0.20'
29
+ version: '0.22'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.22.2
33
+ - !ruby/object:Gem::Dependency
34
+ name: eac_fs
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.3'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.3'
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: eac_ruby_gems_utils
29
49
  requirement: !ruby/object:Gem::Requirement
30
50
  requirements:
31
51
  - - "~>"
32
52
  - !ruby/object:Gem::Version
33
- version: '0.8'
53
+ version: '0.9'
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: 0.9.6
34
57
  type: :runtime
35
58
  prerelease: false
36
59
  version_requirements: !ruby/object:Gem::Requirement
37
60
  requirements:
38
61
  - - "~>"
39
62
  - !ruby/object:Gem::Version
40
- version: '0.8'
63
+ version: '0.9'
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: 0.9.6
41
67
  - !ruby/object:Gem::Dependency
42
68
  name: eac_ruby_utils
43
69
  requirement: !ruby/object:Gem::Requirement
44
70
  requirements:
45
71
  - - "~>"
46
72
  - !ruby/object:Gem::Version
47
- version: '0.67'
73
+ version: '0.70'
48
74
  type: :runtime
49
75
  prerelease: false
50
76
  version_requirements: !ruby/object:Gem::Requirement
51
77
  requirements:
52
78
  - - "~>"
53
79
  - !ruby/object:Gem::Version
54
- version: '0.67'
80
+ version: '0.70'
55
81
  - !ruby/object:Gem::Dependency
56
82
  name: eac_ruby_gem_support
57
83
  requirement: !ruby/object:Gem::Requirement
58
84
  requirements:
59
85
  - - "~>"
60
86
  - !ruby/object:Gem::Version
61
- version: '0.2'
87
+ version: '0.3'
62
88
  type: :development
63
89
  prerelease: false
64
90
  version_requirements: !ruby/object:Gem::Requirement
65
91
  requirements:
66
92
  - - "~>"
67
93
  - !ruby/object:Gem::Version
68
- version: '0.2'
94
+ version: '0.3'
69
95
  description:
70
96
  email:
71
97
  executables: []
@@ -108,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
134
  - !ruby/object:Gem::Version
109
135
  version: '0'
110
136
  requirements: []
111
- rubygems_version: 3.0.9
137
+ rubygems_version: 3.1.6
112
138
  signing_key:
113
139
  specification_version: 4
114
140
  summary: Put here de description.