eac_tools 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -17
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +2 -2
- data/sub/avm/lib/avm/instances/base/auto_values/install.rb +48 -0
- data/sub/avm/lib/avm/instances/base/auto_values.rb +1 -1
- data/sub/avm/lib/avm/instances/base.rb +4 -4
- data/sub/avm/lib/avm/instances/entry_keys.rb +7 -6
- data/sub/avm/lib/avm/instances.rb +3 -2
- data/sub/avm/lib/avm/scms/base.rb +2 -2
- data/sub/avm/lib/avm/source_generators/base.rb +2 -2
- data/sub/avm/lib/avm/sources/base.rb +4 -4
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/lib/avm/with/application_stereotype.rb +35 -0
- data/sub/avm/lib/avm/with/extra_subcommands.rb +44 -0
- data/sub/avm/spec/lib/avm/instances/base_spec.rb +3 -3
- data/sub/avm/spec/lib/avm/instances/base_spec_configs_storage.yml +1 -1
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +3 -3
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/spec/{ruby_style_spec.rb → code/rubocop_spec.rb} +0 -0
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +3 -2
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb +1 -1
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/eac_config/eac_config.gemspec +1 -1
- data/sub/eac_config/lib/eac_config/entry_path.rb +15 -4
- data/sub/eac_config/lib/eac_config/version.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +5 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- metadata +16 -16
- data/sub/avm/lib/avm/instances/base/auto_values/access.rb +0 -40
- data/sub/avm/lib/avm/with_application_stereotype.rb +0 -33
- data/sub/avm/lib/avm/with_dynamic_runners.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bf2ba914845ef4487ca80e47097879d283ece113e6cbe0863a9f54920b605d7
|
4
|
+
data.tar.gz: b9c45a9db9dba67f8c742bf689a1b267480c40b8312ec066dfe25aabf8f66ec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de155498ec4b29e4391433f4fe3fb5a9509f15f92d5b4106b1e402026e7349d3887bb4b75bedf96bcb22281ba606149bd17be4ba67dad2d3bb4c741dc4f2a237
|
7
|
+
data.tar.gz: 0e738279dd36f46a1bc247d71fb2165ad0b5537e7050874a3705ee3b85c0b353e490535b3e74c7d6960ac17df6c0a8ab9c5f5ad371a7de7a524ad266faae4e6c
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
4
|
+
eac_tools (0.13.0)
|
5
5
|
avm-eac_generic_base0 (~> 0.4)
|
6
|
-
avm-eac_rails_base0 (~> 0.6)
|
7
|
-
avm-eac_rails_base1 (~> 0.4, >= 0.4.
|
6
|
+
avm-eac_rails_base0 (~> 0.6, >= 0.6.1)
|
7
|
+
avm-eac_rails_base1 (~> 0.4, >= 0.4.2)
|
8
8
|
avm-eac_redmine_base0 (~> 0.11)
|
9
9
|
avm-eac_redmine_plugin_base0 (~> 0.3)
|
10
10
|
avm-eac_ruby_base1 (~> 0.11)
|
11
11
|
avm-tools (~> 0.127)
|
12
|
-
eac_ruby_utils (~> 0.
|
12
|
+
eac_ruby_utils (~> 0.97)
|
13
13
|
|
14
14
|
PATH
|
15
15
|
remote: sub/avm-eac_generic_base0
|
@@ -21,17 +21,18 @@ PATH
|
|
21
21
|
PATH
|
22
22
|
remote: sub/avm-eac_rails_base0
|
23
23
|
specs:
|
24
|
-
avm-eac_rails_base0 (0.6.
|
25
|
-
avm-eac_rails_base1 (~> 0.
|
26
|
-
eac_ruby_utils (~> 0.
|
24
|
+
avm-eac_rails_base0 (0.6.1)
|
25
|
+
avm-eac_rails_base1 (~> 0.4, >= 0.4.2)
|
26
|
+
eac_ruby_utils (~> 0.97)
|
27
27
|
|
28
28
|
PATH
|
29
29
|
remote: sub/avm-eac_rails_base1
|
30
30
|
specs:
|
31
|
-
avm-eac_rails_base1 (0.4.
|
32
|
-
avm
|
31
|
+
avm-eac_rails_base1 (0.4.2)
|
32
|
+
avm (~> 0.31)
|
33
|
+
avm-eac_ruby_base1 (~> 0.11)
|
33
34
|
avm-eac_webapp_base0 (~> 0.3)
|
34
|
-
eac_ruby_utils (~> 0.
|
35
|
+
eac_ruby_utils (~> 0.97)
|
35
36
|
|
36
37
|
PATH
|
37
38
|
remote: sub/avm-eac_redmine_base0
|
@@ -81,12 +82,12 @@ PATH
|
|
81
82
|
PATH
|
82
83
|
remote: sub/avm
|
83
84
|
specs:
|
84
|
-
avm (0.
|
85
|
+
avm (0.31.0)
|
85
86
|
eac_cli (~> 0.27, >= 0.27.6)
|
86
|
-
eac_config (~> 0.
|
87
|
+
eac_config (~> 0.10)
|
87
88
|
eac_docker (~> 0.3)
|
88
89
|
eac_git (~> 0.6)
|
89
|
-
eac_ruby_utils (~> 0.
|
90
|
+
eac_ruby_utils (~> 0.97)
|
90
91
|
eac_templates (~> 0.1, >= 0.1.1)
|
91
92
|
filesize (~> 0.2)
|
92
93
|
htmlbeautifier (~> 1.3, >= 1.3.1)
|
@@ -103,9 +104,9 @@ PATH
|
|
103
104
|
PATH
|
104
105
|
remote: sub/eac_config
|
105
106
|
specs:
|
106
|
-
eac_config (0.
|
107
|
+
eac_config (0.10.0)
|
107
108
|
addressable
|
108
|
-
eac_ruby_utils (~> 0.
|
109
|
+
eac_ruby_utils (~> 0.97)
|
109
110
|
|
110
111
|
PATH
|
111
112
|
remote: sub/eac_docker
|
@@ -134,7 +135,7 @@ PATH
|
|
134
135
|
PATH
|
135
136
|
remote: sub/eac_ruby_utils
|
136
137
|
specs:
|
137
|
-
eac_ruby_utils (0.
|
138
|
+
eac_ruby_utils (0.97.0)
|
138
139
|
activesupport (>= 4, < 7)
|
139
140
|
addressable (~> 2.6)
|
140
141
|
bundler
|
@@ -268,7 +269,7 @@ GEM
|
|
268
269
|
rainbow (3.1.1)
|
269
270
|
rchardet (1.8.0)
|
270
271
|
rexml (3.2.5)
|
271
|
-
rouge (3.
|
272
|
+
rouge (3.30.0)
|
272
273
|
rspec (3.11.0)
|
273
274
|
rspec-core (~> 3.11.0)
|
274
275
|
rspec-expectations (~> 3.11.0)
|
data/lib/eac_tools/version.rb
CHANGED
data/sub/avm/avm.gemspec
CHANGED
@@ -13,10 +13,10 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'eac_cli', '~> 0.27', '>= 0.27.6'
|
16
|
-
s.add_dependency 'eac_config', '~> 0.
|
16
|
+
s.add_dependency 'eac_config', '~> 0.10'
|
17
17
|
s.add_dependency 'eac_docker', '~> 0.3'
|
18
18
|
s.add_dependency 'eac_git', '~> 0.6'
|
19
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
19
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.97'
|
20
20
|
s.add_dependency 'eac_templates', '~> 0.1', '>= 0.1.1'
|
21
21
|
s.add_dependency 'filesize', '~> 0.2'
|
22
22
|
s.add_dependency 'htmlbeautifier', '~> 1.3', '>= 1.3.1'
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/instances/entry_keys'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Instances
|
7
|
+
class Base
|
8
|
+
module AutoValues
|
9
|
+
module Install
|
10
|
+
def auto_access
|
11
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present? ? 'ssh' : 'local'
|
12
|
+
end
|
13
|
+
|
14
|
+
def auto_install_hostname
|
15
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
16
|
+
::Avm::Instances::EntryKeys::INSTALL_HOSTNAME)
|
17
|
+
end
|
18
|
+
|
19
|
+
def auto_install_port
|
20
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
21
|
+
::Avm::Instances::EntryKeys::INSTALL_PORT) || 22
|
22
|
+
end
|
23
|
+
|
24
|
+
def auto_install_username
|
25
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
26
|
+
::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
27
|
+
end
|
28
|
+
|
29
|
+
def auto_install_url
|
30
|
+
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
|
31
|
+
::Avm::Instances::EntryKeys::INSTALL_URL) ||
|
32
|
+
auto_install_url_by_parts
|
33
|
+
end
|
34
|
+
|
35
|
+
def auto_install_url_by_parts
|
36
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_HOSTNAME).if_present do |a|
|
37
|
+
a = read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
38
|
+
.if_present(a) { |v| "#{v}@#{a}" }
|
39
|
+
a = read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_PORT)
|
40
|
+
.if_present(a) { |v| "#{a}:#{v}" }
|
41
|
+
"ssh://#{a}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -10,7 +10,7 @@ module Avm
|
|
10
10
|
extend ::ActiveSupport::Concern
|
11
11
|
|
12
12
|
included do
|
13
|
-
%w[
|
13
|
+
%w[Admin Data Database Filesystem Install Mailer Ruby Source System Web]
|
14
14
|
.each do |class_name|
|
15
15
|
include const_get(class_name)
|
16
16
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
4
|
-
require 'avm/
|
3
|
+
require 'avm/with/application_stereotype'
|
4
|
+
require 'avm/with/extra_subcommands'
|
5
5
|
require 'eac_ruby_utils/require_sub'
|
6
6
|
require 'eac_ruby_utils/simple_cache'
|
7
7
|
require 'avm/instances/entries'
|
@@ -14,8 +14,8 @@ module Avm
|
|
14
14
|
enable_simple_cache
|
15
15
|
require_sub __FILE__, include_modules: true
|
16
16
|
include ::Avm::Instances::Entries
|
17
|
-
include ::Avm::
|
18
|
-
include ::Avm::
|
17
|
+
include ::Avm::With::ExtraSubcommands
|
18
|
+
include ::Avm::With::ApplicationStereotype
|
19
19
|
|
20
20
|
lists.add_string :access, :local, :ssh
|
21
21
|
|
@@ -5,6 +5,8 @@ require 'eac_ruby_utils/core_ext'
|
|
5
5
|
module Avm
|
6
6
|
module Instances
|
7
7
|
module EntryKeys
|
8
|
+
URI_FIELDS = %i[fragment hostname password path port query scheme url username].freeze
|
9
|
+
|
8
10
|
class << self
|
9
11
|
def all
|
10
12
|
all_keys.to_a
|
@@ -43,17 +45,16 @@ module Avm
|
|
43
45
|
|
44
46
|
{
|
45
47
|
'' => %w[data_fs_path fs_path host_id name source_instance_id],
|
46
|
-
admin: %w[
|
47
|
-
database: %w[id
|
48
|
+
admin: URI_FIELDS + %w[api_key],
|
49
|
+
database: URI_FIELDS + %w[id limit name system timeout extra],
|
48
50
|
docker: %w[registry],
|
49
51
|
fs: %w[url],
|
52
|
+
install: URI_FIELDS,
|
50
53
|
mailer: {
|
51
54
|
'' => %w[id from reply_to],
|
52
|
-
smtp: %w[address
|
53
|
-
starttls_auto tls]
|
55
|
+
smtp: URI_FIELDS + %w[address domain authentication openssl_verify_mode starttls_auto tls]
|
54
56
|
},
|
55
|
-
|
56
|
-
web: %w[authority hostname path port scheme url userinfo]
|
57
|
+
web: URI_FIELDS + %w[authority userinfo]
|
57
58
|
}.each { |prefix, suffixes| keys_consts_set(prefix, suffixes) }
|
58
59
|
end
|
59
60
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/with/application_stereotype'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
6
|
module Avm
|
@@ -8,7 +8,7 @@ module Avm
|
|
8
8
|
class Base
|
9
9
|
enable_abstract_methods
|
10
10
|
enable_simple_cache
|
11
|
-
include ::Avm::
|
11
|
+
include ::Avm::With::ApplicationStereotype
|
12
12
|
abstract_methods :update, :valid?
|
13
13
|
common_constructor :path do
|
14
14
|
self.path = path.to_pathname
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/with/application_stereotype'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
module SourceGenerators
|
8
8
|
class Base
|
9
|
-
include ::Avm::
|
9
|
+
include ::Avm::With::ApplicationStereotype
|
10
10
|
common_constructor :target_path do
|
11
11
|
self.target_path = target_path.to_pathname
|
12
12
|
end
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'avm/registry'
|
4
4
|
require 'avm/scms/null'
|
5
|
-
require 'avm/
|
6
|
-
require 'avm/
|
5
|
+
require 'avm/with/application_stereotype'
|
6
|
+
require 'avm/with/extra_subcommands'
|
7
7
|
require 'eac_git'
|
8
8
|
require 'eac_ruby_utils/core_ext'
|
9
9
|
|
@@ -11,8 +11,8 @@ module Avm
|
|
11
11
|
module Sources
|
12
12
|
class Base
|
13
13
|
require_sub __FILE__, include_modules: true
|
14
|
-
include ::Avm::
|
15
|
-
include ::Avm::
|
14
|
+
include ::Avm::With::ApplicationStereotype
|
15
|
+
include ::Avm::With::ExtraSubcommands
|
16
16
|
compare_by :path
|
17
17
|
enable_abstract_methods
|
18
18
|
enable_simple_cache
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module With
|
7
|
+
module ApplicationStereotype
|
8
|
+
common_concern do
|
9
|
+
include ClassMethods
|
10
|
+
end
|
11
|
+
|
12
|
+
module ClassMethods
|
13
|
+
# @return [Avm::ApplicationStereotype::Base]
|
14
|
+
def application_stereotype
|
15
|
+
@application_stereotype ||=
|
16
|
+
::Avm::Registry.application_stereotypes.detect(application_stereotype_name)
|
17
|
+
end
|
18
|
+
|
19
|
+
# @return [String]
|
20
|
+
def application_stereotype_name
|
21
|
+
stereotype_namespace_module.name.demodulize
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return [Module]
|
25
|
+
def stereotype_namespace_module
|
26
|
+
module_parent.module_parent
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def stereotype_namespace_module
|
31
|
+
self.class.stereotype_namespace_module
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/runner_with/subcommands'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module With
|
8
|
+
module ExtraSubcommands
|
9
|
+
# @return [Hash<String, EacCli::Runner>]
|
10
|
+
def extra_available_subcommands
|
11
|
+
extra_available_subcommands_from_runners_module
|
12
|
+
end
|
13
|
+
|
14
|
+
# @return [Hash<String, EacCli::Runner>]
|
15
|
+
def extra_available_subcommands_from_runners_module
|
16
|
+
self.class.ancestors.reverse.inject({}) do |a, e|
|
17
|
+
a.merge(RunnersFromModule.new(e).result)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class RunnersFromModule
|
22
|
+
enable_simple_cache
|
23
|
+
common_constructor :the_module
|
24
|
+
|
25
|
+
# @return [Hash<String, EacCli::Runner>]
|
26
|
+
def result
|
27
|
+
return {} if runners_module.blank?
|
28
|
+
|
29
|
+
::EacCli::RunnerWith::Subcommands.subcommands_from_module(runners_module)
|
30
|
+
end
|
31
|
+
|
32
|
+
def runners_module_uncached
|
33
|
+
return nil if the_module.module_parent.blank?
|
34
|
+
|
35
|
+
begin
|
36
|
+
the_module.module_parent.const_get('Runners')
|
37
|
+
rescue ::NameError
|
38
|
+
nil
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -23,9 +23,9 @@ RSpec.describe ::Avm::Instances::Base do
|
|
23
23
|
::Avm::Instances::EntryKeys::DATABASE_PASSWORD => 'pass1',
|
24
24
|
::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => 'database.net',
|
25
25
|
::Avm::Instances::EntryKeys::DATABASE_PORT => 5432,
|
26
|
-
::Avm::Instances::EntryKeys::
|
27
|
-
::Avm::Instances::EntryKeys::
|
28
|
-
::Avm::Instances::EntryKeys::
|
26
|
+
::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'myhost.com',
|
27
|
+
::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'myuser',
|
28
|
+
::Avm::Instances::EntryKeys::INSTALL_URL => 'ssh://otheruser@otherhost.com'
|
29
29
|
},
|
30
30
|
'app_2' => {
|
31
31
|
::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => '127.0.0.1',
|
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm-eac_rails_base1', '~> 0.
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
15
|
+
s.add_dependency 'avm-eac_rails_base1', '~> 0.4', '>= 0.4.2'
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.97'
|
17
17
|
|
18
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.
|
18
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
19
19
|
end
|
File without changes
|
@@ -12,9 +12,10 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm
|
15
|
+
s.add_dependency 'avm', '~> 0.31'
|
16
|
+
s.add_dependency 'avm-eac_ruby_base1', '~> 0.11'
|
16
17
|
s.add_dependency 'avm-eac_webapp_base0', '~> 0.3'
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
18
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.97'
|
18
19
|
|
19
20
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
20
21
|
end
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'addressable'
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.97'
|
17
17
|
|
18
18
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
19
19
|
end
|
@@ -28,17 +28,28 @@ module EacConfig
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
def initialize(parts)
|
34
|
-
@parts = parts.to_a.freeze
|
31
|
+
common_constructor :parts, default: [[]] do
|
32
|
+
self.parts = ::Array.new(parts).freeze
|
35
33
|
end
|
36
34
|
|
35
|
+
compare_by :parts
|
36
|
+
delegate :any?, :count, :each, :each_value, :each_with_index, :empty?, :fetch, :first, :index,
|
37
|
+
:inject, :last, :map, :size, to: :parts
|
38
|
+
|
37
39
|
# @return [EacConfig::EntryPath]
|
38
40
|
def +(other)
|
39
41
|
self.class.new(parts + self.class.assert(other).parts)
|
40
42
|
end
|
41
43
|
|
44
|
+
def [](*args)
|
45
|
+
slice(*args)
|
46
|
+
end
|
47
|
+
|
48
|
+
def slice(*args)
|
49
|
+
r = parts.slice(*args)
|
50
|
+
r.is_a?(::Enumerable) ? self.class.new(r) : r
|
51
|
+
end
|
52
|
+
|
42
53
|
def to_s
|
43
54
|
"#{self.class}[#{parts.join(PART_SEPARATOR)}]"
|
44
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-eac_generic_base0
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.6'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.6.1
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '0.6'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.6.1
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: avm-eac_rails_base1
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -47,7 +53,7 @@ dependencies:
|
|
47
53
|
version: '0.4'
|
48
54
|
- - ">="
|
49
55
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.4.
|
56
|
+
version: 0.4.2
|
51
57
|
type: :runtime
|
52
58
|
prerelease: false
|
53
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +63,7 @@ dependencies:
|
|
57
63
|
version: '0.4'
|
58
64
|
- - ">="
|
59
65
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0.4.
|
66
|
+
version: 0.4.2
|
61
67
|
- !ruby/object:Gem::Dependency
|
62
68
|
name: avm-eac_redmine_base0
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,20 +126,14 @@ dependencies:
|
|
120
126
|
requirements:
|
121
127
|
- - "~>"
|
122
128
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0.
|
124
|
-
- - ">="
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: 0.96.1
|
129
|
+
version: '0.97'
|
127
130
|
type: :runtime
|
128
131
|
prerelease: false
|
129
132
|
version_requirements: !ruby/object:Gem::Requirement
|
130
133
|
requirements:
|
131
134
|
- - "~>"
|
132
135
|
- !ruby/object:Gem::Version
|
133
|
-
version: '0.
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: 0.96.1
|
136
|
+
version: '0.97'
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: eac_ruby_gem_support
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -218,7 +218,7 @@ files:
|
|
218
218
|
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
|
219
219
|
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability_mapping.rb
|
220
220
|
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/public/favicon.ico
|
221
|
-
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/spec/
|
221
|
+
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/spec/code/rubocop_spec.rb
|
222
222
|
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/spec/spec_helper.rb
|
223
223
|
- sub/avm-eac_rails_base1/Gemfile
|
224
224
|
- sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec
|
@@ -1026,11 +1026,11 @@ files:
|
|
1026
1026
|
- sub/avm/lib/avm/instances.rb
|
1027
1027
|
- sub/avm/lib/avm/instances/base.rb
|
1028
1028
|
- sub/avm/lib/avm/instances/base/auto_values.rb
|
1029
|
-
- sub/avm/lib/avm/instances/base/auto_values/access.rb
|
1030
1029
|
- sub/avm/lib/avm/instances/base/auto_values/admin.rb
|
1031
1030
|
- sub/avm/lib/avm/instances/base/auto_values/data.rb
|
1032
1031
|
- sub/avm/lib/avm/instances/base/auto_values/database.rb
|
1033
1032
|
- sub/avm/lib/avm/instances/base/auto_values/filesystem.rb
|
1033
|
+
- sub/avm/lib/avm/instances/base/auto_values/install.rb
|
1034
1034
|
- sub/avm/lib/avm/instances/base/auto_values/mailer.rb
|
1035
1035
|
- sub/avm/lib/avm/instances/base/auto_values/ruby.rb
|
1036
1036
|
- sub/avm/lib/avm/instances/base/auto_values/source.rb
|
@@ -1097,8 +1097,8 @@ files:
|
|
1097
1097
|
- sub/avm/lib/avm/sync.rb
|
1098
1098
|
- sub/avm/lib/avm/version.rb
|
1099
1099
|
- sub/avm/lib/avm/version_number.rb
|
1100
|
-
- sub/avm/lib/avm/
|
1101
|
-
- sub/avm/lib/avm/
|
1100
|
+
- sub/avm/lib/avm/with/application_stereotype.rb
|
1101
|
+
- sub/avm/lib/avm/with/extra_subcommands.rb
|
1102
1102
|
- sub/avm/spec/lib/avm/applications/base_spec.rb
|
1103
1103
|
- sub/avm/spec/lib/avm/applications/base_spec_fixture.yml
|
1104
1104
|
- sub/avm/spec/lib/avm/instances/base_spec.rb
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Instances
|
5
|
-
class Base
|
6
|
-
module AutoValues
|
7
|
-
module Access
|
8
|
-
def auto_access
|
9
|
-
read_entry_optional('ssh.url').present? ? 'ssh' : 'local'
|
10
|
-
end
|
11
|
-
|
12
|
-
def auto_ssh_hostname
|
13
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'ssh.hostname')
|
14
|
-
end
|
15
|
-
|
16
|
-
def auto_ssh_port
|
17
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'ssh.port') || 22
|
18
|
-
end
|
19
|
-
|
20
|
-
def auto_ssh_username
|
21
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'ssh.username')
|
22
|
-
end
|
23
|
-
|
24
|
-
def auto_ssh_url
|
25
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'ssh.url') ||
|
26
|
-
auto_ssh_url_by_parts
|
27
|
-
end
|
28
|
-
|
29
|
-
def auto_ssh_url_by_parts
|
30
|
-
read_entry_optional('ssh.hostname').if_present do |a|
|
31
|
-
a = read_entry_optional('ssh.username').if_present(a) { |v| "#{v}@#{a}" }
|
32
|
-
a = read_entry_optional('ssh.port').if_present(a) { |v| "#{a}:#{v}" }
|
33
|
-
"ssh://#{a}"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module WithApplicationStereotype
|
7
|
-
common_concern do
|
8
|
-
include ClassMethods
|
9
|
-
end
|
10
|
-
|
11
|
-
module ClassMethods
|
12
|
-
# @return [Avm::ApplicationStereotype::Base]
|
13
|
-
def application_stereotype
|
14
|
-
@application_stereotype ||=
|
15
|
-
::Avm::Registry.application_stereotypes.detect(application_stereotype_name)
|
16
|
-
end
|
17
|
-
|
18
|
-
# @return [String]
|
19
|
-
def application_stereotype_name
|
20
|
-
stereotype_namespace_module.name.demodulize
|
21
|
-
end
|
22
|
-
|
23
|
-
# @return [Module]
|
24
|
-
def stereotype_namespace_module
|
25
|
-
module_parent.module_parent
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def stereotype_namespace_module
|
30
|
-
self.class.stereotype_namespace_module
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_cli/runner_with/subcommands'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module WithDynamicRunners
|
8
|
-
# @return [Hash<String, EacCli::Runner>]
|
9
|
-
def extra_available_subcommands
|
10
|
-
extra_available_subcommands_from_runners_module
|
11
|
-
end
|
12
|
-
|
13
|
-
# @return [Hash<String, EacCli::Runner>]
|
14
|
-
def extra_available_subcommands_from_runners_module
|
15
|
-
self.class.ancestors.reverse.inject({}) do |a, e|
|
16
|
-
a.merge(RunnersFromModule.new(e).result)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class RunnersFromModule
|
21
|
-
enable_simple_cache
|
22
|
-
common_constructor :the_module
|
23
|
-
|
24
|
-
# @return [Hash<String, EacCli::Runner>]
|
25
|
-
def result
|
26
|
-
return {} if runners_module.blank?
|
27
|
-
|
28
|
-
::EacCli::RunnerWith::Subcommands.subcommands_from_module(runners_module)
|
29
|
-
end
|
30
|
-
|
31
|
-
def runners_module_uncached
|
32
|
-
return nil if the_module.module_parent.blank?
|
33
|
-
|
34
|
-
begin
|
35
|
-
the_module.module_parent.const_get('Runners')
|
36
|
-
rescue ::NameError
|
37
|
-
nil
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|