eac_ruby_base0 0.14.0 → 0.15.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: 1721981a1b6d4ac7f620069dd0a28939e5baf81a00669a6e239e7cdad0bf4231
4
- data.tar.gz: e77f5b75e95707b6c3e7c893f89546da86e4a4fd0566f0d421773e64af6dc37e
3
+ metadata.gz: 13999465b9dc06d6be1f9ab8dc03f163e2662813eba652dc6c5569f0fda59d78
4
+ data.tar.gz: 63063d1ee7fb1f34d913e3594db9a70d9208bfa62498cd33a2b35414ba57f3f8
5
5
  SHA512:
6
- metadata.gz: 24cb3cb4d62e034bf8796059041bbe93f3d403ffe4910e24fdaa84e912b32e0a869fae55803ec72a033c5e89bf49ee83976661879378801c5c59eb10b04b94c9
7
- data.tar.gz: 71b911e8a134b8355419057473fa4e7a0ab27a69aa6afe4f13550fb58d24bcd45d813f2558c5c60d3e9088cfbf65b2e36ce869b57a0109bbb7bab36e4d17389a
6
+ metadata.gz: 4a3bbf6306745a039ebfd809060041b8d91cb93c130b54a4096fbc7a62d76b6ef46f3f113fa5e5bc448dbb2ca1a4f49cda758ff136c311a0ecd17c9c13f0a8b3
7
+ data.tar.gz: 506ac173be281699b4328f76ca92d59a8c054a00795d2f9083ca93306612f0e9533712a66589c380422fafa6eed8bd98be369d3dbde8d6b86bcb33840c638bf8
@@ -8,7 +8,6 @@ require 'eac_ruby_utils/speaker'
8
8
 
9
9
  module EacRubyBase0
10
10
  module Runner
11
- require_sub __FILE__
12
11
  enable_speaker
13
12
  common_concern do
14
13
  include ::EacCli::RunnerWith::Help
@@ -37,14 +36,15 @@ module EacRubyBase0
37
36
  runner_context.call(:application).version.to_s
38
37
  end
39
38
 
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.self_fs_cache) do
44
- yield
45
- end
46
- end
39
+ def on_context(&block)
40
+ top_block = block
41
+ available_contexts.each do |context|
42
+ next if context.object.any?
43
+
44
+ last_block = top_block
45
+ top_block = ::Proc.new { context.object.on(context.builder.call, &last_block) }
47
46
  end
47
+ top_block.call
48
48
  end
49
49
 
50
50
  def show_version
@@ -63,6 +63,19 @@ module EacRubyBase0
63
63
 
64
64
  private
65
65
 
66
+ # @return [Array<EacRubyUtils::Struct>]
67
+ def available_contexts
68
+ [
69
+ [:cache, ::EacFs::Cache.context, -> { application.self_fs_cache }],
70
+ [:config, ::EacConfig::Node.context, -> { runner_context.call(:application).build_config }],
71
+ [:speaker, ::EacRubyUtils::Speaker.context, -> { build_speaker }]
72
+ ].map { |row| available_context_row_to_struct(row) }
73
+ end
74
+
75
+ def available_context_row_to_struct(row)
76
+ %i[type object builder].zip(row).to_h.to_struct
77
+ end
78
+
66
79
  def build_speaker
67
80
  options = {}
68
81
  options[:err_out] = ::StringIO.new if parsed.quiet?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.14.0'
4
+ VERSION = '0.15.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.14.0
4
+ version: 0.15.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-12-14 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_cli
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.25'
19
+ version: '0.26'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.25'
26
+ version: '0.26'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eac_fs
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -105,7 +105,6 @@ files:
105
105
  - lib/eac_ruby_base0/rspec.rb
106
106
  - lib/eac_ruby_base0/rspec/setup.rb
107
107
  - lib/eac_ruby_base0/runner.rb
108
- - lib/eac_ruby_base0/runner/test_all.rb
109
108
  - lib/eac_ruby_base0/runner_with.rb
110
109
  - lib/eac_ruby_base0/runner_with/confirmation.rb
111
110
  - lib/eac_ruby_base0/runner_with/filesystem_traverser.rb
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_cli/core_ext'
4
- require 'eac_ruby_gems_utils/tests/multiple'
5
-
6
- module EacRubyBase0
7
- module Runner
8
- class TestAll
9
- runner_with :help do
10
- desc 'Test core and local gems.'
11
- end
12
-
13
- def run
14
- fatal_error 'Some test did not pass' unless tests.ok?
15
- end
16
-
17
- def tests_uncached
18
- ::EacRubyGemsUtils::Tests::Multiple.new(runner_context.call(:application).all_gems)
19
- end
20
- end
21
- end
22
- end