avm 0.46.0 → 0.48.0
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/launcher/errors.rb +11 -0
- data/lib/avm/launcher/instances.rb +11 -0
- data/lib/avm/launcher/paths/logical.rb +2 -1
- data/lib/avm/launcher/paths.rb +11 -0
- data/lib/avm/launcher/project.rb +17 -0
- data/lib/avm/launcher/publish.rb +11 -0
- data/lib/avm/launcher/stereotype.rb +63 -0
- data/lib/avm/launcher.rb +9 -0
- data/lib/avm/version.rb +1 -1
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6154966f958a3a20d945e50d0adfa863e2cdc4347a387d1cc438693dd2bafe4d
|
4
|
+
data.tar.gz: 851e61bcad1cf7ce2d4ff29786abb52ea9421ce0954f504b339ca54f9482cf2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91cfb8131fa8053b3819582a957899c1b7957fe709513cb4cba5032c66bf45540a8ea376b6838a3651913481696efef9c841e0f621d5992f5de85760836fb15f
|
7
|
+
data.tar.gz: 56cf053b8f7a9a2790a5a60deec1e8336c00c5909ee3bf944947a7ff1365987ddf95f5bbe75c24fbe1a863ce7847fd00611949b8363083b878fbe8ecb108fdc6
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'avm/projects/stereotypes'
|
4
4
|
require 'avm/launcher/paths/real'
|
5
|
+
require 'avm/launcher/stereotype'
|
5
6
|
|
6
7
|
module Avm
|
7
8
|
module Launcher
|
@@ -61,7 +62,7 @@ module Avm
|
|
61
62
|
private
|
62
63
|
|
63
64
|
def stereotypes_uncached
|
64
|
-
::Avm::
|
65
|
+
::Avm::Launcher::Stereotype.stereotypes.select { |s| s.match?(self) }
|
65
66
|
end
|
66
67
|
|
67
68
|
def build_child(name)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Launcher
|
7
|
+
class Project
|
8
|
+
common_constructor :name, :instances do
|
9
|
+
self.instances = instances.to_a
|
10
|
+
end
|
11
|
+
|
12
|
+
def to_s
|
13
|
+
name
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/core_ext/string/inflections'
|
4
|
+
require 'colorized_string'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Launcher
|
8
|
+
module Stereotype
|
9
|
+
class << self
|
10
|
+
attr_reader :stereotypes
|
11
|
+
|
12
|
+
def included(base)
|
13
|
+
@stereotypes ||= []
|
14
|
+
@stereotypes << base
|
15
|
+
base.extend(ClassMethods)
|
16
|
+
end
|
17
|
+
|
18
|
+
def git_stereotypes
|
19
|
+
stereotypes.select { |c| c.name.demodulize.downcase.match('git') }
|
20
|
+
end
|
21
|
+
|
22
|
+
def nogit_stereotypes
|
23
|
+
stereotypes - git_stereotypes
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
module ClassMethods
|
28
|
+
def label
|
29
|
+
::ColorizedString.new(stereotype_name).send(color)
|
30
|
+
end
|
31
|
+
|
32
|
+
def stereotype_name
|
33
|
+
name.demodulize
|
34
|
+
end
|
35
|
+
|
36
|
+
{
|
37
|
+
local_project_mixin: ::Module,
|
38
|
+
publish: ::Class,
|
39
|
+
update: ::Class,
|
40
|
+
version_bump: ::Class,
|
41
|
+
warp: ::Class
|
42
|
+
}.each do |name, is_a|
|
43
|
+
define_method "#{name}_#{is_a.name.underscore}" do
|
44
|
+
sub_constant(name.to_s.camelcase, is_a)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def sub_constant(constant_name, is_a)
|
51
|
+
return nil unless const_defined?(constant_name)
|
52
|
+
|
53
|
+
constant = const_get(constant_name)
|
54
|
+
unless is_a.if_present(true) { |v| constant.is_a?(v) }
|
55
|
+
raise("#{constant} is not a #{is_a}")
|
56
|
+
end
|
57
|
+
|
58
|
+
constant
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
data/lib/avm/launcher.rb
ADDED
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.48.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: 2022-10-
|
11
|
+
date: 2022-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|
@@ -258,6 +258,7 @@ files:
|
|
258
258
|
- lib/avm/instances/docker_image.rb
|
259
259
|
- lib/avm/instances/entry_keys.rb
|
260
260
|
- lib/avm/instances/runner.rb
|
261
|
+
- lib/avm/launcher.rb
|
261
262
|
- lib/avm/launcher/context.rb
|
262
263
|
- lib/avm/launcher/context/instance_collector.rb
|
263
264
|
- lib/avm/launcher/context/instance_discovery.rb
|
@@ -265,17 +266,23 @@ files:
|
|
265
266
|
- lib/avm/launcher/context/instance_manager/cached_instance.rb
|
266
267
|
- lib/avm/launcher/context/instance_manager/cached_instances.rb
|
267
268
|
- lib/avm/launcher/context/settings.rb
|
269
|
+
- lib/avm/launcher/errors.rb
|
268
270
|
- lib/avm/launcher/errors/base.rb
|
269
271
|
- lib/avm/launcher/errors/non_project.rb
|
272
|
+
- lib/avm/launcher/instances.rb
|
270
273
|
- lib/avm/launcher/instances/base.rb
|
271
274
|
- lib/avm/launcher/instances/base/cache.rb
|
272
275
|
- lib/avm/launcher/instances/error.rb
|
273
276
|
- lib/avm/launcher/instances/runner_helper.rb
|
274
277
|
- lib/avm/launcher/instances/settings.rb
|
278
|
+
- lib/avm/launcher/paths.rb
|
275
279
|
- lib/avm/launcher/paths/logical.rb
|
276
280
|
- lib/avm/launcher/paths/real.rb
|
281
|
+
- lib/avm/launcher/project.rb
|
282
|
+
- lib/avm/launcher/publish.rb
|
277
283
|
- lib/avm/launcher/publish/base.rb
|
278
284
|
- lib/avm/launcher/publish/check_result.rb
|
285
|
+
- lib/avm/launcher/stereotype.rb
|
279
286
|
- lib/avm/path_string.rb
|
280
287
|
- lib/avm/registry.rb
|
281
288
|
- lib/avm/registry/application_stereotypes.rb
|