eac_tools 0.24.1 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +31 -30
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/avm.gemspec +2 -2
  5. data/sub/avm/lib/avm/entries/auto_values/uri_entry.rb +1 -1
  6. data/sub/avm/lib/avm/entries/base/inherited_entry_value.rb +31 -0
  7. data/sub/avm/lib/avm/entries/base/uri_component_entry_value/default_value.rb +27 -0
  8. data/sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb +38 -0
  9. data/sub/avm/lib/avm/entries/base/uri_component_entry_value/url_entry_value.rb +31 -0
  10. data/sub/avm/lib/avm/entries/base/uri_component_entry_value.rb +8 -19
  11. data/sub/avm/lib/avm/entries/base.rb +0 -10
  12. data/sub/avm/lib/avm/instances/base/auto_values/filesystem.rb +0 -26
  13. data/sub/avm/lib/avm/instances/base/auto_values/install.rb +14 -9
  14. data/sub/avm/lib/avm/instances/entry_keys.rb +2 -3
  15. data/sub/avm/lib/avm/version.rb +1 -1
  16. data/sub/avm/spec/lib/avm/instances/base_spec.rb +1 -1
  17. data/sub/avm/spec/lib/avm/instances/base_spec_configs_storage.yml +1 -1
  18. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
  19. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +37 -0
  20. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +1 -1
  21. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  22. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/{deploy → instances/deploy}/config/install.sh.template +0 -0
  23. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/{deploy → instances/deploy}/config/secrets.yml +0 -0
  24. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
  25. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/update_dependencies_requirements.rb +7 -1
  26. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  27. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  28. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/file_unit.rb +1 -1
  29. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/deploy.rb +2 -0
  30. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  31. data/sub/avm-tools/avm-tools.gemspec +2 -2
  32. data/sub/avm-tools/lib/avm/tools/runner/git/deploy.rb +1 -1
  33. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  34. data/sub/eac_config/eac_config.gemspec +1 -1
  35. data/sub/eac_config/lib/eac_config/entry.rb +4 -0
  36. data/sub/eac_config/lib/eac_config/envvars_node.rb +4 -0
  37. data/sub/eac_config/lib/eac_config/node_entry.rb +5 -0
  38. data/sub/eac_config/lib/eac_config/version.rb +1 -1
  39. data/sub/eac_config/lib/eac_config/yaml_file_node.rb +4 -0
  40. data/sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb +11 -0
  41. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +2 -2
  42. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_accessors.rb +36 -0
  43. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +14 -4
  44. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +15 -4
  45. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +20 -15
  46. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +53 -20
  47. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects/replace_instance_method.rb +36 -0
  48. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects.rb +52 -0
  49. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  50. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +26 -0
  51. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/{ruby_spec.rb → ruby/on_clean_environment_spec.rb} +11 -0
  52. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby/on_replace_objects_spec.rb +67 -0
  53. metadata +26 -24
  54. 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: 01ef491263c804f929167ab7067054cfd5341598cf5c7855915f187d8206727c
4
- data.tar.gz: 6dfc25b5ee4e38978a80a50980cdbb15a992f6a7fd8a695d7298e481f176f839
3
+ metadata.gz: 6de32a35373e92c90852a1d3d432b16112da4a908cd94bda757d64ca31647e93
4
+ data.tar.gz: 2b9c7aa3b2d163f2d5427c3f1d6de0da7e938d58ee79c4bc22418efce16ce1a6
5
5
  SHA512:
6
- metadata.gz: ddd276d51b2eccb1b53ef335d58000de09c32d2d8d86283a8a0723e1a9ea2edb854f6603f37ffdb0a4ec8df9ed23a073ec5a9fcdfc5c95d3f7966fcdd93f9eb8
7
- data.tar.gz: c4b5df3fe0a896e24cbeabbb27aa573e6a814460cbadc1fb3941c6490a5e2f129c9c747135085dc064f7cfd6d201cd6e2cbc4fcf246cd304bc64d282b59708cd
6
+ metadata.gz: 5e26f055dd1a4d7f617ebd982f820e25b3a81d10ef81d2e0d93648fcfed43a483e9dee6ce6b3a56c7546688aeb19a65edd4d8ae87e5a4dd6850555326cad9535
7
+ data.tar.gz: e5da4638216094a63e821b2aef2cb9a346c90cb952a41e8e408295e78628a9c0ff26c55922f4ad7dd7f3f5a5908a16d1dc681dfda3e4482fd9b9229d691a6181
data/Gemfile.lock CHANGED
@@ -1,20 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.24.1)
5
- avm (~> 0.38)
4
+ eac_tools (0.26.0)
5
+ avm (~> 0.40)
6
6
  avm-eac_asciidoctor_base0 (~> 0.5)
7
7
  avm-eac_generic_base0 (~> 0.5)
8
8
  avm-eac_latex_base0 (~> 0.1, >= 0.1.2)
9
9
  avm-eac_rails_base0 (~> 0.7)
10
10
  avm-eac_rails_base1 (~> 0.5)
11
- avm-eac_redmine_base0 (~> 0.12)
11
+ avm-eac_redmine_base0 (~> 0.13)
12
12
  avm-eac_redmine_plugin_base0 (~> 0.3)
13
- avm-eac_ruby_base1 (~> 0.19, >= 0.19.1)
14
- avm-eac_webapp_base0 (~> 0.4)
13
+ avm-eac_ruby_base1 (~> 0.20)
14
+ avm-eac_webapp_base0 (~> 0.5)
15
15
  avm-eac_wordpress_base0 (~> 0.1, >= 0.1.2)
16
- avm-tools (~> 0.133)
17
- eac_ruby_utils (~> 0.100)
16
+ avm-tools (~> 0.134)
17
+ eac_ruby_utils (~> 0.102)
18
18
 
19
19
  PATH
20
20
  remote: sub/avm-eac_asciidoctor_base0
@@ -60,15 +60,15 @@ PATH
60
60
  PATH
61
61
  remote: sub/avm-eac_redmine_base0
62
62
  specs:
63
- avm-eac_redmine_base0 (0.12.0)
64
- avm (~> 0.35, >= 0.35.1)
63
+ avm-eac_redmine_base0 (0.13.0)
64
+ avm (~> 0.39, >= 0.39.1)
65
65
  avm-eac_generic_base0 (~> 0.5)
66
66
  avm-eac_rails_base1 (~> 0.5)
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.98)
71
+ eac_ruby_utils (~> 0.102)
72
72
 
73
73
  PATH
74
74
  remote: sub/avm-eac_redmine_plugin_base0
@@ -80,20 +80,20 @@ PATH
80
80
  PATH
81
81
  remote: sub/avm-eac_ruby_base1
82
82
  specs:
83
- avm-eac_ruby_base1 (0.19.1)
84
- avm (~> 0.35, >= 0.35.1)
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.98)
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.4.0)
92
- avm (~> 0.35, >= 0.35.1)
91
+ avm-eac_webapp_base0 (0.5.0)
92
+ avm (~> 0.39, >= 0.39.1)
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.98)
96
+ eac_ruby_utils (~> 0.102)
97
97
 
98
98
  PATH
99
99
  remote: sub/avm-eac_wordpress_base0
@@ -106,10 +106,10 @@ PATH
106
106
  PATH
107
107
  remote: sub/avm-tools
108
108
  specs:
109
- avm-tools (0.133.0)
109
+ avm-tools (0.134.0)
110
110
  aranha-parsers (~> 0.14, >= 0.14.1)
111
- avm (~> 0.37)
112
- avm-eac_ruby_base1 (~> 0.19, >= 0.19.1)
111
+ avm (~> 0.40)
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)
@@ -124,12 +124,12 @@ PATH
124
124
  PATH
125
125
  remote: sub/avm
126
126
  specs:
127
- avm (0.38.0)
127
+ avm (0.40.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.100)
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.0)
149
+ eac_config (0.11.1)
150
150
  addressable (~> 2.8)
151
- eac_ruby_utils (~> 0.100)
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.100.0)
180
+ eac_ruby_utils (0.102.0)
181
181
  activesupport (>= 4, < 7)
182
- addressable (~> 2.6)
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.11.0)
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.2)
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.18
365
+ 2.3.20
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.24.1'
4
+ VERSION = '0.26.0'
5
5
  end
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.100'
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'
@@ -15,7 +15,7 @@ module Avm
15
15
 
16
16
  def value
17
17
  ::Avm::Entries::UriBuilder.from_all_fields do |field_name|
18
- entries_provider.entry([suffix, field_name]).value
18
+ entries_provider.entry([suffix, field_name]).optional_value
19
19
  end.to_uri.to_s
20
20
  end
21
21
  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 InheritedEntryValue
11
+ enable_method_class
12
+ common_constructor :entries_provider, :source_entry_suffix, :target_entry_suffix, :block,
13
+ block_arg: true
14
+
15
+ def result
16
+ self_entry_value.if_present do |instance_id|
17
+ other_entry_value(instance_id).if_present(&block)
18
+ end
19
+ end
20
+
21
+ def other_entry_value(instance_id)
22
+ ::Avm::Instances::Base.by_id(instance_id).read_entry_optional(target_entry_suffix)
23
+ end
24
+
25
+ def self_entry_value
26
+ entries_provider.read_entry_optional(source_entry_suffix)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -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, :entries_provider, to: :uri_component_entry_value
15
+
16
+ def default_value_method_name
17
+ "#{component}_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 :component, :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}_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,15 +9,14 @@ module Avm
9
9
  module Base
10
10
  class UriComponentEntryValue
11
11
  enable_method_class
12
- common_constructor :entries_provider, :component_entry_path do
13
- self.component_entry_path = ::EacConfig::EntryPath.assert(component_entry_path)
14
- end
12
+ require_sub __FILE__, require_dependency: true
15
13
 
16
- def inherited_result
17
- entries_provider.inherited_entry_value(
18
- id_entry_path.to_string,
19
- component_entry_path.to_string
20
- )
14
+ enable_listable
15
+ lists.add_symbol :option
16
+
17
+ common_constructor :entries_provider, :component_entry_path, :options, default: [{}] do
18
+ self.component_entry_path = ::EacConfig::EntryPath.assert(component_entry_path)
19
+ self.options = self.class.lists.option.hash_keys_validate!(options)
21
20
  end
22
21
 
23
22
  # @return [EacConfig::EntryPath]
@@ -27,12 +26,7 @@ module Avm
27
26
 
28
27
  # @return [String, nil]
29
28
  def result
30
- if url_entry.context_found?
31
- return ::Avm::Entries::UriBuilder.from_source(url_entry.value.to_uri)
32
- .avm_field_get(component)
33
- end
34
-
35
- inherited_result
29
+ url_entry_value || inherited_value || default_value
36
30
  end
37
31
 
38
32
  # @return [EacConfig::EntryPath]
@@ -40,11 +34,6 @@ module Avm
40
34
  component_entry_path[0..-2]
41
35
  end
42
36
 
43
- # @return [Avm::Entries::Entry]
44
- def url_entry
45
- entries_provider.entry((root_entry_path + %w[url]).to_string)
46
- end
47
-
48
37
  # @return [String]
49
38
  def component
50
39
  component_entry_path.last
@@ -34,16 +34,6 @@ module Avm
34
34
  end
35
35
  (path_prefix + entry_suffix).join('.')
36
36
  end
37
-
38
- def inherited_entry_value(source_entry_suffix, target_entry_suffix, &block)
39
- read_entry_optional(source_entry_suffix).if_present do |instance_id|
40
- other_entry_value(instance_id, target_entry_suffix).if_present(&block)
41
- end
42
- end
43
-
44
- def other_entry_value(instance_id, entry_suffix)
45
- ::Avm::Instances::Base.by_id(instance_id).read_entry_optional(entry_suffix)
46
- end
47
37
  end
48
38
  end
49
39
  end
@@ -11,32 +11,6 @@ module Avm
11
11
  inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
12
12
  ::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id }
13
13
  end
14
-
15
- def auto_data_fs_path
16
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
17
- ::Avm::Instances::EntryKeys::DATA_FS_PATH) { |v| v + '/' + id }
18
- end
19
-
20
- def auto_fs_url
21
- auto_fs_url_with_install || auto_fs_url_without_install
22
- end
23
-
24
- def auto_fs_url_with_install
25
- read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL)
26
- .if_present do |install_url|
27
- read_entry_optional('fs_path').if_present do |fs_path|
28
- "#{install_url}#{fs_path}"
29
- end
30
- end
31
- end
32
-
33
- def auto_fs_url_without_install
34
- return nil if read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present?
35
-
36
- read_entry_optional('fs_path').if_present do |fs_path|
37
- "file://#{fs_path}"
38
- end
39
- end
40
14
  end
41
15
  end
42
16
  end
@@ -8,15 +8,12 @@ module Avm
8
8
  class Base
9
9
  module AutoValues
10
10
  module Install
11
- def auto_install_groupname
12
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
13
- ::Avm::Instances::EntryKeys::INSTALL_GROUPNAME) ||
14
- read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
15
- end
16
-
17
- ::Avm::Entries::UriBuilder::ENTRIES_FIELDS.each do |component|
18
- define_method "auto_install_#{component}" do
19
- uri_component_entry_value("install.#{component}")
11
+ (::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[data_path groupname]).each do |component|
12
+ method_suffix = "install_#{component}"
13
+ define_method "auto_#{method_suffix}" do
14
+ uri_component_entry_value(
15
+ ::Avm::Instances::EntryKeys.const_get(method_suffix.underscore.upcase)
16
+ )
20
17
  end
21
18
  end
22
19
 
@@ -30,6 +27,14 @@ module Avm
30
27
  require 'avm/entries/auto_values/uri_entry'
31
28
  ::Avm::Entries::AutoValues::UriEntry.new(self, 'install').value
32
29
  end
30
+
31
+ def data_path_inherited_value_proc(value)
32
+ value + '/' + id
33
+ end
34
+
35
+ def groupname_default_value
36
+ read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
37
+ end
33
38
  end
34
39
  end
35
40
  end
@@ -45,12 +45,11 @@ module Avm
45
45
  end
46
46
 
47
47
  {
48
- '' => %w[data_fs_path fs_path name source_instance_id],
48
+ '' => %w[fs_path 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
- install: URI_FIELDS + %w[id groupname],
52
+ install: URI_FIELDS + %w[id data_path groupname],
54
53
  mailer: {
55
54
  '' => %w[id from reply_to],
56
55
  smtp: URI_FIELDS + %w[address domain authentication openssl_verify_mode starttls_auto tls]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.38.0'
4
+ VERSION = '0.40.0'
5
5
  end
@@ -16,7 +16,7 @@ RSpec.describe ::Avm::Instances::Base do
16
16
  {
17
17
  'app_0' => {
18
18
  fs_path: '/fs_root/app_0',
19
- data_fs_path: '/data_fs_root/app_0',
19
+ ::Avm::Instances::EntryKeys::INSTALL_DATA_PATH => '/data_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',
@@ -4,9 +4,9 @@ app_0:
4
4
  id: app_1
5
5
  app_1:
6
6
  fs_path: /fs_root
7
- data_fs_path: /data_fs_root
8
7
  install:
9
8
  id: app_2
9
+ data_path: /data_fs_root
10
10
  database:
11
11
  name: app_1_db
12
12
  username: user1
@@ -12,14 +12,14 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.35', '>= 0.35.1'
15
+ s.add_dependency 'avm', '~> 0.39', '>= 0.39.1'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
17
17
  s.add_dependency 'avm-eac_rails_base1', '~> 0.5'
18
18
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
19
19
  s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
20
20
  s.add_dependency 'eac_fs', '~> 0.12', '>= 0.12.3'
21
21
  s.add_dependency 'eac_rest', '~> 0.6', '>= 0.6.1'
22
- s.add_dependency 'eac_ruby_utils', '~> 0.98'
22
+ s.add_dependency 'eac_ruby_utils', '~> 0.102'
23
23
 
24
24
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
25
25
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/deploy'
4
+ require 'eac_ruby_utils/ruby'
5
+
6
+ module Avm
7
+ module EacRedmineBase0
8
+ module Instances
9
+ class Deploy < ::Avm::EacWebappBase0::Deploy
10
+ set_callback :assert_instance_branch, :after, :run_installer
11
+
12
+ def run_installer
13
+ infom 'Running installer'
14
+ ::EacRubyUtils::Ruby.on_clean_environment do
15
+ installer_command.system!
16
+ end
17
+ end
18
+
19
+ def installer_command
20
+ instance.host_env.command(installer_path, install_task)
21
+ end
22
+
23
+ def installer_path
24
+ ::File.join(instance.fs_path, 'plugins', 'redmine_installer', 'installer', 'run.sh')
25
+ end
26
+
27
+ def install_task
28
+ if instance.web_path_optional.present?
29
+ 'redmine_as_apache_path'
30
+ else
31
+ 'redmine_as_apache_base'
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/eac_redmine_base0/instances/base'
4
- require 'avm/eac_redmine_base0/deploy'
4
+ require 'avm/eac_redmine_base0/instances/deploy'
5
5
  require 'avm/eac_redmine_base0/apache_host'
6
6
  require 'avm/eac_rails_base1/runner'
7
7
  require 'eac_ruby_utils/core_ext'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.12.0'
5
+ VERSION = '0.13.0'
6
6
  end
7
7
  end
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.35', '>= 0.35.1'
15
+ s.add_dependency 'avm', '~> 0.39', '>= 0.39.1'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.98'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.102'
18
18
 
19
19
  s.add_development_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
20
20
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
@@ -11,6 +11,7 @@ module Avm
11
11
  class UpdateDependenciesRequirements
12
12
  runner_with :help do
13
13
  bool_opt '-a', '--all'
14
+ arg_opt '-e', '--exclude', repeat: true
14
15
  pos_arg :gem_name, repeat: true, optional: true
15
16
  end
16
17
 
@@ -32,8 +33,13 @@ module Avm
32
33
 
33
34
  private
34
35
 
36
+ def exclude?(gem_name)
37
+ parsed.exclude.include?(gem_name)
38
+ end
39
+
35
40
  def gem_names_uncached
36
- ::Set.new(parsed.gem_name + gem_names_from_all).sort
41
+ ::Set.new(parsed.gem_name + gem_names_from_all).reject { |gem_name| exclude?(gem_name) }
42
+ .sort
37
43
  end
38
44
 
39
45
  def gem_names_from_all
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.19.1'
5
+ VERSION = '0.20.0'
6
6
  end
7
7
  end
@@ -12,11 +12,11 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.35', '>= 0.35.1'
15
+ s.add_dependency 'avm', '~> 0.39', '>= 0.39.1'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
17
17
  s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2'
18
18
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
19
- s.add_dependency 'eac_ruby_utils', '~> 0.98'
19
+ s.add_dependency 'eac_ruby_utils', '~> 0.102'
20
20
 
21
21
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
22
22
  end
@@ -23,7 +23,7 @@ module Avm
23
23
  end
24
24
 
25
25
  def source_path
26
- ::File.join(instance.read_entry(:data_fs_path), data_key.to_s)
26
+ ::File.join(instance.install_data_path, data_key.to_s)
27
27
  end
28
28
 
29
29
  def target_path