avm 0.11.0 → 0.14.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/instances/application.rb +4 -0
- data/lib/avm/instances/base/auto_values/data.rb +2 -2
- data/lib/avm/instances/base/auto_values/filesystem.rb +6 -8
- data/lib/avm/instances/entry.rb +10 -4
- data/lib/avm/instances/entry_keys.rb +1 -1
- data/lib/avm/self/instance.rb +8 -0
- data/lib/avm/sources/base.rb +1 -1
- 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: 84721ab93d07c32f2b8c587c364a3cf3a3881b12c7984bf8011737eae8e47334
|
4
|
+
data.tar.gz: d54152761bbc8cd0ab059e96e3e8a4a8d102c9276b29362a92cc915a0cad3a94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e152406d787229dd1a56ff977fbcb4d50dac8667fb67360e323fc758420dbbd81efd37f5049dd1bbf8961aae93e6fa34ea865831dcdcbdd69f1e8d6a6e486749
|
7
|
+
data.tar.gz: a3b25728a082f27ca49e85fb191e8334be93cc8919df3175cdbd7264066d598ddb2cc9dc0a016d52ac450ba6a3afb6c5890ab12972be7e54dc13a1dff8d192f0
|
@@ -9,8 +9,8 @@ module Avm
|
|
9
9
|
module AutoValues
|
10
10
|
module Data
|
11
11
|
def auto_data_default_dump_path
|
12
|
-
::Avm::Self
|
13
|
-
.
|
12
|
+
::Avm::Self::Instance
|
13
|
+
.default
|
14
14
|
.read_entry_optional(::Avm::Self::Instance::EntryKeys::DATA_DEFAULT_PATH)
|
15
15
|
.if_present do |v|
|
16
16
|
::File.join(
|
@@ -1,22 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/instances/entry_keys'
|
4
|
+
|
3
5
|
module Avm
|
4
6
|
module Instances
|
5
7
|
class Base
|
6
8
|
module AutoValues
|
7
9
|
module Filesystem
|
8
|
-
FS_PATH_KEY = :fs_path
|
9
|
-
|
10
10
|
def auto_fs_path
|
11
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
12
|
-
|
13
|
-
end
|
11
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
12
|
+
::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id }
|
14
13
|
end
|
15
14
|
|
16
15
|
def auto_data_fs_path
|
17
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
18
|
-
|
19
|
-
end
|
16
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
17
|
+
::Avm::Instances::EntryKeys::DATA_FS_PATH) { |v| v + '/' + id }
|
20
18
|
end
|
21
19
|
|
22
20
|
def auto_fs_url
|
data/lib/avm/instances/entry.rb
CHANGED
@@ -27,11 +27,11 @@ module Avm
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def optional_value
|
30
|
-
|
30
|
+
context_entry.found? ? context_entry.value : auto_value
|
31
31
|
end
|
32
32
|
|
33
|
-
def read
|
34
|
-
|
33
|
+
def read
|
34
|
+
context_entry.value
|
35
35
|
end
|
36
36
|
|
37
37
|
def suffix_as_array
|
@@ -47,7 +47,13 @@ module Avm
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def write(value)
|
50
|
-
|
50
|
+
context_entry.value = value
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def context_entry
|
56
|
+
::EacConfig::Node.context.current.entry(full_path)
|
51
57
|
end
|
52
58
|
end
|
53
59
|
end
|
@@ -42,7 +42,7 @@ module Avm
|
|
42
42
|
end
|
43
43
|
|
44
44
|
{
|
45
|
-
'' => %w[fs_path host_id source_instance_id],
|
45
|
+
'' => %w[data_fs_path fs_path host_id name source_instance_id],
|
46
46
|
database: %w[id hostname limit name password port system timeout username extra],
|
47
47
|
docker: %w[registry],
|
48
48
|
mailer: {
|
data/lib/avm/self/instance.rb
CHANGED
@@ -8,6 +8,14 @@ require 'avm/eac_ubuntu_base0/docker_image'
|
|
8
8
|
module Avm
|
9
9
|
module Self
|
10
10
|
class Instance < ::Avm::Instances::Base
|
11
|
+
DEFAULT_INSTANCE_ID = 'avm_self'
|
12
|
+
|
13
|
+
class << self
|
14
|
+
def default
|
15
|
+
@default ||= by_id(DEFAULT_INSTANCE_ID)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
11
19
|
def docker_image_class
|
12
20
|
::Avm::Self::DockerImage
|
13
21
|
end
|
data/lib/avm/sources/base.rb
CHANGED
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.14.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: 2021-12-
|
11
|
+
date: 2021-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|