eac_ruby_base0 0.18.0 → 0.19.1
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 +1 -1
- data/lib/eac_ruby_base0/application_xdg.rb +1 -1
- data/lib/eac_ruby_base0/patches/class/jobs_runner.rb +1 -2
- data/lib/eac_ruby_base0/patches/class.rb +1 -1
- data/lib/eac_ruby_base0/patches.rb +1 -1
- data/lib/eac_ruby_base0/rspec.rb +1 -1
- data/lib/eac_ruby_base0/runner/contexts.rb +52 -0
- data/lib/eac_ruby_base0/runner/prepend.rb +17 -4
- data/lib/eac_ruby_base0/runner.rb +1 -39
- data/lib/eac_ruby_base0/version.rb +1 -1
- data/lib/eac_ruby_base0.rb +7 -2
- metadata +34 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45d00cad1117f21af7e29b1d3ff7567661695eab4a3643b917048313f253abaf
|
4
|
+
data.tar.gz: 0cb24bee1540c651c5c990c8ca0d5eafba32c793032d9387adf053b40388f773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfb90f749e52e138a30cfbb57a05f2b7986a6e0302506ac0a79594957a89464c4750764363d6a7b6c92dc09003474b4517b0efcfbba1c4146a1431a2c4fe7447
|
7
|
+
data.tar.gz: ba3d6a20359c13aae2120ec919752d48615df3e948028bbd776d4e39f5d36bca65daf49cf25567b86f11c54ae1194b3e2c5168bb41e853adb7bff82b3e5d6336
|
@@ -45,7 +45,7 @@ module EacRubyBase0
|
|
45
45
|
end
|
46
46
|
|
47
47
|
::EacFs::Contexts::TYPES.each do |type|
|
48
|
-
class_eval <<CODE, __FILE__, __LINE__ + 1
|
48
|
+
class_eval <<CODE, __FILE__, __LINE__ + 1 # rubocop:disable Style/DocumentDynamicEvalDefinition
|
49
49
|
# @return [EacFs::StorageTree]
|
50
50
|
def self_fs_#{type}
|
51
51
|
@self_fs_#{type} ||= ::EacFs::StorageTree.new(#{type}_dir.join('eac_fs'))
|
@@ -1,10 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_base0/jobs_runner'
|
4
|
-
require 'eac_ruby_utils/patch'
|
5
4
|
|
6
5
|
class Class
|
7
6
|
def enable_jobs_runner
|
8
|
-
::EacRubyUtils.
|
7
|
+
::EacRubyUtils.patch_module(self, ::EacRubyBase0::JobsRunner)
|
9
8
|
end
|
10
9
|
end
|
data/lib/eac_ruby_base0/rspec.rb
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_config/node'
|
4
|
+
require 'eac_fs/contexts'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
require 'eac_ruby_utils/speaker'
|
7
|
+
|
8
|
+
module EacRubyBase0
|
9
|
+
module Runner
|
10
|
+
module Contexts
|
11
|
+
def on_context(&block)
|
12
|
+
top_block = block
|
13
|
+
available_contexts.each do |context|
|
14
|
+
next if context.object.any?
|
15
|
+
|
16
|
+
last_block = top_block
|
17
|
+
top_block = proc { context.object.on(context.builder.call, &last_block) }
|
18
|
+
end
|
19
|
+
top_block.call
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
# @return [Array<EacRubyUtils::Struct>]
|
25
|
+
def available_contexts
|
26
|
+
(filesystem_available_contexts + [
|
27
|
+
[:config, ::EacConfig::Node.context,
|
28
|
+
-> { runner_context.call(:application).build_config }],
|
29
|
+
[:speaker, ::EacRubyUtils::Speaker.context, -> { build_speaker }]
|
30
|
+
]).map { |row| available_context_row_to_struct(row) }
|
31
|
+
end
|
32
|
+
|
33
|
+
def available_context_row_to_struct(row)
|
34
|
+
%i[type object builder].zip(row).to_h.to_struct
|
35
|
+
end
|
36
|
+
|
37
|
+
def build_speaker
|
38
|
+
options = {}
|
39
|
+
options[:err_out] = ::StringIO.new if parsed.quiet?
|
40
|
+
options[:in_in] = ::EacCli::Speaker::InputBlocked.new if parsed.no_input?
|
41
|
+
::EacCli::Speaker.new(options)
|
42
|
+
end
|
43
|
+
|
44
|
+
def filesystem_available_contexts
|
45
|
+
::EacFs::Contexts::TYPES.map do |type|
|
46
|
+
key = :"fs_#{type}"
|
47
|
+
[key, ::EacFs::Contexts.send(type), -> { application.send("self_#{key}") }]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -10,17 +10,30 @@ require 'eac_ruby_utils/speaker'
|
|
10
10
|
module EacRubyBase0
|
11
11
|
module Runner
|
12
12
|
module Prepend
|
13
|
+
SYSTEM_STACK_ERROR_FILE = 'system_stack_error'
|
14
|
+
|
13
15
|
def run
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
on_rescue_stack_overflow do
|
17
|
+
if parsed.version?
|
18
|
+
show_version
|
19
|
+
else
|
20
|
+
run_with_subcommand
|
21
|
+
end
|
18
22
|
end
|
19
23
|
end
|
20
24
|
|
21
25
|
def run_run
|
22
26
|
on_context { super }
|
23
27
|
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def on_rescue_stack_overflow
|
32
|
+
yield
|
33
|
+
rescue ::SystemStackError => e
|
34
|
+
SYSTEM_STACK_ERROR_FILE.to_pathname.write(e.backtrace.map { |v| "#{v}\n" }.join)
|
35
|
+
raise e
|
36
|
+
end
|
24
37
|
end
|
25
38
|
end
|
26
39
|
end
|
@@ -14,6 +14,7 @@ module EacRubyBase0
|
|
14
14
|
common_concern do
|
15
15
|
include ::EacCli::RunnerWith::Help
|
16
16
|
include ::EacCli::RunnerWith::Subcommands
|
17
|
+
include ::EacRubyBase0::Runner::Contexts
|
17
18
|
prepend ::EacRubyBase0::Runner::Prepend
|
18
19
|
runner_definition do
|
19
20
|
bool_opt '-q', '--quiet', 'Quiet mode.'
|
@@ -29,47 +30,8 @@ module EacRubyBase0
|
|
29
30
|
runner_context.call(:application).version.to_s
|
30
31
|
end
|
31
32
|
|
32
|
-
def on_context(&block)
|
33
|
-
top_block = block
|
34
|
-
available_contexts.each do |context|
|
35
|
-
next if context.object.any?
|
36
|
-
|
37
|
-
last_block = top_block
|
38
|
-
top_block = ::Proc.new { context.object.on(context.builder.call, &last_block) }
|
39
|
-
end
|
40
|
-
top_block.call
|
41
|
-
end
|
42
|
-
|
43
33
|
def show_version
|
44
34
|
out("#{application_version}\n")
|
45
35
|
end
|
46
|
-
|
47
|
-
private
|
48
|
-
|
49
|
-
# @return [Array<EacRubyUtils::Struct>]
|
50
|
-
def available_contexts
|
51
|
-
(filesystem_available_contexts + [
|
52
|
-
[:config, ::EacConfig::Node.context, -> { runner_context.call(:application).build_config }],
|
53
|
-
[:speaker, ::EacRubyUtils::Speaker.context, -> { build_speaker }]
|
54
|
-
]).map { |row| available_context_row_to_struct(row) }
|
55
|
-
end
|
56
|
-
|
57
|
-
def available_context_row_to_struct(row)
|
58
|
-
%i[type object builder].zip(row).to_h.to_struct
|
59
|
-
end
|
60
|
-
|
61
|
-
def build_speaker
|
62
|
-
options = {}
|
63
|
-
options[:err_out] = ::StringIO.new if parsed.quiet?
|
64
|
-
options[:in_in] = ::EacCli::Speaker::InputBlocked.new if parsed.no_input?
|
65
|
-
::EacCli::Speaker.new(options)
|
66
|
-
end
|
67
|
-
|
68
|
-
def filesystem_available_contexts
|
69
|
-
::EacFs::Contexts::TYPES.map do |type|
|
70
|
-
key = "fs_#{type}".to_sym
|
71
|
-
[key, ::EacFs::Contexts.send(type), -> { application.send("self_#{key}") }]
|
72
|
-
end
|
73
|
-
end
|
74
36
|
end
|
75
37
|
end
|
data/lib/eac_ruby_base0.rb
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils
|
3
|
+
require 'eac_ruby_utils'
|
4
|
+
EacRubyUtils::RootModuleSetup.perform __FILE__ do
|
5
|
+
ignore 'core_ext'
|
6
|
+
ignore 'patches'
|
7
|
+
end
|
4
8
|
|
5
9
|
module EacRubyBase0
|
6
|
-
require_sub __FILE__
|
7
10
|
end
|
11
|
+
|
12
|
+
require 'eac_ruby_base0/core_ext'
|
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.19.1
|
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:
|
11
|
+
date: 2025-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-eac_ruby_base1
|
@@ -16,76 +16,94 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.33'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.33.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.33'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.33.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: eac_cli
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.38'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.38.1
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
43
46
|
requirements:
|
44
47
|
- - "~>"
|
45
48
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
49
|
+
version: '0.38'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.38.1
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: eac_fs
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
50
56
|
requirements:
|
51
57
|
- - "~>"
|
52
58
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
59
|
+
version: '0.18'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.18.1
|
54
63
|
type: :runtime
|
55
64
|
prerelease: false
|
56
65
|
version_requirements: !ruby/object:Gem::Requirement
|
57
66
|
requirements:
|
58
67
|
- - "~>"
|
59
68
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
69
|
+
version: '0.18'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.18.1
|
61
73
|
- !ruby/object:Gem::Dependency
|
62
74
|
name: eac_ruby_utils
|
63
75
|
requirement: !ruby/object:Gem::Requirement
|
64
76
|
requirements:
|
65
77
|
- - "~>"
|
66
78
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
79
|
+
version: '0.126'
|
68
80
|
type: :runtime
|
69
81
|
prerelease: false
|
70
82
|
version_requirements: !ruby/object:Gem::Requirement
|
71
83
|
requirements:
|
72
84
|
- - "~>"
|
73
85
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0.
|
86
|
+
version: '0.126'
|
75
87
|
- !ruby/object:Gem::Dependency
|
76
88
|
name: eac_ruby_gem_support
|
77
89
|
requirement: !ruby/object:Gem::Requirement
|
78
90
|
requirements:
|
79
91
|
- - "~>"
|
80
92
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.
|
93
|
+
version: '0.11'
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.11.1
|
82
97
|
type: :development
|
83
98
|
prerelease: false
|
84
99
|
version_requirements: !ruby/object:Gem::Requirement
|
85
100
|
requirements:
|
86
101
|
- - "~>"
|
87
102
|
- !ruby/object:Gem::Version
|
88
|
-
version: 0.
|
103
|
+
version: '0.11'
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 0.11.1
|
89
107
|
description:
|
90
108
|
email:
|
91
109
|
executables: []
|
@@ -103,6 +121,7 @@ files:
|
|
103
121
|
- lib/eac_ruby_base0/rspec.rb
|
104
122
|
- lib/eac_ruby_base0/rspec/setup.rb
|
105
123
|
- lib/eac_ruby_base0/runner.rb
|
124
|
+
- lib/eac_ruby_base0/runner/contexts.rb
|
106
125
|
- lib/eac_ruby_base0/runner/prepend.rb
|
107
126
|
- lib/eac_ruby_base0/runner_with.rb
|
108
127
|
- lib/eac_ruby_base0/version.rb
|
@@ -117,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
136
|
requirements:
|
118
137
|
- - ">="
|
119
138
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
139
|
+
version: '2.7'
|
121
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
141
|
requirements:
|
123
142
|
- - ">="
|