eac_tools 0.25.0 → 0.27.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 +57 -56
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +2 -2
- data/sub/avm/lib/avm/applications/base.rb +1 -1
- data/sub/avm/lib/avm/data/instance/files_unit.rb +2 -1
- data/sub/avm/lib/avm/entries/auto_values/uri_entry.rb +1 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/default_value.rb +27 -0
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb +38 -0
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/url_entry_value.rb +31 -0
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value.rb +3 -30
- data/sub/avm/lib/avm/instances/base/auto_values/filesystem.rb +0 -25
- data/sub/avm/lib/avm/instances/base/auto_values/install.rb +13 -17
- data/sub/avm/lib/avm/instances/entry_keys.rb +1 -2
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/spec/lib/avm/instances/base_spec.rb +2 -2
- data/sub/avm/spec/lib/avm/instances/base_spec_configs_storage.yml +1 -1
- data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +2 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/apache_host.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/deploy.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/apache_host.rb +1 -1
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/deploy.rb +1 -1
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +1 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec.rb +1 -1
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb +1 -1
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/apache_path/extra_content.conf +1 -1
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +4 -4
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/apache_host.rb +1 -1
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +3 -2
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb +1 -1
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh +1 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -3
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +37 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/{deploy → instances/deploy}/config/install.sh.template +0 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/{deploy → instances/deploy}/config/secrets.yml +0 -0
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/update_dependencies_requirements.rb +7 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/file_unit.rb +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/git_info.rb +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/write_on_target.rb +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/deploy.rb +2 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/apache_host.rb +1 -1
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
- data/sub/avm-eac_wordpress_base0/spec/lib/avm/eac_wordpress_base0/instances/apache_host_spec.rb +1 -1
- data/sub/avm-tools/avm-tools.gemspec +3 -3
- data/sub/avm-tools/lib/avm/tools/runner/git/deploy.rb +2 -2
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/eac_config/eac_config.gemspec +1 -1
- data/sub/eac_config/lib/eac_config/entry.rb +4 -0
- data/sub/eac_config/lib/eac_config/envvars_node.rb +4 -0
- data/sub/eac_config/lib/eac_config/node_entry.rb +5 -0
- data/sub/eac_config/lib/eac_config/version.rb +1 -1
- data/sub/eac_config/lib/eac_config/yaml_file_node.rb +4 -0
- data/sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb +11 -0
- data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +2 -2
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +53 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects/replace_instance_method.rb +36 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects.rb +52 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/{ruby_spec.rb → ruby/on_clean_environment_spec.rb} +11 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby/on_replace_objects_spec.rb +67 -0
- metadata +34 -52
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/deploy.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea35ded68776ddeadf8e107f9cdcd0b507f5c9faff2c7569a93b03e0bfbf3493
|
4
|
+
data.tar.gz: 46664e26b961edb4e19b2c30aec1c9736b7782138332730729f13fec602eea97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8031e90bca20fed7ec24c53e6d03e86cf876085ec85c1f080a871329590c4b95836ca02c8f162f701734b0aeb38e338a8f0d175e01109db3b9d4ac48b6a367e
|
7
|
+
data.tar.gz: 991180687e138de7d5f4d9397ebf39d0f9768c661025a1d39d5cbea9bcdd0db56a8298352b2b7d68f4f145a5d1c31acbce20c60868656380255302426e14dced
|
data/Gemfile.lock
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm (~> 0.
|
6
|
-
avm-eac_asciidoctor_base0 (~> 0.
|
4
|
+
eac_tools (0.27.0)
|
5
|
+
avm (~> 0.41)
|
6
|
+
avm-eac_asciidoctor_base0 (~> 0.6)
|
7
7
|
avm-eac_generic_base0 (~> 0.5)
|
8
|
-
avm-eac_latex_base0 (~> 0.
|
9
|
-
avm-eac_rails_base0 (~> 0.
|
10
|
-
avm-eac_rails_base1 (~> 0.
|
11
|
-
avm-eac_redmine_base0 (~> 0.
|
8
|
+
avm-eac_latex_base0 (~> 0.2)
|
9
|
+
avm-eac_rails_base0 (~> 0.8)
|
10
|
+
avm-eac_rails_base1 (~> 0.6)
|
11
|
+
avm-eac_redmine_base0 (~> 0.14)
|
12
12
|
avm-eac_redmine_plugin_base0 (~> 0.3)
|
13
|
-
avm-eac_ruby_base1 (~> 0.
|
14
|
-
avm-eac_webapp_base0 (~> 0.
|
15
|
-
avm-eac_wordpress_base0 (~> 0.
|
16
|
-
avm-tools (~> 0.
|
17
|
-
eac_ruby_utils (~> 0.
|
13
|
+
avm-eac_ruby_base1 (~> 0.20)
|
14
|
+
avm-eac_webapp_base0 (~> 0.6)
|
15
|
+
avm-eac_wordpress_base0 (~> 0.2)
|
16
|
+
avm-tools (~> 0.135)
|
17
|
+
eac_ruby_utils (~> 0.102)
|
18
18
|
|
19
19
|
PATH
|
20
20
|
remote: sub/avm-eac_asciidoctor_base0
|
21
21
|
specs:
|
22
|
-
avm-eac_asciidoctor_base0 (0.
|
22
|
+
avm-eac_asciidoctor_base0 (0.6.0)
|
23
23
|
asciidoctor (~> 2.0, >= 2.0.17)
|
24
|
-
avm-eac_webapp_base0 (~> 0.
|
25
|
-
eac_ruby_utils (~> 0.
|
24
|
+
avm-eac_webapp_base0 (~> 0.5, >= 0.5.1)
|
25
|
+
eac_ruby_utils (~> 0.102)
|
26
26
|
os (~> 1.1, >= 1.1.4)
|
27
27
|
rouge (~> 3.30)
|
28
28
|
|
@@ -36,39 +36,39 @@ PATH
|
|
36
36
|
PATH
|
37
37
|
remote: sub/avm-eac_latex_base0
|
38
38
|
specs:
|
39
|
-
avm-eac_latex_base0 (0.
|
40
|
-
avm (~> 0.
|
41
|
-
avm-eac_webapp_base0 (~> 0.
|
42
|
-
eac_ruby_utils (~> 0.
|
39
|
+
avm-eac_latex_base0 (0.2.0)
|
40
|
+
avm (~> 0.41)
|
41
|
+
avm-eac_webapp_base0 (~> 0.5, >= 0.5.1)
|
42
|
+
eac_ruby_utils (~> 0.102)
|
43
43
|
|
44
44
|
PATH
|
45
45
|
remote: sub/avm-eac_rails_base0
|
46
46
|
specs:
|
47
|
-
avm-eac_rails_base0 (0.
|
48
|
-
avm-eac_rails_base1 (~> 0.
|
49
|
-
eac_ruby_utils (~> 0.
|
47
|
+
avm-eac_rails_base0 (0.8.0)
|
48
|
+
avm-eac_rails_base1 (~> 0.6)
|
49
|
+
eac_ruby_utils (~> 0.102)
|
50
50
|
|
51
51
|
PATH
|
52
52
|
remote: sub/avm-eac_rails_base1
|
53
53
|
specs:
|
54
|
-
avm-eac_rails_base1 (0.
|
55
|
-
avm (~> 0.
|
56
|
-
avm-eac_ruby_base1 (~> 0.
|
57
|
-
avm-eac_webapp_base0 (~> 0.
|
58
|
-
eac_ruby_utils (~> 0.
|
54
|
+
avm-eac_rails_base1 (0.6.0)
|
55
|
+
avm (~> 0.41)
|
56
|
+
avm-eac_ruby_base1 (~> 0.20)
|
57
|
+
avm-eac_webapp_base0 (~> 0.6)
|
58
|
+
eac_ruby_utils (~> 0.102)
|
59
59
|
|
60
60
|
PATH
|
61
61
|
remote: sub/avm-eac_redmine_base0
|
62
62
|
specs:
|
63
|
-
avm-eac_redmine_base0 (0.
|
64
|
-
avm (~> 0.
|
63
|
+
avm-eac_redmine_base0 (0.14.0)
|
64
|
+
avm (~> 0.41)
|
65
65
|
avm-eac_generic_base0 (~> 0.5)
|
66
|
-
avm-eac_rails_base1 (~> 0.
|
66
|
+
avm-eac_rails_base1 (~> 0.6)
|
67
67
|
avm-eac_ubuntu_base0 (~> 0.3)
|
68
68
|
curb (~> 0.9, >= 0.9.11)
|
69
69
|
eac_fs (~> 0.12, >= 0.12.3)
|
70
70
|
eac_rest (~> 0.6, >= 0.6.1)
|
71
|
-
eac_ruby_utils (~> 0.
|
71
|
+
eac_ruby_utils (~> 0.102)
|
72
72
|
|
73
73
|
PATH
|
74
74
|
remote: sub/avm-eac_redmine_plugin_base0
|
@@ -80,36 +80,36 @@ PATH
|
|
80
80
|
PATH
|
81
81
|
remote: sub/avm-eac_ruby_base1
|
82
82
|
specs:
|
83
|
-
avm-eac_ruby_base1 (0.
|
84
|
-
avm (~> 0.
|
83
|
+
avm-eac_ruby_base1 (0.20.0)
|
84
|
+
avm (~> 0.39, >= 0.39.1)
|
85
85
|
avm-eac_generic_base0 (~> 0.5)
|
86
|
-
eac_ruby_utils (~> 0.
|
86
|
+
eac_ruby_utils (~> 0.102)
|
87
87
|
|
88
88
|
PATH
|
89
89
|
remote: sub/avm-eac_webapp_base0
|
90
90
|
specs:
|
91
|
-
avm-eac_webapp_base0 (0.
|
92
|
-
avm (~> 0.
|
91
|
+
avm-eac_webapp_base0 (0.6.0)
|
92
|
+
avm (~> 0.41)
|
93
93
|
avm-eac_generic_base0 (~> 0.5)
|
94
94
|
avm-eac_postgresql_base0 (~> 0.2)
|
95
95
|
avm-eac_ubuntu_base0 (~> 0.3)
|
96
|
-
eac_ruby_utils (~> 0.
|
96
|
+
eac_ruby_utils (~> 0.102)
|
97
97
|
|
98
98
|
PATH
|
99
99
|
remote: sub/avm-eac_wordpress_base0
|
100
100
|
specs:
|
101
|
-
avm-eac_wordpress_base0 (0.
|
102
|
-
avm (~> 0.
|
103
|
-
avm-eac_webapp_base0 (~> 0.
|
104
|
-
eac_ruby_utils (~> 0.
|
101
|
+
avm-eac_wordpress_base0 (0.2.0)
|
102
|
+
avm (~> 0.41)
|
103
|
+
avm-eac_webapp_base0 (~> 0.6)
|
104
|
+
eac_ruby_utils (~> 0.102)
|
105
105
|
|
106
106
|
PATH
|
107
107
|
remote: sub/avm-tools
|
108
108
|
specs:
|
109
|
-
avm-tools (0.
|
109
|
+
avm-tools (0.135.0)
|
110
110
|
aranha-parsers (~> 0.14, >= 0.14.1)
|
111
|
-
avm (~> 0.
|
112
|
-
avm-eac_ruby_base1 (~> 0.
|
111
|
+
avm (~> 0.41)
|
112
|
+
avm-eac_ruby_base1 (~> 0.20)
|
113
113
|
avm-eac_ubuntu_base0 (~> 0.3)
|
114
114
|
avm-files (~> 0.3, >= 0.3.2)
|
115
115
|
avm-git (~> 0.4)
|
@@ -118,18 +118,18 @@ PATH
|
|
118
118
|
eac_git (~> 0.12, >= 0.12.2)
|
119
119
|
eac_ruby_base0 (~> 0.16, >= 0.16.6)
|
120
120
|
eac_templates (~> 0.3, >= 0.3.1)
|
121
|
-
git (~> 1.
|
121
|
+
git (~> 1.12)
|
122
122
|
ruby-progressbar (~> 1.11)
|
123
123
|
|
124
124
|
PATH
|
125
125
|
remote: sub/avm
|
126
126
|
specs:
|
127
|
-
avm (0.
|
127
|
+
avm (0.41.0)
|
128
128
|
eac_cli (~> 0.27, >= 0.27.8)
|
129
|
-
eac_config (~> 0.11)
|
129
|
+
eac_config (~> 0.11, >= 0.11.1)
|
130
130
|
eac_docker (~> 0.4, >= 0.4.2)
|
131
131
|
eac_git (~> 0.12, >= 0.12.2)
|
132
|
-
eac_ruby_utils (~> 0.
|
132
|
+
eac_ruby_utils (~> 0.102)
|
133
133
|
eac_templates (~> 0.3, >= 0.3.1)
|
134
134
|
filesize (~> 0.2)
|
135
135
|
htmlbeautifier (~> 1.4, >= 1.4.2)
|
@@ -146,9 +146,9 @@ PATH
|
|
146
146
|
PATH
|
147
147
|
remote: sub/eac_config
|
148
148
|
specs:
|
149
|
-
eac_config (0.11.
|
149
|
+
eac_config (0.11.1)
|
150
150
|
addressable (~> 2.8)
|
151
|
-
eac_ruby_utils (~> 0.
|
151
|
+
eac_ruby_utils (~> 0.102)
|
152
152
|
|
153
153
|
PATH
|
154
154
|
remote: sub/eac_docker
|
@@ -177,11 +177,11 @@ PATH
|
|
177
177
|
PATH
|
178
178
|
remote: sub/eac_ruby_utils
|
179
179
|
specs:
|
180
|
-
eac_ruby_utils (0.
|
180
|
+
eac_ruby_utils (0.102.0)
|
181
181
|
activesupport (>= 4, < 7)
|
182
|
-
addressable (~> 2.
|
182
|
+
addressable (~> 2.8)
|
183
183
|
bundler
|
184
|
-
filesize
|
184
|
+
filesize (~> 0.2)
|
185
185
|
net-ssh (~> 4.2)
|
186
186
|
|
187
187
|
GEM
|
@@ -272,7 +272,8 @@ GEM
|
|
272
272
|
faraday_middleware (1.2.0)
|
273
273
|
faraday (~> 1.0)
|
274
274
|
filesize (0.2.0)
|
275
|
-
git (1.
|
275
|
+
git (1.12.0)
|
276
|
+
addressable (~> 2.8)
|
276
277
|
rchardet (~> 1.8)
|
277
278
|
hpricot (0.8.6)
|
278
279
|
htmlbeautifier (1.4.2)
|
@@ -280,7 +281,7 @@ GEM
|
|
280
281
|
concurrent-ruby (~> 1.0)
|
281
282
|
jaro_winkler (1.5.4)
|
282
283
|
minitar (0.9)
|
283
|
-
minitest (5.16.
|
284
|
+
minitest (5.16.3)
|
284
285
|
multipart-post (2.2.3)
|
285
286
|
net-ssh (4.2.0)
|
286
287
|
nokogiri (1.13.8-x86_64-linux)
|
@@ -361,4 +362,4 @@ DEPENDENCIES
|
|
361
362
|
eac_tools!
|
362
363
|
|
363
364
|
BUNDLED WITH
|
364
|
-
2.3.
|
365
|
+
2.3.20
|
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.8'
|
16
|
-
s.add_dependency 'eac_config', '~> 0.11'
|
16
|
+
s.add_dependency 'eac_config', '~> 0.11', '>= 0.11.1'
|
17
17
|
s.add_dependency 'eac_docker', '~> 0.4', '>= 0.4.2'
|
18
18
|
s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.2'
|
19
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
19
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.102'
|
20
20
|
s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.1'
|
21
21
|
s.add_dependency 'filesize', '~> 0.2'
|
22
22
|
s.add_dependency 'htmlbeautifier', '~> 1.4', '>= 1.4.2'
|
@@ -18,7 +18,8 @@ module Avm
|
|
18
18
|
before_load :clear_files
|
19
19
|
|
20
20
|
def files_path
|
21
|
-
::File.join(instance.read_entry(::Avm::Instances::EntryKeys::
|
21
|
+
::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
|
22
|
+
fs_path_subpath)
|
22
23
|
end
|
23
24
|
|
24
25
|
def dump_command
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/entries/uri_builder'
|
4
|
+
require 'eac_config/entry_path'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Entries
|
9
|
+
module Base
|
10
|
+
class UriComponentEntryValue
|
11
|
+
class DefaultValue
|
12
|
+
enable_method_class
|
13
|
+
common_constructor :uri_component_entry_value
|
14
|
+
delegate :component_entry_path, :entries_provider, to: :uri_component_entry_value
|
15
|
+
|
16
|
+
def default_value_method_name
|
17
|
+
"#{component_entry_path.parts.join('_').variableize}_default_value"
|
18
|
+
end
|
19
|
+
|
20
|
+
def result
|
21
|
+
entries_provider.if_respond(default_value_method_name)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/entries/uri_builder'
|
4
|
+
require 'eac_config/entry_path'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Entries
|
9
|
+
module Base
|
10
|
+
class UriComponentEntryValue
|
11
|
+
class InheritedValue
|
12
|
+
enable_method_class
|
13
|
+
common_constructor :uri_component_entry_value
|
14
|
+
delegate :entries_provider, :id_entry_path, :component_entry_path,
|
15
|
+
to: :uri_component_entry_value
|
16
|
+
|
17
|
+
def result
|
18
|
+
entries_provider.inherited_entry_value(
|
19
|
+
id_entry_path.to_string,
|
20
|
+
component_entry_path.to_string,
|
21
|
+
&inherited_value_block
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def inherited_value_block
|
26
|
+
return nil unless entries_provider.respond_to?(inherited_value_block_method_name)
|
27
|
+
|
28
|
+
->(value) { entries_provider.send(inherited_value_block_method_name, value) }
|
29
|
+
end
|
30
|
+
|
31
|
+
def inherited_value_block_method_name
|
32
|
+
"#{component_entry_path.parts.join('_').variableize}_inherited_value_proc".to_sym
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/entries/uri_builder'
|
4
|
+
require 'eac_config/entry_path'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Entries
|
9
|
+
module Base
|
10
|
+
class UriComponentEntryValue
|
11
|
+
class UrlEntryValue
|
12
|
+
enable_method_class
|
13
|
+
common_constructor :uri_component_entry_value
|
14
|
+
delegate :component, :entries_provider, :root_entry_path, to: :uri_component_entry_value
|
15
|
+
|
16
|
+
def result
|
17
|
+
return unless url_entry.context_found?
|
18
|
+
|
19
|
+
::Avm::Entries::UriBuilder.from_source(url_entry.value.to_uri)
|
20
|
+
.avm_field_get(component)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [Avm::Entries::Entry]
|
24
|
+
def url_entry
|
25
|
+
entries_provider.entry((root_entry_path + %w[url]).to_string)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -9,31 +9,16 @@ module Avm
|
|
9
9
|
module Base
|
10
10
|
class UriComponentEntryValue
|
11
11
|
enable_method_class
|
12
|
+
require_sub __FILE__, require_dependency: true
|
12
13
|
|
13
14
|
enable_listable
|
14
|
-
lists.add_symbol :option
|
15
|
+
lists.add_symbol :option
|
15
16
|
|
16
17
|
common_constructor :entries_provider, :component_entry_path, :options, default: [{}] do
|
17
18
|
self.component_entry_path = ::EacConfig::EntryPath.assert(component_entry_path)
|
18
19
|
self.options = self.class.lists.option.hash_keys_validate!(options)
|
19
20
|
end
|
20
21
|
|
21
|
-
def default_value
|
22
|
-
options[OPTION_DEFAULT_VALUE].call_if_proc
|
23
|
-
end
|
24
|
-
|
25
|
-
def inherited_result
|
26
|
-
entries_provider.inherited_entry_value(
|
27
|
-
id_entry_path.to_string,
|
28
|
-
component_entry_path.to_string,
|
29
|
-
&inherited_value_block
|
30
|
-
)
|
31
|
-
end
|
32
|
-
|
33
|
-
def inherited_value_block
|
34
|
-
options[OPTION_INHERITED_VALUE_BLOCK]
|
35
|
-
end
|
36
|
-
|
37
22
|
# @return [EacConfig::EntryPath]
|
38
23
|
def id_entry_path
|
39
24
|
root_entry_path + %w[id]
|
@@ -41,7 +26,7 @@ module Avm
|
|
41
26
|
|
42
27
|
# @return [String, nil]
|
43
28
|
def result
|
44
|
-
url_entry_value ||
|
29
|
+
url_entry_value || inherited_value || default_value
|
45
30
|
end
|
46
31
|
|
47
32
|
# @return [EacConfig::EntryPath]
|
@@ -49,18 +34,6 @@ module Avm
|
|
49
34
|
component_entry_path[0..-2]
|
50
35
|
end
|
51
36
|
|
52
|
-
# @return [Avm::Entries::Entry]
|
53
|
-
def url_entry
|
54
|
-
entries_provider.entry((root_entry_path + %w[url]).to_string)
|
55
|
-
end
|
56
|
-
|
57
|
-
def url_entry_value
|
58
|
-
return unless url_entry.context_found?
|
59
|
-
|
60
|
-
::Avm::Entries::UriBuilder.from_source(url_entry.value.to_uri)
|
61
|
-
.avm_field_get(component)
|
62
|
-
end
|
63
|
-
|
64
37
|
# @return [String]
|
65
38
|
def component
|
66
39
|
component_entry_path.last
|
@@ -7,31 +7,6 @@ module Avm
|
|
7
7
|
class Base
|
8
8
|
module AutoValues
|
9
9
|
module Filesystem
|
10
|
-
def auto_fs_path
|
11
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
12
|
-
::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id }
|
13
|
-
end
|
14
|
-
|
15
|
-
def auto_fs_url
|
16
|
-
auto_fs_url_with_install || auto_fs_url_without_install
|
17
|
-
end
|
18
|
-
|
19
|
-
def auto_fs_url_with_install
|
20
|
-
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL)
|
21
|
-
.if_present do |install_url|
|
22
|
-
read_entry_optional('fs_path').if_present do |fs_path|
|
23
|
-
"#{install_url}#{fs_path}"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def auto_fs_url_without_install
|
29
|
-
return nil if read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present?
|
30
|
-
|
31
|
-
read_entry_optional('fs_path').if_present do |fs_path|
|
32
|
-
"file://#{fs_path}"
|
33
|
-
end
|
34
|
-
end
|
35
10
|
end
|
36
11
|
end
|
37
12
|
end
|
@@ -8,23 +8,7 @@ module Avm
|
|
8
8
|
class Base
|
9
9
|
module AutoValues
|
10
10
|
module Install
|
11
|
-
|
12
|
-
uri_component_entry_value(
|
13
|
-
::Avm::Instances::EntryKeys::INSTALL_DATA_PATH,
|
14
|
-
inherited_value_block: ->(v) { v + '/' + id }
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
def auto_install_groupname
|
19
|
-
uri_component_entry_value(
|
20
|
-
::Avm::Instances::EntryKeys::INSTALL_GROUPNAME,
|
21
|
-
default_value: lambda do
|
22
|
-
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
23
|
-
end
|
24
|
-
)
|
25
|
-
end
|
26
|
-
|
27
|
-
::Avm::Entries::UriBuilder::ENTRIES_FIELDS.each do |component|
|
11
|
+
(::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[data_path groupname]).each do |component|
|
28
12
|
method_suffix = "install_#{component}"
|
29
13
|
define_method "auto_#{method_suffix}" do
|
30
14
|
uri_component_entry_value(
|
@@ -43,6 +27,18 @@ module Avm
|
|
43
27
|
require 'avm/entries/auto_values/uri_entry'
|
44
28
|
::Avm::Entries::AutoValues::UriEntry.new(self, 'install').value
|
45
29
|
end
|
30
|
+
|
31
|
+
def install_data_path_inherited_value_proc(value)
|
32
|
+
value + '/' + id
|
33
|
+
end
|
34
|
+
|
35
|
+
def install_groupname_default_value
|
36
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
37
|
+
end
|
38
|
+
|
39
|
+
def install_path_inherited_value_proc(value)
|
40
|
+
install_data_path_inherited_value_proc(value)
|
41
|
+
end
|
46
42
|
end
|
47
43
|
end
|
48
44
|
end
|
@@ -45,11 +45,10 @@ module Avm
|
|
45
45
|
end
|
46
46
|
|
47
47
|
{
|
48
|
-
'' => %w[
|
48
|
+
'' => %w[name source_instance_id],
|
49
49
|
admin: URI_FIELDS + %w[api_key],
|
50
50
|
database: URI_FIELDS + %w[id limit name system timeout extra],
|
51
51
|
docker: %w[registry],
|
52
|
-
fs: %w[url],
|
53
52
|
install: URI_FIELDS + %w[id data_path groupname],
|
54
53
|
mailer: {
|
55
54
|
'' => %w[id from reply_to],
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -15,8 +15,8 @@ RSpec.describe ::Avm::Instances::Base do
|
|
15
15
|
describe '#read_entry' do
|
16
16
|
{
|
17
17
|
'app_0' => {
|
18
|
-
fs_path: '/fs_root/app_0',
|
19
18
|
::Avm::Instances::EntryKeys::INSTALL_DATA_PATH => '/data_fs_root/app_0',
|
19
|
+
::Avm::Instances::EntryKeys::INSTALL_PATH => '/fs_root/app_0',
|
20
20
|
::Avm::Instances::EntryKeys::DATABASE_NAME => 'app_0',
|
21
21
|
::Avm::Instances::EntryKeys::DATABASE_USERNAME => 'user1',
|
22
22
|
::Avm::Instances::EntryKeys::DATABASE_PASSWORD => 'pass1',
|
@@ -71,7 +71,7 @@ RSpec.describe ::Avm::Instances::Base do
|
|
71
71
|
::Avm::Instances::EntryKeys::INSTALL_PORT => '2222',
|
72
72
|
::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'user5',
|
73
73
|
::Avm::Instances::EntryKeys::INSTALL_PASSWORD => 'passwd5',
|
74
|
-
::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5'
|
74
|
+
::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5/app_6'
|
75
75
|
},
|
76
76
|
'mailer_0' => {
|
77
77
|
::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
|
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.17'
|
16
|
-
s.add_dependency 'avm-eac_webapp_base0', '~> 0.
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
16
|
+
s.add_dependency 'avm-eac_webapp_base0', '~> 0.5', '>= 0.5.1'
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.102'
|
18
18
|
s.add_dependency 'os', '~> 1.1', '>= 1.1.4'
|
19
19
|
s.add_dependency 'rouge', '~> 3.30'
|
20
20
|
|
@@ -6,7 +6,7 @@ module Avm
|
|
6
6
|
module EacAsciidoctorBase0
|
7
7
|
class ApacheHost < ::Avm::EacWebappBase0::ApacheHost
|
8
8
|
def document_root
|
9
|
-
instance.read_entry(::Avm::Instances::EntryKeys::
|
9
|
+
instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
|
10
10
|
end
|
11
11
|
|
12
12
|
def extra_content
|
@@ -18,7 +18,7 @@ module Avm
|
|
18
18
|
|
19
19
|
def project_uncached
|
20
20
|
::Avm::EacAsciidoctorBase0::Sources::Base.new(
|
21
|
-
instance.source_instance.read_entry(::Avm::Instances::EntryKeys::
|
21
|
+
instance.source_instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
|
22
22
|
)
|
23
23
|
end
|
24
24
|
end
|
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
16
|
-
s.add_dependency 'avm-eac_webapp_base0', '~> 0.
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.41'
|
16
|
+
s.add_dependency 'avm-eac_webapp_base0', '~> 0.5', '>= 0.5.1'
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.102'
|
18
18
|
|
19
19
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
|
20
20
|
end
|