avm-tools 0.113.5 → 0.113.6
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/avm/tools/version.rb +1 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb +1 -1
- data/sub/avm-git/avm-git.gemspec +1 -1
- data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +3 -3
- data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +1 -1
- data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +13 -6
- data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +3 -3
- data/sub/avm-git/lib/avm/git/issue/complete/push.rb +15 -9
- data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +2 -2
- data/sub/avm-git/lib/avm/git/issue/complete/test.rb +1 -1
- data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +1 -1
- data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +13 -5
- data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +1 -1
- data/sub/avm-git/lib/avm/git/issue/complete.rb +22 -7
- data/sub/avm-git/lib/avm/git/version.rb +1 -1
- data/sub/eac_cli/eac_cli.gemspec +2 -2
- data/sub/eac_cli/lib/eac_cli/config/entry.rb +4 -0
- data/sub/eac_cli/lib/eac_cli/rspec/setup.rb +2 -4
- data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
- data/sub/eac_config/eac_config.gemspec +1 -1
- data/sub/eac_config/lib/eac_config/entry.rb +4 -0
- data/sub/eac_config/lib/eac_config/node_entry.rb +4 -0
- data/sub/eac_config/lib/eac_config/rspec/setup.rb +8 -0
- data/sub/eac_config/lib/eac_config/version.rb +1 -1
- data/sub/eac_git/eac_git.gemspec +1 -1
- data/sub/eac_git/lib/eac_git/local/branch.rb +27 -0
- data/sub/eac_git/lib/eac_git/local.rb +18 -0
- data/sub/eac_git/lib/eac_git/version.rb +1 -1
- data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +1 -1
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +21 -8
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/context.rb +2 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/to_struct.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- metadata +12 -5
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f0c1b42a6d34ae3d070dbbae54375ddd08eab2a177c5c46cc9d42de8165d10a
|
|
4
|
+
data.tar.gz: ff02a56141cb130c4b0e9c7fc651ebe3de42ba13ec6c56557fbae70f96ff693c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c12fcce202f2eb1b40b58485dbf790e29b7f6bb183d450ce3c9f8a479abf9ae35a77865990c481ad1f2a28b18110bcc4e3db82ecc880c355f040eb8646433143
|
|
7
|
+
data.tar.gz: d85bb09c92c7d6b1f0414f66509da068ff018d8ec1da32b730f00fe99cc723895d4e09d205f5964cd562a61647c849017f2fe3def50f3fdfec45c770a9d2d8a6
|
data/lib/avm/tools/version.rb
CHANGED
|
@@ -12,7 +12,7 @@ RSpec.describe ::Avm::EacRailsBase0::ApachePath do
|
|
|
12
12
|
let(:expected_content) { expect_file.read }
|
|
13
13
|
|
|
14
14
|
before do
|
|
15
|
-
instance.entry(::Avm::Instances::
|
|
15
|
+
instance.entry(::Avm::Instances::EntryKeys::FS_PATH).write('/path/to/stub-app_0')
|
|
16
16
|
instance.entry('web.url').write('http://stubapp.net/stub-app_0')
|
|
17
17
|
end
|
|
18
18
|
|
data/sub/avm-git/avm-git.gemspec
CHANGED
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
|
14
14
|
|
|
15
15
|
s.add_dependency 'avm-files', '~> 0.1'
|
|
16
|
-
s.add_dependency 'eac_git', '~> 0.
|
|
16
|
+
s.add_dependency 'eac_git', '~> 0.11'
|
|
17
17
|
s.add_dependency 'eac_ruby_utils', '~> 0.76'
|
|
18
18
|
|
|
19
19
|
s.add_development_dependency 'aranha-parsers', '~> 0.8', '>= 0.8.5'
|
|
@@ -15,7 +15,7 @@ module Avm
|
|
|
15
15
|
return [] unless branch_hash && follow_master?
|
|
16
16
|
|
|
17
17
|
interval = remote_master_hash ? "#{remote_master_hash}..#{branch_hash}" : branch_hash
|
|
18
|
-
|
|
18
|
+
launcher_git.execute!('rev-list', interval).each_line.map(&:strip)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def bifurcations_result
|
|
@@ -32,8 +32,8 @@ module Avm
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def commit_parents(commit)
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
launcher_git.execute!('log', '--pretty=%P', '-n', '1', commit).split(' ').map(&:strip)
|
|
36
|
+
.select(&:present?)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -12,7 +12,7 @@ module Avm
|
|
|
12
12
|
return ::Avm::Result.error('Unclean workspace') unless clean_workspace?
|
|
13
13
|
|
|
14
14
|
infom 'Checking Git subrepos...'
|
|
15
|
-
r = ::Avm::Git::SubrepoChecks.new(::EacGit::Local.new(
|
|
15
|
+
r = ::Avm::Git::SubrepoChecks.new(::EacGit::Local.new(launcher_git)).add_all_subrepos
|
|
16
16
|
r.check_remote = true
|
|
17
17
|
r.result
|
|
18
18
|
end
|
|
@@ -7,16 +7,21 @@ module Avm
|
|
|
7
7
|
module Issue
|
|
8
8
|
class Complete
|
|
9
9
|
module LocalBranch
|
|
10
|
+
NO_CURRENT_BRANCH_NAME = 'none'
|
|
11
|
+
|
|
12
|
+
# Retrieves the current local branch.
|
|
13
|
+
#
|
|
14
|
+
# @return [EacGit::Local::Branch, nil]
|
|
10
15
|
def branch_uncached
|
|
11
|
-
|
|
16
|
+
eac_git.current_branch
|
|
12
17
|
end
|
|
13
18
|
|
|
14
19
|
def branch_hash_uncached
|
|
15
|
-
|
|
20
|
+
branch.if_present(&:current_commit_id)
|
|
16
21
|
end
|
|
17
22
|
|
|
18
23
|
def branch_name
|
|
19
|
-
branch.
|
|
24
|
+
branch.if_present(NO_CURRENT_BRANCH_NAME, &:name)
|
|
20
25
|
end
|
|
21
26
|
|
|
22
27
|
def branch_name_result
|
|
@@ -38,14 +43,16 @@ module Avm
|
|
|
38
43
|
end
|
|
39
44
|
|
|
40
45
|
def follow_master?
|
|
41
|
-
remote_master_hash ?
|
|
46
|
+
remote_master_hash ? launcher_git.descendant?(branch_hash, remote_master_hash) : true
|
|
42
47
|
end
|
|
43
48
|
|
|
44
49
|
def remove_local_branch
|
|
50
|
+
return unless branch
|
|
51
|
+
|
|
45
52
|
info 'Removendo branch local...'
|
|
46
53
|
bn = branch_name
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
git_execute(['checkout', branch_hash])
|
|
55
|
+
git_execute(['branch', '-D', bn])
|
|
49
56
|
end
|
|
50
57
|
end
|
|
51
58
|
end
|
|
@@ -18,7 +18,7 @@ module Avm
|
|
|
18
18
|
|
|
19
19
|
def delete_tag
|
|
20
20
|
info 'Removendo tag...'
|
|
21
|
-
|
|
21
|
+
git_execute(['tag', '-d', branch_name])
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def tag
|
|
@@ -26,11 +26,11 @@ module Avm
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def tag_hash
|
|
29
|
-
|
|
29
|
+
launcher_git.rev_parse(tag)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def create_tag
|
|
33
|
-
|
|
33
|
+
git_execute(['tag', branch_name, branch_hash])
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -12,13 +12,7 @@ module Avm
|
|
|
12
12
|
def dry_push_result
|
|
13
13
|
return ::Avm::Result.error('Nothing to push') if pushs.empty?
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
message = if r.fetch(:exit_code).zero?
|
|
17
|
-
'ok'
|
|
18
|
-
else
|
|
19
|
-
r.fetch(:stderr) + "\n#{::Shellwords.join(dry_push_args)}"
|
|
20
|
-
end
|
|
21
|
-
::Avm::Result.success_or_error(r.fetch(:exit_code).zero?, message)
|
|
15
|
+
dry_push_execution_result
|
|
22
16
|
end
|
|
23
17
|
|
|
24
18
|
def push
|
|
@@ -26,7 +20,7 @@ module Avm
|
|
|
26
20
|
info 'PUSH: Nada a enviar'
|
|
27
21
|
else
|
|
28
22
|
info "PUSH: enviando \"#{pushs}\"..."
|
|
29
|
-
|
|
23
|
+
git_execute(%w[push origin] + pushs)
|
|
30
24
|
end
|
|
31
25
|
end
|
|
32
26
|
|
|
@@ -39,7 +33,7 @@ module Avm
|
|
|
39
33
|
end
|
|
40
34
|
|
|
41
35
|
def remove_branch_push
|
|
42
|
-
remote_branch_hash ? ":refs/heads/#{branch}" : nil
|
|
36
|
+
remote_branch_hash ? ":refs/heads/#{branch.name}" : nil
|
|
43
37
|
end
|
|
44
38
|
|
|
45
39
|
def tag_push
|
|
@@ -47,6 +41,18 @@ module Avm
|
|
|
47
41
|
|
|
48
42
|
"#{branch_hash}:#{tag}"
|
|
49
43
|
end
|
|
44
|
+
|
|
45
|
+
private
|
|
46
|
+
|
|
47
|
+
def dry_push_execution_result
|
|
48
|
+
r = launcher_git.execute(dry_push_args)
|
|
49
|
+
message = if r.fetch(:exit_code).zero?
|
|
50
|
+
'ok'
|
|
51
|
+
else
|
|
52
|
+
r.fetch(:stderr) + "\n#{::Shellwords.join(dry_push_args)}"
|
|
53
|
+
end
|
|
54
|
+
::Avm::Result.success_or_error(r.fetch(:exit_code).zero?, message)
|
|
55
|
+
end
|
|
50
56
|
end
|
|
51
57
|
end
|
|
52
58
|
end
|
|
@@ -10,7 +10,7 @@ module Avm
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def remote_branch_hash
|
|
13
|
-
remote_hashs["refs/heads/#{branch}"]
|
|
13
|
+
remote_hashs["refs/heads/#{branch.name}"]
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def remote_tag_hash
|
|
@@ -24,7 +24,7 @@ module Avm
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def remote_hashs_uncached
|
|
27
|
-
|
|
27
|
+
launcher_git.remote_hashs(remote_name)
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
end
|
|
@@ -11,6 +11,8 @@ module Avm
|
|
|
11
11
|
enable_simple_cache
|
|
12
12
|
common_constructor :parent, :key, :label
|
|
13
13
|
|
|
14
|
+
SKIPPED_RESULT_MESSAGE = 'skipped'
|
|
15
|
+
|
|
14
16
|
def skip?
|
|
15
17
|
parent.skip_validations.include?(key)
|
|
16
18
|
end
|
|
@@ -18,11 +20,17 @@ module Avm
|
|
|
18
20
|
private
|
|
19
21
|
|
|
20
22
|
def result_uncached
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
skip? ? skipped_result : validation_result
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def skipped_result
|
|
27
|
+
::Avm::Result.neutral(SKIPPED_RESULT_MESSAGE)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def validation_result
|
|
31
|
+
parent.send("#{key}_result")
|
|
32
|
+
rescue ::RuntimeError => e
|
|
33
|
+
::Avm::Result.error("error raised: #{e.message}")
|
|
26
34
|
end
|
|
27
35
|
end
|
|
28
36
|
end
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'avm/tools/core_ext'
|
|
4
|
+
require 'eac_git/local'
|
|
4
5
|
|
|
5
6
|
module Avm
|
|
6
7
|
module Git
|
|
@@ -10,14 +11,15 @@ module Avm
|
|
|
10
11
|
enable_simple_cache
|
|
11
12
|
enable_speaker
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
BRANCH_NAME_ISSUE_ID_PATTERN =
|
|
15
|
+
|
|
16
|
+
attr_reader :dir, :skip_validations
|
|
14
17
|
|
|
15
18
|
def initialize(options)
|
|
16
19
|
consumer = ::EacRubyUtils::OptionsConsumer.new(options)
|
|
17
|
-
dir, @skip_validations = consumer.consume_all(:dir, :skip_validations)
|
|
20
|
+
@dir, @skip_validations = consumer.consume_all(:dir, :skip_validations)
|
|
18
21
|
validate_skip_validations
|
|
19
22
|
consumer.validate
|
|
20
|
-
@git = ::Avm::Launcher::Git::Base.new(dir)
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
def start_banner
|
|
@@ -35,16 +37,29 @@ module Avm
|
|
|
35
37
|
end
|
|
36
38
|
|
|
37
39
|
def issue_id
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
branch ? issue_id_parser.parse(branch_name) : nil
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# @return [EacRubyUtils::RegexpParser]
|
|
44
|
+
def issue_id_parser
|
|
45
|
+
/\A#{Regexp.quote('issue_')}(\d+)\z/.to_parser { |m| m[1].to_i }
|
|
40
46
|
end
|
|
41
47
|
|
|
42
48
|
private
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
# @return [EacGit::Local]
|
|
51
|
+
def eac_git_uncached
|
|
52
|
+
::EacGit::Local.new(dir)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def git_execute(args, exit_outputs = {})
|
|
56
|
+
r = launcher_git.execute!(args, exit_outputs: exit_outputs)
|
|
46
57
|
r.is_a?(String) ? r.strip : r
|
|
47
58
|
end
|
|
59
|
+
|
|
60
|
+
def launcher_git_uncached
|
|
61
|
+
::Avm::Launcher::Git::Base.new(dir)
|
|
62
|
+
end
|
|
48
63
|
end
|
|
49
64
|
end
|
|
50
65
|
end
|
data/sub/eac_cli/eac_cli.gemspec
CHANGED
|
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.files = Dir['{lib}/**/*', 'Gemfile']
|
|
14
14
|
|
|
15
15
|
s.add_dependency 'colorize', '~> 0.8.1'
|
|
16
|
-
s.add_dependency 'eac_config', '~> 0.
|
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
|
16
|
+
s.add_dependency 'eac_config', '~> 0.8'
|
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.83'
|
|
18
18
|
|
|
19
19
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
|
|
20
20
|
end
|
|
@@ -24,10 +24,8 @@ module EacCli
|
|
|
24
24
|
def disable_speaker_input_request
|
|
25
25
|
::RSpec.configure do |config|
|
|
26
26
|
config.around do |example|
|
|
27
|
-
::EacRubyUtils::Speaker
|
|
28
|
-
::EacCli::Speaker.new(
|
|
29
|
-
in_in: FailIfRequestInput.new)
|
|
30
|
-
) { example.run }
|
|
27
|
+
::EacRubyUtils::Speaker
|
|
28
|
+
.context.on(::EacCli::Speaker.new(in_in: FailIfRequestInput.new)) { example.run }
|
|
31
29
|
end
|
|
32
30
|
end
|
|
33
31
|
end
|
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
|
14
14
|
|
|
15
15
|
s.add_dependency 'addressable'
|
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.83'
|
|
17
17
|
|
|
18
18
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
|
|
19
19
|
end
|
|
@@ -29,6 +29,14 @@ module EacConfig
|
|
|
29
29
|
::EacConfig::EnvvarsNode.new.load_path.entry
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
# Wraps a RSpec example in a EacConfig node using a alternative file.
|
|
33
|
+
#
|
|
34
|
+
# @param target_example [RSpec::Core::ExampleGroup] The example to wrap. If not provided,
|
|
35
|
+
# it is applied to all examples.
|
|
36
|
+
# @param target_file [Pathname] The file used by the EacConfig node. If not provided, a
|
|
37
|
+
# temporary file is used.
|
|
38
|
+
# @param node_builder [Proc] Should return the desired EacConfig node. If not provided, a
|
|
39
|
+
# EacConfig::YamlFileNode is created.
|
|
32
40
|
def stub_eac_config_node(target_example = nil, target_file = nil, &node_builder)
|
|
33
41
|
parent_self = self
|
|
34
42
|
(target_example || rspec_config).around do |example|
|
data/sub/eac_git/eac_git.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
|
12
12
|
|
|
13
13
|
s.files = Dir['{lib,vendor}/**/*']
|
|
14
14
|
|
|
15
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
|
15
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.83'
|
|
16
16
|
s.add_dependency 'parseconfig', '~> 1.0', '>= 1.0.8'
|
|
17
17
|
|
|
18
18
|
s.add_development_dependency 'aranha-parsers', '~> 0.8', '>= 0.8.2'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
|
4
|
+
|
|
5
|
+
module EacGit
|
|
6
|
+
class Local
|
|
7
|
+
class Branch
|
|
8
|
+
REFS_PREFIX = 'refs/heads/'
|
|
9
|
+
|
|
10
|
+
common_constructor :local, :name
|
|
11
|
+
|
|
12
|
+
# @return [String]
|
|
13
|
+
def current_commit_id
|
|
14
|
+
local.rev_parse(full_ref_name, true)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# @return [Boolean]
|
|
18
|
+
def exist?
|
|
19
|
+
local.command('show-ref', '--quiet', full_ref_name).execute.fetch(:exit_code).zero?
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def full_ref_name
|
|
23
|
+
"#{REFS_PREFIX}#{name}"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -30,6 +30,14 @@ module EacGit
|
|
|
30
30
|
root_path <=> other.root_path
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Retrieves a local branch.
|
|
34
|
+
#
|
|
35
|
+
# @param name [String] Ex.: for "refs/heads/master", name should be "master".
|
|
36
|
+
# @return [EacGit::Local::Branch]
|
|
37
|
+
def branch(name)
|
|
38
|
+
::EacGit::Local::Branch.new(self, name)
|
|
39
|
+
end
|
|
40
|
+
|
|
33
41
|
def commit(ref, required = false)
|
|
34
42
|
rev_parse(ref, required).if_present { |v| ::EacGit::Local::Commit.new(self, v) }
|
|
35
43
|
end
|
|
@@ -44,6 +52,16 @@ module EacGit
|
|
|
44
52
|
source.to_s.strip.if_present(nil) { |v| ::EacGit::Local::Commit.new(self, v) }
|
|
45
53
|
end
|
|
46
54
|
|
|
55
|
+
# Retrieves the current local branch.
|
|
56
|
+
#
|
|
57
|
+
# @return [EacGit::Local::Branch, nil]
|
|
58
|
+
def current_branch
|
|
59
|
+
command('symbolic-ref', '--quiet', HEAD_REFERENCE)
|
|
60
|
+
.execute!(exit_outputs: { 256 => '' })
|
|
61
|
+
.gsub(%r{\Arefs/heads/}, '').strip
|
|
62
|
+
.if_present { |v| branch(v) }
|
|
63
|
+
end
|
|
64
|
+
|
|
47
65
|
def descendant?(descendant, ancestor)
|
|
48
66
|
base = merge_base(descendant, ancestor)
|
|
49
67
|
return false if base.blank?
|
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
|
12
12
|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
|
14
14
|
|
|
15
|
-
s.add_dependency 'eac_cli', '~> 0.
|
|
15
|
+
s.add_dependency 'eac_cli', '~> 0.26'
|
|
16
16
|
s.add_dependency 'eac_fs', '~> 0.3'
|
|
17
17
|
s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '~> 0.9.6'
|
|
18
18
|
s.add_dependency 'eac_ruby_utils', '~> 0.70'
|
|
@@ -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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: avm-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.113.
|
|
4
|
+
version: 0.113.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esquilo Azul Company
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aranha-parsers
|
|
@@ -128,14 +128,20 @@ dependencies:
|
|
|
128
128
|
requirements:
|
|
129
129
|
- - "~>"
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '0.
|
|
131
|
+
version: '0.3'
|
|
132
|
+
- - ">="
|
|
133
|
+
- !ruby/object:Gem::Version
|
|
134
|
+
version: 0.3.1
|
|
132
135
|
type: :runtime
|
|
133
136
|
prerelease: false
|
|
134
137
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
138
|
requirements:
|
|
136
139
|
- - "~>"
|
|
137
140
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '0.
|
|
141
|
+
version: '0.3'
|
|
142
|
+
- - ">="
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: 0.3.1
|
|
139
145
|
- !ruby/object:Gem::Dependency
|
|
140
146
|
name: clipboard
|
|
141
147
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -900,6 +906,7 @@ files:
|
|
|
900
906
|
- sub/eac_git/lib/eac_git.rb
|
|
901
907
|
- sub/eac_git/lib/eac_git/executables.rb
|
|
902
908
|
- sub/eac_git/lib/eac_git/local.rb
|
|
909
|
+
- sub/eac_git/lib/eac_git/local/branch.rb
|
|
903
910
|
- sub/eac_git/lib/eac_git/local/commit.rb
|
|
904
911
|
- sub/eac_git/lib/eac_git/local/commit/archive.rb
|
|
905
912
|
- sub/eac_git/lib/eac_git/local/commit/changed_file.rb
|
|
@@ -1130,7 +1137,6 @@ files:
|
|
|
1130
1137
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/rspec.rb
|
|
1131
1138
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/rspec/setup.rb
|
|
1132
1139
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
|
|
1133
|
-
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb
|
|
1134
1140
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb
|
|
1135
1141
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb
|
|
1136
1142
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb
|
|
@@ -1252,6 +1258,7 @@ files:
|
|
|
1252
1258
|
- sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash.rb
|
|
1253
1259
|
- sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/options_consumer.rb
|
|
1254
1260
|
- sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb
|
|
1261
|
+
- sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/to_struct.rb
|
|
1255
1262
|
- sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb
|
|
1256
1263
|
- sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb
|
|
1257
1264
|
- sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module.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
|