avm-tools 0.136.2 → 0.138.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/tools/runner/{app_src → source}/info.rb +1 -1
- data/lib/avm/tools/runner/{app_src → source}/issue/complete.rb +1 -1
- data/lib/avm/tools/runner/{app_src → source}/issue/deliver.rb +1 -1
- data/lib/avm/tools/runner/{app_src → source}/issue.rb +1 -1
- data/lib/avm/tools/runner/{app_src → source}/subs.rb +1 -1
- data/lib/avm/tools/runner/{app_src → source}/test.rb +2 -2
- data/lib/avm/tools/runner/{app_src → source}/update.rb +1 -1
- data/lib/avm/tools/runner/{app_src → source}/version_bump.rb +1 -1
- data/lib/avm/tools/runner/{app_src.rb → source.rb} +3 -3
- data/lib/avm/tools/{app_src.rb → source.rb} +1 -1
- data/lib/avm/tools/version.rb +1 -1
- metadata +18 -22
- data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +0 -62
- data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb +0 -105
- data/lib/avm/tools/runner/app_src/ruby/bundler.rb +0 -21
- data/lib/avm/tools/runner/app_src/ruby.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7bf83b886d7158f37723c559d52eab9c7212390f673937cd81fa75209b7f6ff
|
4
|
+
data.tar.gz: 88797a72e234d4fa2900365cf3793fd7f2ea91ae9f8f804e8d624bc2946c3f17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ea44e51d1adf4b4607f08f12437c6cda8bb26a180ff1b3be138cf492e4b025e0364be3e6a70bcc35704c9755a087636e111f7ffb187ebfed1654e0943489aa7
|
7
|
+
data.tar.gz: 504f1b7e9c8e8019452078ba76abc89a13daee3969a8e25cb4a4a671e26c297a4efd8bf3ba34b383efde402217644c1779552ff9eef03b32892b4e0f6ab30ca8
|
@@ -6,7 +6,7 @@ require 'avm/sources/tests/builder'
|
|
6
6
|
module Avm
|
7
7
|
module Tools
|
8
8
|
class Runner
|
9
|
-
class
|
9
|
+
class Source < ::Avm::Sources::Runner
|
10
10
|
class Test
|
11
11
|
runner_with :help do
|
12
12
|
desc 'Test local project.'
|
@@ -83,7 +83,7 @@ module Avm
|
|
83
83
|
def unit_result(unit)
|
84
84
|
(
|
85
85
|
[unit.result.to_label] +
|
86
|
-
|
86
|
+
%i[stdout stderr].map { |label| "#{label.to_s.upcase}: #{unit.logs[label]}" }
|
87
87
|
).join(' | '.blue)
|
88
88
|
end
|
89
89
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/sources/runner'
|
4
|
-
require 'avm/tools/
|
4
|
+
require 'avm/tools/source'
|
5
5
|
require 'eac_cli/core_ext'
|
6
6
|
|
7
7
|
module Avm
|
8
8
|
module Tools
|
9
9
|
class Runner
|
10
|
-
class
|
10
|
+
class Source < ::Avm::Sources::Runner
|
11
11
|
require_sub __FILE__
|
12
12
|
|
13
13
|
def instance_banner
|
@@ -22,7 +22,7 @@ module Avm
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def instance_uncached
|
25
|
-
::Avm::Tools::
|
25
|
+
::Avm::Tools::Source.new(source_path)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/lib/avm/tools/version.rb
CHANGED
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.
|
4
|
+
version: 0.138.0
|
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: 2022-
|
11
|
+
date: 2022-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -36,28 +36,28 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.45'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
46
|
+
version: '0.45'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: avm-eac_ruby_base1
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
53
|
+
version: '0.22'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
60
|
+
version: '0.22'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: avm-eac_ubuntu_base0
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,7 +155,7 @@ dependencies:
|
|
155
155
|
version: '0.12'
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0.12.
|
158
|
+
version: 0.12.3
|
159
159
|
type: :runtime
|
160
160
|
prerelease: false
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
version: '0.12'
|
166
166
|
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: 0.12.
|
168
|
+
version: 0.12.3
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
170
|
name: eac_ruby_base0
|
171
171
|
requirement: !ruby/object:Gem::Requirement
|
@@ -313,22 +313,8 @@ files:
|
|
313
313
|
- lib/avm/projects/stereotypes/ruby_gem/publish.rb
|
314
314
|
- lib/avm/stereotypes.rb
|
315
315
|
- lib/avm/tools.rb
|
316
|
-
- lib/avm/tools/app_src.rb
|
317
316
|
- lib/avm/tools/core_ext.rb
|
318
317
|
- lib/avm/tools/runner.rb
|
319
|
-
- lib/avm/tools/runner/app_src.rb
|
320
|
-
- lib/avm/tools/runner/app_src/info.rb
|
321
|
-
- lib/avm/tools/runner/app_src/issue.rb
|
322
|
-
- lib/avm/tools/runner/app_src/issue/complete.rb
|
323
|
-
- lib/avm/tools/runner/app_src/issue/deliver.rb
|
324
|
-
- lib/avm/tools/runner/app_src/ruby.rb
|
325
|
-
- lib/avm/tools/runner/app_src/ruby/bundler.rb
|
326
|
-
- lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb
|
327
|
-
- lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb
|
328
|
-
- lib/avm/tools/runner/app_src/subs.rb
|
329
|
-
- lib/avm/tools/runner/app_src/test.rb
|
330
|
-
- lib/avm/tools/runner/app_src/update.rb
|
331
|
-
- lib/avm/tools/runner/app_src/version_bump.rb
|
332
318
|
- lib/avm/tools/runner/application_stereotypes.rb
|
333
319
|
- lib/avm/tools/runner/application_stereotypes/list.rb
|
334
320
|
- lib/avm/tools/runner/config.rb
|
@@ -356,8 +342,18 @@ files:
|
|
356
342
|
- lib/avm/tools/runner/self.rb
|
357
343
|
- lib/avm/tools/runner/self/docker.rb
|
358
344
|
- lib/avm/tools/runner/self/registry.rb
|
345
|
+
- lib/avm/tools/runner/source.rb
|
346
|
+
- lib/avm/tools/runner/source/info.rb
|
347
|
+
- lib/avm/tools/runner/source/issue.rb
|
348
|
+
- lib/avm/tools/runner/source/issue/complete.rb
|
349
|
+
- lib/avm/tools/runner/source/issue/deliver.rb
|
350
|
+
- lib/avm/tools/runner/source/subs.rb
|
351
|
+
- lib/avm/tools/runner/source/test.rb
|
352
|
+
- lib/avm/tools/runner/source/update.rb
|
353
|
+
- lib/avm/tools/runner/source/version_bump.rb
|
359
354
|
- lib/avm/tools/runner/source_generate.rb
|
360
355
|
- lib/avm/tools/self.rb
|
356
|
+
- lib/avm/tools/source.rb
|
361
357
|
- lib/avm/tools/version.rb
|
362
358
|
- locale/en.yml
|
363
359
|
- locale/pt-BR.yml
|
@@ -1,62 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_base0/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Tools
|
7
|
-
class Runner
|
8
|
-
class AppSrc
|
9
|
-
class Ruby
|
10
|
-
class Bundler
|
11
|
-
class GemfileLock
|
12
|
-
module Git
|
13
|
-
private
|
14
|
-
|
15
|
-
def git_continue
|
16
|
-
return unless check_capability(__method__, :git_repo, :continue)
|
17
|
-
|
18
|
-
infom "Adding \"#{gemfile_lock}\"..."
|
19
|
-
instance.git_repo.command('add', gemfile_lock).execute!
|
20
|
-
if rebase_conflict?
|
21
|
-
git_continue_run('rebase')
|
22
|
-
elsif cherry_conflict?
|
23
|
-
git_continue_run('cherry-pick')
|
24
|
-
else
|
25
|
-
raise 'Unknown how to continue'
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def git_continue_run(command)
|
30
|
-
infom "\"#{command}\" --continue..."
|
31
|
-
cmd = instance.git_repo.command(command, '--continue')
|
32
|
-
.envvar('GIT_EDITOR', 'true')
|
33
|
-
return unless !cmd.system && !conflict?
|
34
|
-
|
35
|
-
fatal_error "\"#{cmd}\" failed and there is no conflict"
|
36
|
-
end
|
37
|
-
|
38
|
-
def git_reset_checkout
|
39
|
-
return unless check_capability(__method__, :git_repo, nil)
|
40
|
-
|
41
|
-
git_reset_gemfile_lock
|
42
|
-
git_checkout_gemfile_lock
|
43
|
-
end
|
44
|
-
|
45
|
-
def git_checkout_gemfile_lock
|
46
|
-
infom 'Checkouting...'
|
47
|
-
instance.git_repo.command('checkout', '--', gemfile_lock).system!
|
48
|
-
end
|
49
|
-
|
50
|
-
def git_reset_gemfile_lock
|
51
|
-
infom 'Reseting...'
|
52
|
-
instance.git_repo.command('reset', gemfile_lock).system! if
|
53
|
-
::File.exist?(gemfile_lock)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,105 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_base0/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Tools
|
7
|
-
class Runner
|
8
|
-
class AppSrc
|
9
|
-
class Ruby
|
10
|
-
class Bundler
|
11
|
-
class GemfileLock
|
12
|
-
require_sub __FILE__, include_modules: true
|
13
|
-
runner_with :help do
|
14
|
-
desc 'Manipulage a "Gemfile.lock" file.'
|
15
|
-
bool_opt '-c', '--continue', 'Continue Git rebase/cherry-pick.'
|
16
|
-
bool_opt '-i', '--install', 'Run "bundle install".'
|
17
|
-
bool_opt '-u', '--update', 'Run "bundle update".'
|
18
|
-
bool_opt '-r', '--recursive', 'Run until Git rebase/cherry-pick is finished.'
|
19
|
-
bool_opt '-a', '--all', 'Same as "-cirud".'
|
20
|
-
bool_opt '-d', '--delete', 'Delete Gemfile.lock'
|
21
|
-
end
|
22
|
-
|
23
|
-
def run
|
24
|
-
loop do
|
25
|
-
git_reset_checkout
|
26
|
-
delete_gemfile_lock
|
27
|
-
bundle_update
|
28
|
-
bundle_install
|
29
|
-
git_continue
|
30
|
-
break if complete?
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
def complete?
|
37
|
-
!option_or_all?(:recursive) || !conflict?
|
38
|
-
end
|
39
|
-
|
40
|
-
def delete_gemfile_lock
|
41
|
-
return unless check_capability(__method__, nil, :delete)
|
42
|
-
|
43
|
-
::FileUtils.rm_f(gemfile_lock)
|
44
|
-
end
|
45
|
-
|
46
|
-
def rebasing?
|
47
|
-
instance.git_repo.root_path.join('.git', 'rebase-merge').exist?
|
48
|
-
end
|
49
|
-
|
50
|
-
def bundle_install
|
51
|
-
return unless check_capability(__method__, :ruby_gem, :install)
|
52
|
-
|
53
|
-
infom '"bundle install"...'
|
54
|
-
bundle_run('install')
|
55
|
-
end
|
56
|
-
|
57
|
-
def bundle_update
|
58
|
-
return unless check_capability(__method__, :ruby_gem, :update)
|
59
|
-
|
60
|
-
infom '"bundle update"...'
|
61
|
-
bundle_run('update')
|
62
|
-
end
|
63
|
-
|
64
|
-
def gemfile_lock
|
65
|
-
'Gemfile.lock'
|
66
|
-
end
|
67
|
-
|
68
|
-
def bundle_run(*args)
|
69
|
-
instance.ruby_gem.bundle(*args).system!
|
70
|
-
end
|
71
|
-
|
72
|
-
def conflict?
|
73
|
-
rebase_conflict? || cherry_conflict?
|
74
|
-
end
|
75
|
-
|
76
|
-
def rebase_conflict?
|
77
|
-
instance.git_repo.root_path.join('.git', 'REBASE_HEAD').exist?
|
78
|
-
end
|
79
|
-
|
80
|
-
def cherry_conflict?
|
81
|
-
instance.git_repo.root_path.join('.git', 'CHERRY_PICK_HEAD').exist?
|
82
|
-
end
|
83
|
-
|
84
|
-
def option_or_all?(option)
|
85
|
-
parsed[option] || parsed.all?
|
86
|
-
end
|
87
|
-
|
88
|
-
def instance
|
89
|
-
runner_context.call(:instance)
|
90
|
-
end
|
91
|
-
|
92
|
-
def check_capability(caller, capability, option)
|
93
|
-
return false unless option.blank? || option_or_all?(option)
|
94
|
-
return true if capability.if_present(true) { |v| instance.respond_to?(v) }
|
95
|
-
|
96
|
-
warn "Cannot run #{caller}: instance has no capability \"#{capability}\""
|
97
|
-
false
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_base0/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Tools
|
7
|
-
class Runner
|
8
|
-
class AppSrc
|
9
|
-
class Ruby
|
10
|
-
class Bundler
|
11
|
-
require_sub __FILE__
|
12
|
-
runner_with :help, :subcommands do
|
13
|
-
desc 'Ruby\'s bundler utitilies for local projects.'
|
14
|
-
subcommands
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_cli/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Tools
|
7
|
-
class Runner
|
8
|
-
class AppSrc
|
9
|
-
class Ruby
|
10
|
-
require_sub __FILE__
|
11
|
-
runner_with :help, :subcommands do
|
12
|
-
desc 'Ruby utitilies for local projects.'
|
13
|
-
subcommands
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|