avm 0.73.0 → 0.73.1
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/instances/base/subcommand_parent.rb +5 -5
- data/lib/avm/scms/auto_commit/for_file.rb +12 -2
- data/lib/avm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7982b293a654555c267bc2f3b8856a40e4e60a5ee2a9bcc08796d4814a811c15
|
4
|
+
data.tar.gz: 6a8ade3bc981708360d1cecdb7e9ee1461d0fad4ff3daa0ae7de1f6636e99e9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32e5a58c320316929d9d954b98a284f40e4231af15b848513cdfcfc91364ad20362b95c05af1fe6c3f4822fc786a981129c8d3878d55104189f2d7af91c442f9
|
7
|
+
data.tar.gz: de0f2e9f63d6bd9e3aac64f36ef505f028494462e6e734b42efc1c88be62bb77041e3c2a8ff31a92293884e4d3e73872a9c95e219fc7e3909d6308de124563cc
|
@@ -7,15 +7,15 @@ module Avm
|
|
7
7
|
module Instances
|
8
8
|
class Base
|
9
9
|
class SubcommandParent
|
10
|
+
include ::EacCli::Runner
|
10
11
|
enable_simple_cache
|
11
|
-
common_constructor :instance
|
12
|
+
common_constructor :instance do
|
13
|
+
self.runner_context = ::EacCli::Runner::Context.new(self, argv: runner_argv)
|
14
|
+
end
|
15
|
+
for_context :instance
|
12
16
|
|
13
17
|
private
|
14
18
|
|
15
|
-
def runner_context_uncached
|
16
|
-
::EacCli::Runner::Context.new(self, argv: runner_argv)
|
17
|
-
end
|
18
|
-
|
19
19
|
def runner_argv
|
20
20
|
[instance.class.name.split('::')[-2].dasherize, instance.id]
|
21
21
|
end
|
@@ -28,6 +28,11 @@ module Avm
|
|
28
28
|
|
29
29
|
private
|
30
30
|
|
31
|
+
# @return [Boolean]
|
32
|
+
def changed?
|
33
|
+
scm.changed_files.any? { |cf| cf.path == scm_relative_path }
|
34
|
+
end
|
35
|
+
|
31
36
|
def commit_info_uncached
|
32
37
|
rules.lazy.map { |rule| rule.with_file(self).commit_info }.find(&:present?)
|
33
38
|
.if_present { |v| v.path(path) }
|
@@ -42,8 +47,13 @@ module Avm
|
|
42
47
|
return false if commit_info.blank?
|
43
48
|
|
44
49
|
infov ' Commit info', commit_info
|
45
|
-
|
46
|
-
|
50
|
+
if changed?
|
51
|
+
scm.run_commit(commit_info)
|
52
|
+
success ' Commited'
|
53
|
+
else
|
54
|
+
warn " File \"#{path}\" unchanged"
|
55
|
+
end
|
56
|
+
|
47
57
|
true
|
48
58
|
end
|
49
59
|
|
data/lib/avm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.73.
|
4
|
+
version: 0.73.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|