avm-tools 0.142.7 → 0.143.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/git/subrepo/fix.rb +12 -4
- data/lib/avm/tools/runner/{git → source}/auto_commit.rb +12 -9
- data/lib/avm/tools/version.rb +1 -1
- metadata +13 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fab6890dc62b07870be164bb09ea3403cb66ca9b05416dfddc3dd6d7197fe881
|
4
|
+
data.tar.gz: 1b8b944dfc31c738a4b4efbca860f2e3ab64c00843d08b03b2f2ef2a7b7369c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87bdbe91033d37ef8950c88d4bb76a7d5e0b1e592a49f328abdc8ac0ef334e05504f7396b4e80c345b3ccb29f2f9bbfa2c0f774f51c47fe3b6829666129aecf7
|
7
|
+
data.tar.gz: c0096ed9eb6408d818f9676fd5bf77bde58d92d11daa8267cb0c4ea66c21c6605fc03652962628dc334614ae809f9061fc44d15cd1890d57aecb7237810be6e1
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/tools/core_ext'
|
4
|
-
require 'avm/git/
|
5
|
-
require 'avm/git/file_auto_fixup'
|
4
|
+
require 'avm/git/scms/git'
|
6
5
|
require 'avm/git/subrepo_checks'
|
6
|
+
require 'avm/scms/auto_commit/rules/unique'
|
7
|
+
require 'avm/scms/auto_commit/for_file'
|
7
8
|
require 'eac_git/local'
|
8
9
|
|
9
10
|
module Avm
|
@@ -31,8 +32,10 @@ module Avm
|
|
31
32
|
infov 'Dirty files', local_repos.dirty_files.count
|
32
33
|
local_repos.dirty_files.each do |file|
|
33
34
|
infov ' * Ammending', file.path
|
34
|
-
::Avm::
|
35
|
-
|
35
|
+
::Avm::Scms::AutoCommit::ForFile.new(
|
36
|
+
git_scm, file.path,
|
37
|
+
[::Avm::Scms::AutoCommit::Rules::Unique.new]
|
38
|
+
).run
|
36
39
|
end
|
37
40
|
end
|
38
41
|
|
@@ -43,6 +46,11 @@ module Avm
|
|
43
46
|
!c.result.error?
|
44
47
|
end
|
45
48
|
|
49
|
+
# @return [Avm::Git::Scms::Git]
|
50
|
+
def git_scm_uncached
|
51
|
+
::Avm::Git::Scms::Git.new(runner_context.call(:git).root_path)
|
52
|
+
end
|
53
|
+
|
46
54
|
def new_check(fix_parent = false)
|
47
55
|
r = ::Avm::Git::SubrepoChecks.new(local_repos).add_all_subrepos
|
48
56
|
r.fix_parent = fix_parent
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/core_ext'
|
4
4
|
require 'avm/file_formats/search_formatter'
|
5
|
-
require 'avm/
|
6
|
-
require 'avm/
|
5
|
+
require 'avm/scms/auto_commit/for_file'
|
6
|
+
require 'avm/scms/auto_commit/rules'
|
7
7
|
|
8
8
|
module Avm
|
9
9
|
module Tools
|
10
10
|
class Runner
|
11
|
-
class
|
11
|
+
class Source < ::Avm::Sources::Runner
|
12
12
|
class AutoCommit
|
13
13
|
runner_with :help do
|
14
14
|
desc 'Auto fixup files.'
|
@@ -19,13 +19,18 @@ module Avm
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def run
|
22
|
-
runner_context.call(:git).command('reset', 'HEAD').system!
|
23
22
|
format_files
|
24
23
|
files.each do |file|
|
25
|
-
::Avm::
|
24
|
+
::Avm::Scms::AutoCommit::ForFile.new(runner_context.call(:source).scm, file, rules)
|
25
|
+
.run
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
def help_extra_text
|
30
|
+
"Rules\n" + ::Avm::Scms::AutoCommit::Rules.all
|
31
|
+
.map { |r| ' ' + r.keys.join(', ') + "\n" }.join
|
32
|
+
end
|
33
|
+
|
29
34
|
private
|
30
35
|
|
31
36
|
def files_uncached
|
@@ -48,14 +53,12 @@ module Avm
|
|
48
53
|
def dirty_files
|
49
54
|
return [] unless parsed.dirty?
|
50
55
|
|
51
|
-
runner_context.call(:
|
52
|
-
file.path.to_pathname.expand_path(runner_context.call(:git).root_path)
|
53
|
-
end
|
56
|
+
runner_context.call(:source).scm.changed_files.map(&:absolute_path)
|
54
57
|
end
|
55
58
|
|
56
59
|
def rules
|
57
60
|
parsed.rule.map do |rule_string|
|
58
|
-
::Avm::
|
61
|
+
::Avm::Scms::AutoCommit::Rules.parse(rule_string)
|
59
62
|
end
|
60
63
|
end
|
61
64
|
|
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.143.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:
|
11
|
+
date: 2023-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.59'
|
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.59'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: avm-eac_ruby_base1
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: '0.27'
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.27.
|
56
|
+
version: 0.27.3
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,21 +63,21 @@ dependencies:
|
|
63
63
|
version: '0.27'
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0.27.
|
66
|
+
version: 0.27.3
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: avm-eac_ubuntu_base0
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '0.
|
73
|
+
version: '0.4'
|
74
74
|
type: :runtime
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '0.
|
80
|
+
version: '0.4'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: avm-files
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,20 +98,14 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: '0.
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: 0.10.1
|
101
|
+
version: '0.11'
|
105
102
|
type: :runtime
|
106
103
|
prerelease: false
|
107
104
|
version_requirements: !ruby/object:Gem::Requirement
|
108
105
|
requirements:
|
109
106
|
- - "~>"
|
110
107
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0.
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: 0.10.1
|
108
|
+
version: '0.11'
|
115
109
|
- !ruby/object:Gem::Dependency
|
116
110
|
name: clipboard
|
117
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,14 +206,14 @@ dependencies:
|
|
212
206
|
requirements:
|
213
207
|
- - "~>"
|
214
208
|
- !ruby/object:Gem::Version
|
215
|
-
version: '1.
|
209
|
+
version: '1.13'
|
216
210
|
type: :runtime
|
217
211
|
prerelease: false
|
218
212
|
version_requirements: !ruby/object:Gem::Requirement
|
219
213
|
requirements:
|
220
214
|
- - "~>"
|
221
215
|
- !ruby/object:Gem::Version
|
222
|
-
version: '1.
|
216
|
+
version: '1.13'
|
223
217
|
- !ruby/object:Gem::Dependency
|
224
218
|
name: ruby-progressbar
|
225
219
|
requirement: !ruby/object:Gem::Requirement
|
@@ -271,7 +265,6 @@ files:
|
|
271
265
|
- lib/avm/tools/runner/files/format.rb
|
272
266
|
- lib/avm/tools/runner/files/rotate.rb
|
273
267
|
- lib/avm/tools/runner/git.rb
|
274
|
-
- lib/avm/tools/runner/git/auto_commit.rb
|
275
268
|
- lib/avm/tools/runner/git/commit.rb
|
276
269
|
- lib/avm/tools/runner/git/deploy.rb
|
277
270
|
- lib/avm/tools/runner/git/dirty_files.rb
|
@@ -293,6 +286,7 @@ files:
|
|
293
286
|
- lib/avm/tools/runner/self/docker.rb
|
294
287
|
- lib/avm/tools/runner/self/registry.rb
|
295
288
|
- lib/avm/tools/runner/source.rb
|
289
|
+
- lib/avm/tools/runner/source/auto_commit.rb
|
296
290
|
- lib/avm/tools/runner/source/info.rb
|
297
291
|
- lib/avm/tools/runner/source/issue.rb
|
298
292
|
- lib/avm/tools/runner/source/issue/complete.rb
|