avm 0.78.0 → 0.80.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/applications/base/local_instance.rb +31 -0
- data/lib/avm/applications/base/local_source.rb +30 -0
- data/lib/avm/applications/base/naming.rb +28 -0
- data/lib/avm/applications/base/organization.rb +29 -0
- data/lib/avm/applications/base.rb +1 -39
- data/lib/avm/instances/base/auto_values/database.rb +1 -0
- data/lib/avm/registry/applications.rb +7 -0
- data/lib/avm/registry/config_objects.rb +18 -0
- data/lib/avm/registry.rb +3 -2
- data/lib/avm/version.rb +1 -1
- metadata +23 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '07288db64613db9f7542a592edf18a5ef9c23319b0e89dd14fa475c90c76429d'
|
4
|
+
data.tar.gz: 20510a4b8aea2c182c067ec62be6faba8e45f268e3a7830a8af0358543881151
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2cf4806ecc92f0e7aff8793e9e9157f06564396770df043cbafbc7ee164dd0f86d1bf547b3b5ddd42d7f113fd9d73884725506bf7369394964d66fdd1450c75
|
7
|
+
data.tar.gz: 26611244b005c70d57d1625de6a55b1332a397769906fd0958aac6a931a61b7ddc18041471b14b5f2365e09b872311bfcf5455d254754956d6f4568488705208
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/instances/ids'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Applications
|
8
|
+
class Base
|
9
|
+
module LocalInstance
|
10
|
+
LOCAL_INSTANCE_SUFFIX = 'dev'
|
11
|
+
|
12
|
+
# @return [String]
|
13
|
+
def local_instance_id
|
14
|
+
::Avm::Instances::Ids.build(id, local_instance_suffix)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [String]
|
18
|
+
def local_instance_suffix
|
19
|
+
LOCAL_INSTANCE_SUFFIX
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
# @return [Avm::Instances::Base]
|
25
|
+
def local_instance_uncached
|
26
|
+
instance(local_instance_suffix)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
require 'eac_config/node'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Applications
|
9
|
+
class Base
|
10
|
+
module LocalSource
|
11
|
+
# @return [Pathname]
|
12
|
+
def local_source_path
|
13
|
+
local_source_path_entry.value!.to_pathname
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [EacConfig::Entry]
|
17
|
+
def local_source_path_entry
|
18
|
+
::EacConfig::Node.context.current.entry([local_instance_id, 'install', 'path'])
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
# @return [Avm::Sources::Base]
|
24
|
+
def local_source_uncached
|
25
|
+
::Avm::Registry.sources.detect(local_source_path)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Applications
|
7
|
+
class Base
|
8
|
+
module Naming
|
9
|
+
DEFAULT_NAME = '_Undefined_'
|
10
|
+
|
11
|
+
# @return [String]
|
12
|
+
def default_name
|
13
|
+
DEFAULT_NAME
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [String]
|
17
|
+
def name
|
18
|
+
name_from_configuration || default_name
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [String]
|
22
|
+
def name_from_configuration
|
23
|
+
entry(::Avm::Instances::EntryKeys::NAME).optional_value
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Applications
|
7
|
+
class Base
|
8
|
+
module Organization
|
9
|
+
DEFAULT_ORGANIZATION = '_undefined_'
|
10
|
+
ORGANIZATION_CONFIG_KEY = 'organization'
|
11
|
+
|
12
|
+
# @return [String]
|
13
|
+
def default_organization
|
14
|
+
DEFAULT_ORGANIZATION
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [String, nil]
|
18
|
+
def organization_by_configuration
|
19
|
+
entry(ORGANIZATION_CONFIG_KEY).optional_value
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
def organization
|
24
|
+
organization_by_configuration || default_organization
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/entries/base'
|
4
|
-
require 'avm/instances/ids'
|
5
|
-
require 'avm/registry'
|
6
4
|
require 'eac_ruby_utils/core_ext'
|
7
5
|
|
8
6
|
module Avm
|
@@ -12,7 +10,7 @@ module Avm
|
|
12
10
|
require_sub __FILE__, include_modules: true
|
13
11
|
include ::Avm::Entries::Base
|
14
12
|
|
15
|
-
|
13
|
+
AVM_TYPE = 'Application'
|
16
14
|
|
17
15
|
common_constructor :id do
|
18
16
|
self.id = id.to_s
|
@@ -25,42 +23,6 @@ module Avm
|
|
25
23
|
def instance(suffix)
|
26
24
|
stereotype.instance_class.new(self, suffix)
|
27
25
|
end
|
28
|
-
|
29
|
-
def name
|
30
|
-
entry(::Avm::Instances::EntryKeys::NAME).read
|
31
|
-
end
|
32
|
-
|
33
|
-
# @return [String]
|
34
|
-
def local_instance_id
|
35
|
-
::Avm::Instances::Ids.build(id, local_instance_suffix)
|
36
|
-
end
|
37
|
-
|
38
|
-
# @return [Pathname]
|
39
|
-
def local_source_path
|
40
|
-
local_source_path_entry.value!.to_pathname
|
41
|
-
end
|
42
|
-
|
43
|
-
# @return [EacConfig::Entry]
|
44
|
-
def local_source_path_entry
|
45
|
-
::EacConfig::Node.context.current.entry([local_instance_id, 'install', 'path'])
|
46
|
-
end
|
47
|
-
|
48
|
-
# @return [String]
|
49
|
-
def local_instance_suffix
|
50
|
-
LOCAL_INSTANCE_SUFFIX
|
51
|
-
end
|
52
|
-
|
53
|
-
private
|
54
|
-
|
55
|
-
# @return [Avm::Instances::Base]
|
56
|
-
def local_instance_uncached
|
57
|
-
instance(local_instance_suffix)
|
58
|
-
end
|
59
|
-
|
60
|
-
# @return [Avm::Sources::Base]
|
61
|
-
def local_source_uncached
|
62
|
-
::Avm::Registry.sources.detect(local_source_path)
|
63
|
-
end
|
64
26
|
end
|
65
27
|
end
|
66
28
|
end
|
@@ -10,6 +10,7 @@ module Avm
|
|
10
10
|
|
11
11
|
# @return [Array<Avm::Applications::Base>]
|
12
12
|
def available
|
13
|
+
load_config
|
13
14
|
detected.values
|
14
15
|
end
|
15
16
|
|
@@ -26,6 +27,12 @@ module Avm
|
|
26
27
|
def detected
|
27
28
|
@detected ||= {}
|
28
29
|
end
|
30
|
+
|
31
|
+
def load_config
|
32
|
+
::Avm::Registry.config_objects.available.each do |id, type|
|
33
|
+
detect(id) if type == ::Avm::Applications::Base::AVM_TYPE
|
34
|
+
end
|
35
|
+
end
|
29
36
|
end
|
30
37
|
end
|
31
38
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/applications/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Registry
|
8
|
+
class ConfigObjects
|
9
|
+
def initialize(*args); end
|
10
|
+
|
11
|
+
# @return [Array<Avm::Applications::Base>]
|
12
|
+
def available
|
13
|
+
::EacConfig::Node.context.current.entries('*.avm_type').node_entries
|
14
|
+
.map { |ne| [ne.path.first, ne.value] }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/avm/registry.rb
CHANGED
@@ -7,8 +7,9 @@ module Avm
|
|
7
7
|
module Registry
|
8
8
|
require_sub __FILE__
|
9
9
|
enable_listable
|
10
|
-
lists.add_symbol :category, :applications, :application_stereotypes, :
|
11
|
-
:
|
10
|
+
lists.add_symbol :category, :applications, :application_stereotypes, :config_objects,
|
11
|
+
:file_formats, :instances, :launcher_stereotypes, :runners, :scms,
|
12
|
+
:source_generators, :sources
|
12
13
|
|
13
14
|
class << self
|
14
15
|
enable_simple_cache
|
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.80.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
|
+
date: 2023-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -16,48 +16,48 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.21'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.21'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: eac_cli
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 0.35.1
|
33
|
+
version: '0.38'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 0.35.1
|
40
|
+
version: '0.38'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: eac_config
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
47
|
+
version: '0.14'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 0.14.1
|
54
51
|
type: :runtime
|
55
52
|
prerelease: false
|
56
53
|
version_requirements: !ruby/object:Gem::Requirement
|
57
54
|
requirements:
|
58
55
|
- - "~>"
|
59
56
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
57
|
+
version: '0.14'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.14.1
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: eac_docker
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,20 +112,20 @@ dependencies:
|
|
112
112
|
requirements:
|
113
113
|
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: '0.
|
115
|
+
version: '0.119'
|
116
116
|
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.
|
118
|
+
version: 0.119.2
|
119
119
|
type: :runtime
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '0.
|
125
|
+
version: '0.119'
|
126
126
|
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: 0.
|
128
|
+
version: 0.119.2
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: eac_templates
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,6 +241,10 @@ files:
|
|
241
241
|
- lib/avm/application_stereotypes/base.rb
|
242
242
|
- lib/avm/applications.rb
|
243
243
|
- lib/avm/applications/base.rb
|
244
|
+
- lib/avm/applications/base/local_instance.rb
|
245
|
+
- lib/avm/applications/base/local_source.rb
|
246
|
+
- lib/avm/applications/base/naming.rb
|
247
|
+
- lib/avm/applications/base/organization.rb
|
244
248
|
- lib/avm/applications/base/publishing.rb
|
245
249
|
- lib/avm/applications/base/stereotype.rb
|
246
250
|
- lib/avm/data/callbacks.rb
|
@@ -346,6 +350,7 @@ files:
|
|
346
350
|
- lib/avm/registry/application_stereotypes/build_available.rb
|
347
351
|
- lib/avm/registry/application_stereotypes/stereotype_builder.rb
|
348
352
|
- lib/avm/registry/applications.rb
|
353
|
+
- lib/avm/registry/config_objects.rb
|
349
354
|
- lib/avm/registry/file_formats.rb
|
350
355
|
- lib/avm/registry/from_gems.rb
|
351
356
|
- lib/avm/registry/instances.rb
|