avm 0.31.0 → 0.32.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/instances/base/auto_values/admin.rb +2 -2
- data/lib/avm/instances/base/auto_values/database.rb +1 -1
- data/lib/avm/instances/base/auto_values/filesystem.rb +9 -8
- data/lib/avm/instances/base/auto_values/install.rb +4 -4
- data/lib/avm/instances/base/auto_values/mailer.rb +2 -2
- data/lib/avm/instances/base/auto_values/ruby.rb +1 -1
- data/lib/avm/instances/base/auto_values/system.rb +3 -3
- data/lib/avm/instances/base/auto_values.rb +3 -4
- data/lib/avm/instances/base.rb +4 -4
- data/lib/avm/instances/entry_keys.rb +2 -2
- 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: fc4f095582fb4fb51a80f667437b95281791bf218ba89e43ff402e337baaeb3a
|
4
|
+
data.tar.gz: 3b4a59e42bf16ab8ace7031604f43f7e9efb876836c4b3bc33342b1862ba7fa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab5e8effc7ce4575c18922fa0c777b2e61bd97cf20cfdb40981a81b166970e00b7fdd3d49b16b3155715743b59b063585e5d8bbc4b7c6edab7c2927597dc36e7
|
7
|
+
data.tar.gz: 7cfaaaf7877b87c4a5de68d4c84ae70c1424f6287635b97b26468f97350d9000e858c1559758eabb8004b98765574cf63d928d8c6f3f609129c68bf5f4a19a98
|
@@ -6,11 +6,11 @@ module Avm
|
|
6
6
|
module AutoValues
|
7
7
|
module Admin
|
8
8
|
def auto_admin_email
|
9
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
9
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'admin.email')
|
10
10
|
end
|
11
11
|
|
12
12
|
def auto_admin_name
|
13
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
13
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'admin.name')
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -61,7 +61,7 @@ module Avm
|
|
61
61
|
def database_auto_common(suffix)
|
62
62
|
database_key = ::Avm::Instances::EntryKeys.const_get("database_#{suffix}".upcase)
|
63
63
|
inherited_entry_value(::Avm::Instances::EntryKeys::DATABASE_ID, database_key) ||
|
64
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
64
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, database_key)
|
65
65
|
end
|
66
66
|
|
67
67
|
def database_port_by_system
|
@@ -8,29 +8,30 @@ module Avm
|
|
8
8
|
module AutoValues
|
9
9
|
module Filesystem
|
10
10
|
def auto_fs_path
|
11
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
11
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
12
12
|
::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id }
|
13
13
|
end
|
14
14
|
|
15
15
|
def auto_data_fs_path
|
16
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
16
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
17
17
|
::Avm::Instances::EntryKeys::DATA_FS_PATH) { |v| v + '/' + id }
|
18
18
|
end
|
19
19
|
|
20
20
|
def auto_fs_url
|
21
|
-
|
21
|
+
auto_fs_url_with_install || auto_fs_url_without_install
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
25
|
-
read_entry_optional(
|
24
|
+
def auto_fs_url_with_install
|
25
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL)
|
26
|
+
.if_present do |install_url|
|
26
27
|
read_entry_optional('fs_path').if_present do |fs_path|
|
27
|
-
"#{
|
28
|
+
"#{install_url}#{fs_path}"
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
32
|
-
def
|
33
|
-
return nil if read_entry_optional(
|
33
|
+
def auto_fs_url_without_install
|
34
|
+
return nil if read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present?
|
34
35
|
|
35
36
|
read_entry_optional('fs_path').if_present do |fs_path|
|
36
37
|
"file://#{fs_path}"
|
@@ -12,22 +12,22 @@ module Avm
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def auto_install_hostname
|
15
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
15
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
16
16
|
::Avm::Instances::EntryKeys::INSTALL_HOSTNAME)
|
17
17
|
end
|
18
18
|
|
19
19
|
def auto_install_port
|
20
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
20
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
21
21
|
::Avm::Instances::EntryKeys::INSTALL_PORT) || 22
|
22
22
|
end
|
23
23
|
|
24
24
|
def auto_install_username
|
25
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
25
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
26
26
|
::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
27
27
|
end
|
28
28
|
|
29
29
|
def auto_install_url
|
30
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
30
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
31
31
|
::Avm::Instances::EntryKeys::INSTALL_URL) ||
|
32
32
|
auto_install_url_by_parts
|
33
33
|
end
|
@@ -17,9 +17,9 @@ module Avm
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def auto_mailer_id
|
20
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
20
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
21
21
|
::Avm::Instances::EntryKeys::MAILER_ID) ||
|
22
|
-
read_entry_optional(::Avm::Instances::EntryKeys::
|
22
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_ID)
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
@@ -8,12 +8,12 @@ module Avm
|
|
8
8
|
module AutoValues
|
9
9
|
module System
|
10
10
|
def auto_system_username
|
11
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
12
|
-
read_entry_optional(
|
11
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'system.username') ||
|
12
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
13
13
|
end
|
14
14
|
|
15
15
|
def auto_system_groupname
|
16
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::
|
16
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'system.groupname') ||
|
17
17
|
read_entry_optional('system.username')
|
18
18
|
end
|
19
19
|
end
|
@@ -1,15 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils/
|
4
|
-
::EacRubyUtils.require_sub(__FILE__)
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
5
4
|
|
6
5
|
module Avm
|
7
6
|
module Instances
|
8
7
|
class Base
|
9
8
|
module AutoValues
|
10
|
-
|
9
|
+
require_sub __FILE__
|
11
10
|
|
12
|
-
|
11
|
+
common_concern do
|
13
12
|
%w[Admin Data Database Filesystem Install Mailer Ruby Source System Web]
|
14
13
|
.each do |class_name|
|
15
14
|
include const_get(class_name)
|
data/lib/avm/instances/base.rb
CHANGED
@@ -51,11 +51,11 @@ module Avm
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def host_env_uncached
|
54
|
-
|
55
|
-
case
|
54
|
+
install_uri = entry(::Avm::Instances::EntryKeys::INSTALL_URL).value.to_uri
|
55
|
+
case install_uri.scheme
|
56
56
|
when 'local' then ::EacRubyUtils::Envs.local
|
57
|
-
when 'ssh' then ::EacRubyUtils::Envs.ssh(
|
58
|
-
else raise("Unmapped access value: \"#{
|
57
|
+
when 'ssh' then ::EacRubyUtils::Envs.ssh(install_uri)
|
58
|
+
else raise("Unmapped access value: \"#{install_uri}\"")
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
@@ -44,12 +44,12 @@ module Avm
|
|
44
44
|
end
|
45
45
|
|
46
46
|
{
|
47
|
-
'' => %w[data_fs_path fs_path
|
47
|
+
'' => %w[data_fs_path fs_path name source_instance_id],
|
48
48
|
admin: URI_FIELDS + %w[api_key],
|
49
49
|
database: URI_FIELDS + %w[id limit name system timeout extra],
|
50
50
|
docker: %w[registry],
|
51
51
|
fs: %w[url],
|
52
|
-
install: URI_FIELDS,
|
52
|
+
install: URI_FIELDS + %w[id],
|
53
53
|
mailer: {
|
54
54
|
'' => %w[id from reply_to],
|
55
55
|
smtp: URI_FIELDS + %w[address domain authentication openssl_verify_mode starttls_auto tls]
|
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.32.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-08-
|
11
|
+
date: 2022-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|