avm 0.82.0 → 0.84.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/data/rotate.rb +1 -1
- data/lib/avm/launcher/instances/base/publishing.rb +1 -1
- data/lib/avm/registry/from_gems.rb +2 -2
- data/lib/avm/rspec/shared_examples/avm_file_formats_with_fixtures.rb +0 -1
- data/lib/avm/source_generators/base.rb +1 -0
- data/lib/avm/source_generators/runner.rb +6 -0
- data/lib/avm/sources/base/sub/remove.rb +38 -0
- data/lib/avm/sources/base/sub.rb +26 -0
- data/lib/avm/sources/base/subs.rb +7 -0
- data/lib/avm/sources/tests/builder.rb +1 -1
- data/lib/avm/version.rb +1 -1
- metadata +17 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd8c9d50d9d63f0898aeed10ef04481224cfc100444184a58488a07ba9159a9d
|
4
|
+
data.tar.gz: eb308ede0d25e1a967bb71de08cbf0077a2deabdf267342fc19b1f8e5214e612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d07d9f55e7a938cc3ae3f5061b6f7d95ff036ee126a4e775091ed31f06384f8f9a42331822046b10d91ddbdd032aa994d508781d35eb3825f48dc0910d0c5109
|
7
|
+
data.tar.gz: 7c07ba31a700586921f86991941f3e3b68662bc94635613d442b535e373b30d8d0aa0ce14384f8a27a7e06a555d390378810b79b31b991cd7c6931f5d4f3674c
|
data/lib/avm/data/rotate.rb
CHANGED
@@ -47,8 +47,8 @@ module Avm
|
|
47
47
|
private
|
48
48
|
|
49
49
|
def raise_not_found(*args)
|
50
|
-
raise("No registered module valid for #{args}" \
|
51
|
-
|
50
|
+
raise("No registered module valid for #{args} " \
|
51
|
+
"(Module suffix: #{module_suffix}, Available: #{available.join(', ')})")
|
52
52
|
end
|
53
53
|
|
54
54
|
def registered_modules_uncached
|
@@ -25,6 +25,12 @@ module Avm
|
|
25
25
|
success "Source generated in \"#{generator.target_path}\""
|
26
26
|
end
|
27
27
|
|
28
|
+
# @return [String]
|
29
|
+
def help_extra_text
|
30
|
+
help_list_section('Stereotypes', ::Avm::Registry.source_generators.available
|
31
|
+
.map(&:application_stereotype_name))
|
32
|
+
end
|
33
|
+
|
28
34
|
def start_banner
|
29
35
|
infov 'Stereotype', stereotype_name
|
30
36
|
infov 'Target path', target_path
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Sources
|
7
|
+
class Base
|
8
|
+
class Sub
|
9
|
+
class Remove
|
10
|
+
acts_as_instance_method
|
11
|
+
|
12
|
+
# !method initialize(sub)
|
13
|
+
# @param sub [Avm::Sources::Base::Sub]
|
14
|
+
common_constructor :sub
|
15
|
+
delegate :source, to: :sub
|
16
|
+
|
17
|
+
# @return [void]
|
18
|
+
def result
|
19
|
+
source.scm.commit_if_change(commit_message) { do_changes }
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
# @return [String]
|
25
|
+
def commit_message
|
26
|
+
sub.i18n_translate(:remove_commit_message, sub_path: sub.sub_path)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [void]
|
30
|
+
def do_changes
|
31
|
+
::FileUtils.rm_rf(sub.absolute_path)
|
32
|
+
source.on_sub_updated
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/sources/base/subs_paths'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Sources
|
8
|
+
class Base
|
9
|
+
class Sub
|
10
|
+
# !method initialize(source, sub_path)
|
11
|
+
# @param source [Avm::Sources::Base]
|
12
|
+
# @param sub_path [Pathname]
|
13
|
+
common_constructor :source, :sub_path do
|
14
|
+
self.sub_path = sub_path.to_pathname
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Pathname]
|
18
|
+
def absolute_path
|
19
|
+
sub_path.expand_path(source.path)
|
20
|
+
end
|
21
|
+
|
22
|
+
require_sub __FILE__, require_mode: :kernel
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/sources/base/sub'
|
3
4
|
require 'avm/sources/base/subs_paths'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
|
@@ -17,6 +18,12 @@ module Avm
|
|
17
18
|
subs.lazy.map { |sub| path.expand_path.child_of?(sub.path) ? sub : nil }.find(&:present?)
|
18
19
|
end
|
19
20
|
|
21
|
+
# @param sub_path [Pathname]
|
22
|
+
# @return [Avm::Sources::Base::Sub]
|
23
|
+
def sub(sub_path)
|
24
|
+
::Avm::Sources::Base::Sub.new(self, sub_path)
|
25
|
+
end
|
26
|
+
|
20
27
|
# @return [Enumerable<Avm::Sources::Base>]
|
21
28
|
def subs
|
22
29
|
subs_paths_to_search
|
@@ -73,7 +73,7 @@ module Avm
|
|
73
73
|
return r if r.any?
|
74
74
|
|
75
75
|
raise ::ArgumentError, "Source not found with ID=#{source_id}" \
|
76
|
-
|
76
|
+
"(Available: #{available_units.map(&:id).join(', ')})"
|
77
77
|
end
|
78
78
|
|
79
79
|
# @return [Array<Avm::Sources::Tests::Single>]
|
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.
|
4
|
+
version: 0.84.0
|
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-11-
|
11
|
+
date: 2023-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.38'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.38.1
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '0.38'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.38.1
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: eac_config
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,42 +200,42 @@ dependencies:
|
|
194
200
|
requirements:
|
195
201
|
- - "~>"
|
196
202
|
- !ruby/object:Gem::Version
|
197
|
-
version: '0.
|
203
|
+
version: '0.33'
|
198
204
|
type: :development
|
199
205
|
prerelease: false
|
200
206
|
version_requirements: !ruby/object:Gem::Requirement
|
201
207
|
requirements:
|
202
208
|
- - "~>"
|
203
209
|
- !ruby/object:Gem::Version
|
204
|
-
version: '0.
|
210
|
+
version: '0.33'
|
205
211
|
- !ruby/object:Gem::Dependency
|
206
212
|
name: avm-git
|
207
213
|
requirement: !ruby/object:Gem::Requirement
|
208
214
|
requirements:
|
209
215
|
- - "~>"
|
210
216
|
- !ruby/object:Gem::Version
|
211
|
-
version: '0.
|
217
|
+
version: '0.14'
|
212
218
|
type: :development
|
213
219
|
prerelease: false
|
214
220
|
version_requirements: !ruby/object:Gem::Requirement
|
215
221
|
requirements:
|
216
222
|
- - "~>"
|
217
223
|
- !ruby/object:Gem::Version
|
218
|
-
version: '0.
|
224
|
+
version: '0.14'
|
219
225
|
- !ruby/object:Gem::Dependency
|
220
226
|
name: eac_ruby_gem_support
|
221
227
|
requirement: !ruby/object:Gem::Requirement
|
222
228
|
requirements:
|
223
229
|
- - "~>"
|
224
230
|
- !ruby/object:Gem::Version
|
225
|
-
version: 0.
|
231
|
+
version: '0.9'
|
226
232
|
type: :development
|
227
233
|
prerelease: false
|
228
234
|
version_requirements: !ruby/object:Gem::Requirement
|
229
235
|
requirements:
|
230
236
|
- - "~>"
|
231
237
|
- !ruby/object:Gem::Version
|
232
|
-
version: 0.
|
238
|
+
version: '0.9'
|
233
239
|
description:
|
234
240
|
email:
|
235
241
|
executables: []
|
@@ -419,6 +425,8 @@ files:
|
|
419
425
|
- lib/avm/sources/base/organizational.rb
|
420
426
|
- lib/avm/sources/base/parent.rb
|
421
427
|
- lib/avm/sources/base/stereotype.rb
|
428
|
+
- lib/avm/sources/base/sub.rb
|
429
|
+
- lib/avm/sources/base/sub/remove.rb
|
422
430
|
- lib/avm/sources/base/subs.rb
|
423
431
|
- lib/avm/sources/base/subs_paths.rb
|
424
432
|
- lib/avm/sources/base/testing.rb
|
@@ -451,7 +459,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
451
459
|
requirements:
|
452
460
|
- - ">="
|
453
461
|
- !ruby/object:Gem::Version
|
454
|
-
version: '
|
462
|
+
version: '2.7'
|
455
463
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
456
464
|
requirements:
|
457
465
|
- - ">="
|