avm-tools 0.137.0 → 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/version.rb +1 -1
- metadata +4 -8
- data/lib/avm/tools/runner/source/ruby/bundler/gemfile_lock/git.rb +0 -62
- data/lib/avm/tools/runner/source/ruby/bundler/gemfile_lock.rb +0 -105
- data/lib/avm/tools/runner/source/ruby/bundler.rb +0 -21
- data/lib/avm/tools/runner/source/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
|
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
|
@@ -50,14 +50,14 @@ dependencies:
|
|
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
|
@@ -347,10 +347,6 @@ files:
|
|
347
347
|
- lib/avm/tools/runner/source/issue.rb
|
348
348
|
- lib/avm/tools/runner/source/issue/complete.rb
|
349
349
|
- lib/avm/tools/runner/source/issue/deliver.rb
|
350
|
-
- lib/avm/tools/runner/source/ruby.rb
|
351
|
-
- lib/avm/tools/runner/source/ruby/bundler.rb
|
352
|
-
- lib/avm/tools/runner/source/ruby/bundler/gemfile_lock.rb
|
353
|
-
- lib/avm/tools/runner/source/ruby/bundler/gemfile_lock/git.rb
|
354
350
|
- lib/avm/tools/runner/source/subs.rb
|
355
351
|
- lib/avm/tools/runner/source/test.rb
|
356
352
|
- lib/avm/tools/runner/source/update.rb
|
@@ -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 Source < ::Avm::Sources::Runner
|
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 Source < ::Avm::Sources::Runner
|
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 Source < ::Avm::Sources::Runner
|
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 Source < ::Avm::Sources::Runner
|
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
|