avm 0.79.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 +0 -39
- data/lib/avm/instances/base/auto_values/database.rb +1 -0
- data/lib/avm/version.rb +1 -1
- metadata +20 -10
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
|
@@ -13,7 +11,6 @@ module Avm
|
|
13
11
|
include ::Avm::Entries::Base
|
14
12
|
|
15
13
|
AVM_TYPE = 'Application'
|
16
|
-
LOCAL_INSTANCE_SUFFIX = 'dev'
|
17
14
|
|
18
15
|
common_constructor :id do
|
19
16
|
self.id = id.to_s
|
@@ -26,42 +23,6 @@ module Avm
|
|
26
23
|
def instance(suffix)
|
27
24
|
stereotype.instance_class.new(self, suffix)
|
28
25
|
end
|
29
|
-
|
30
|
-
def name
|
31
|
-
entry(::Avm::Instances::EntryKeys::NAME).read
|
32
|
-
end
|
33
|
-
|
34
|
-
# @return [String]
|
35
|
-
def local_instance_id
|
36
|
-
::Avm::Instances::Ids.build(id, local_instance_suffix)
|
37
|
-
end
|
38
|
-
|
39
|
-
# @return [Pathname]
|
40
|
-
def local_source_path
|
41
|
-
local_source_path_entry.value!.to_pathname
|
42
|
-
end
|
43
|
-
|
44
|
-
# @return [EacConfig::Entry]
|
45
|
-
def local_source_path_entry
|
46
|
-
::EacConfig::Node.context.current.entry([local_instance_id, 'install', 'path'])
|
47
|
-
end
|
48
|
-
|
49
|
-
# @return [String]
|
50
|
-
def local_instance_suffix
|
51
|
-
LOCAL_INSTANCE_SUFFIX
|
52
|
-
end
|
53
|
-
|
54
|
-
private
|
55
|
-
|
56
|
-
# @return [Avm::Instances::Base]
|
57
|
-
def local_instance_uncached
|
58
|
-
instance(local_instance_suffix)
|
59
|
-
end
|
60
|
-
|
61
|
-
# @return [Avm::Sources::Base]
|
62
|
-
def local_source_uncached
|
63
|
-
::Avm::Registry.sources.detect(local_source_path)
|
64
|
-
end
|
65
26
|
end
|
66
27
|
end
|
67
28
|
end
|
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
|
@@ -30,20 +30,14 @@ dependencies:
|
|
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
|
@@ -51,6 +45,9 @@ dependencies:
|
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
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
|
@@ -58,6 +55,9 @@ dependencies:
|
|
58
55
|
- - "~>"
|
59
56
|
- !ruby/object:Gem::Version
|
60
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
|
@@ -113,6 +113,9 @@ dependencies:
|
|
113
113
|
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0.119'
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 0.119.2
|
116
119
|
type: :runtime
|
117
120
|
prerelease: false
|
118
121
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -120,6 +123,9 @@ dependencies:
|
|
120
123
|
- - "~>"
|
121
124
|
- !ruby/object:Gem::Version
|
122
125
|
version: '0.119'
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 0.119.2
|
123
129
|
- !ruby/object:Gem::Dependency
|
124
130
|
name: eac_templates
|
125
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -235,6 +241,10 @@ files:
|
|
235
241
|
- lib/avm/application_stereotypes/base.rb
|
236
242
|
- lib/avm/applications.rb
|
237
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
|
238
248
|
- lib/avm/applications/base/publishing.rb
|
239
249
|
- lib/avm/applications/base/stereotype.rb
|
240
250
|
- lib/avm/data/callbacks.rb
|