eac_tools 0.22.0 → 0.24.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +60 -60
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/avm.gemspec +3 -3
  5. data/sub/avm/lib/avm/entries/base/uri_component_entry_value.rb +55 -0
  6. data/sub/avm/lib/avm/entries/base.rb +2 -0
  7. data/sub/avm/lib/avm/entries/entry.rb +10 -1
  8. data/sub/avm/lib/avm/entries/uri_builder.rb +4 -0
  9. data/sub/avm/lib/avm/instances/base/auto_values/install.rb +5 -13
  10. data/sub/avm/lib/avm/instances/base.rb +1 -1
  11. data/sub/avm/lib/avm/instances/entry_keys.rb +2 -1
  12. data/sub/avm/lib/avm/sources/base/application.rb +34 -0
  13. data/sub/avm/lib/avm/sources/base/configuration.rb +2 -0
  14. data/sub/avm/lib/avm/sources/base/testing.rb +1 -1
  15. data/sub/avm/lib/avm/version.rb +1 -1
  16. data/sub/avm/spec/lib/avm/instances/base_spec.rb +16 -0
  17. data/sub/avm/spec/lib/avm/instances/base_spec_configs_storage.yml +6 -0
  18. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +5 -5
  19. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/base.rb +13 -0
  20. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances.rb +11 -0
  21. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  22. data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
  23. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/base.rb +2 -2
  24. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
  25. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
  26. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb +13 -0
  27. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances.rb +11 -0
  28. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb +1 -1
  29. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  30. data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec.rb +2 -2
  31. data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb +2 -2
  32. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +4 -4
  33. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +27 -0
  34. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances.rb +11 -0
  35. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/bundle.rb +1 -1
  36. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb +2 -2
  37. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  38. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +6 -6
  39. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +48 -4
  40. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances.rb +11 -0
  41. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +1 -1
  42. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners.rb +11 -0
  43. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources.rb +11 -0
  44. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  45. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  46. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec.rb +8 -1
  47. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile.lock +1 -0
  48. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/_gitignore +2 -0
  49. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile.lock +1 -0
  50. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/_gitignore +2 -0
  51. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +4 -4
  52. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/subcommand_parent.rb +26 -0
  53. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +61 -0
  54. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/dump.rb +65 -0
  55. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb +57 -0
  56. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data.rb +19 -0
  57. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners.rb +13 -0
  58. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  59. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  60. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/base.rb +2 -2
  61. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  62. data/sub/avm-tools/avm-tools.gemspec +3 -3
  63. data/sub/avm-tools/lib/avm/tools/runner/app_src/info.rb +10 -8
  64. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  65. data/sub/eac_config/eac_config.gemspec +2 -2
  66. data/sub/eac_config/lib/eac_config/entry_path.rb +6 -1
  67. data/sub/eac_config/lib/eac_config/version.rb +1 -1
  68. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +9 -1
  69. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +5 -0
  70. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +17 -2
  71. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  72. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +32 -82
  73. metadata +49 -61
  74. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instance.rb +0 -11
  75. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instance.rb +0 -11
  76. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instance.rb +0 -25
  77. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instance.rb +0 -57
  78. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instance/subcommand_parent.rb +0 -24
  79. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instance.rb +0 -62
  80. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/data/dump.rb +0 -63
  81. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/data/load.rb +0 -55
  82. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/data.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04cbda8d8b53185b46e806e22d26098771f627a4574eb028e9836905e700a27d
4
- data.tar.gz: 7862b02bf94a320aee41d7ef63052b2049484a5f1540392268b41402b4eb6ba4
3
+ metadata.gz: 01ef491263c804f929167ab7067054cfd5341598cf5c7855915f187d8206727c
4
+ data.tar.gz: 6dfc25b5ee4e38978a80a50980cdbb15a992f6a7fd8a695d7298e481f176f839
5
5
  SHA512:
6
- metadata.gz: d51e79b98e8a886236b82b1cafbbe7e3f817cf4dcc18bce329f19d4d5a176a2ae10c78ed5ca871d6de8e79b31244687bccfd0a4fdca71bf88e9e806aa6faab28
7
- data.tar.gz: 42d8f5266e63f7dac0bf2f952bea10d9ad342fd223c1f41ea7984aeb3f37bce37dc5389bd00da9411607badf39bfed74f24b3fac04dd4bd6a3b3b4a2b55c4736
6
+ metadata.gz: ddd276d51b2eccb1b53ef335d58000de09c32d2d8d86283a8a0723e1a9ea2edb854f6603f37ffdb0a4ec8df9ed23a073ec5a9fcdfc5c95d3f7966fcdd93f9eb8
7
+ data.tar.gz: c4b5df3fe0a896e24cbeabbb27aa573e6a814460cbadc1fb3941c6490a5e2f129c9c747135085dc064f7cfd6d201cd6e2cbc4fcf246cd304bc64d282b59708cd
data/Gemfile.lock CHANGED
@@ -1,30 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.22.0)
5
- avm (~> 0.35, >= 0.35.1)
6
- avm-eac_asciidoctor_base0 (~> 0.4)
4
+ eac_tools (0.24.1)
5
+ avm (~> 0.38)
6
+ avm-eac_asciidoctor_base0 (~> 0.5)
7
7
  avm-eac_generic_base0 (~> 0.5)
8
- avm-eac_latex_base0 (~> 0.1, >= 0.1.1)
9
- avm-eac_rails_base0 (~> 0.6, >= 0.6.1)
10
- avm-eac_rails_base1 (~> 0.4, >= 0.4.2)
11
- avm-eac_redmine_base0 (~> 0.11)
8
+ avm-eac_latex_base0 (~> 0.1, >= 0.1.2)
9
+ avm-eac_rails_base0 (~> 0.7)
10
+ avm-eac_rails_base1 (~> 0.5)
11
+ avm-eac_redmine_base0 (~> 0.12)
12
12
  avm-eac_redmine_plugin_base0 (~> 0.3)
13
- avm-eac_ruby_base1 (~> 0.19)
14
- avm-eac_webapp_base0 (~> 0.3, >= 0.3.1)
15
- avm-eac_wordpress_base0 (~> 0.1, >= 0.1.1)
16
- avm-tools (~> 0.132, >= 0.132.1)
17
- eac_ruby_utils (~> 0.98)
13
+ avm-eac_ruby_base1 (~> 0.19, >= 0.19.1)
14
+ avm-eac_webapp_base0 (~> 0.4)
15
+ avm-eac_wordpress_base0 (~> 0.1, >= 0.1.2)
16
+ avm-tools (~> 0.133)
17
+ eac_ruby_utils (~> 0.100)
18
18
 
19
19
  PATH
20
20
  remote: sub/avm-eac_asciidoctor_base0
21
21
  specs:
22
- avm-eac_asciidoctor_base0 (0.4.0)
23
- asciidoctor (~> 2.0, >= 2.0.12)
24
- avm-eac_webapp_base0 (~> 0.2)
25
- eac_ruby_utils (~> 0.63)
26
- os
27
- rouge (~> 3.26)
22
+ avm-eac_asciidoctor_base0 (0.5.0)
23
+ asciidoctor (~> 2.0, >= 2.0.17)
24
+ avm-eac_webapp_base0 (~> 0.4)
25
+ eac_ruby_utils (~> 0.98)
26
+ os (~> 1.1, >= 1.1.4)
27
+ rouge (~> 3.30)
28
28
 
29
29
  PATH
30
30
  remote: sub/avm-eac_generic_base0
@@ -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.1.1)
40
- avm (~> 0.34)
41
- avm-eac_webapp_base0 (~> 0.3, >= 0.3.1)
42
- eac_ruby_utils (~> 0.97)
39
+ avm-eac_latex_base0 (0.1.2)
40
+ avm (~> 0.35, >= 0.35.1)
41
+ avm-eac_webapp_base0 (~> 0.4)
42
+ eac_ruby_utils (~> 0.98)
43
43
 
44
44
  PATH
45
45
  remote: sub/avm-eac_rails_base0
46
46
  specs:
47
- avm-eac_rails_base0 (0.6.1)
48
- avm-eac_rails_base1 (~> 0.4, >= 0.4.2)
49
- eac_ruby_utils (~> 0.97)
47
+ avm-eac_rails_base0 (0.7.0)
48
+ avm-eac_rails_base1 (~> 0.5)
49
+ eac_ruby_utils (~> 0.98)
50
50
 
51
51
  PATH
52
52
  remote: sub/avm-eac_rails_base1
53
53
  specs:
54
- avm-eac_rails_base1 (0.4.2)
55
- avm (~> 0.31)
56
- avm-eac_ruby_base1 (~> 0.11)
57
- avm-eac_webapp_base0 (~> 0.3)
58
- eac_ruby_utils (~> 0.97)
54
+ avm-eac_rails_base1 (0.5.0)
55
+ avm (~> 0.35, >= 0.35.1)
56
+ avm-eac_ruby_base1 (~> 0.19)
57
+ avm-eac_webapp_base0 (~> 0.4)
58
+ eac_ruby_utils (~> 0.98)
59
59
 
60
60
  PATH
61
61
  remote: sub/avm-eac_redmine_base0
62
62
  specs:
63
- avm-eac_redmine_base0 (0.11.0)
64
- avm (~> 0.29)
65
- avm-eac_generic_base0 (~> 0.4)
66
- avm-eac_rails_base1 (~> 0.4, >= 0.4.1)
63
+ avm-eac_redmine_base0 (0.12.0)
64
+ avm (~> 0.35, >= 0.35.1)
65
+ avm-eac_generic_base0 (~> 0.5)
66
+ avm-eac_rails_base1 (~> 0.5)
67
67
  avm-eac_ubuntu_base0 (~> 0.3)
68
- curb (~> 0.9.11)
69
- eac_fs (~> 0.12, >= 0.12.2)
68
+ curb (~> 0.9, >= 0.9.11)
69
+ eac_fs (~> 0.12, >= 0.12.3)
70
70
  eac_rest (~> 0.6, >= 0.6.1)
71
- eac_ruby_utils (~> 0.95, >= 0.95.2)
71
+ eac_ruby_utils (~> 0.98)
72
72
 
73
73
  PATH
74
74
  remote: sub/avm-eac_redmine_plugin_base0
@@ -80,7 +80,7 @@ PATH
80
80
  PATH
81
81
  remote: sub/avm-eac_ruby_base1
82
82
  specs:
83
- avm-eac_ruby_base1 (0.19.0)
83
+ avm-eac_ruby_base1 (0.19.1)
84
84
  avm (~> 0.35, >= 0.35.1)
85
85
  avm-eac_generic_base0 (~> 0.5)
86
86
  eac_ruby_utils (~> 0.98)
@@ -88,34 +88,34 @@ PATH
88
88
  PATH
89
89
  remote: sub/avm-eac_webapp_base0
90
90
  specs:
91
- avm-eac_webapp_base0 (0.3.1)
92
- avm (~> 0.1)
93
- avm-eac_generic_base0 (~> 0.1)
94
- avm-eac_postgresql_base0 (~> 0.1)
91
+ avm-eac_webapp_base0 (0.4.0)
92
+ avm (~> 0.35, >= 0.35.1)
93
+ avm-eac_generic_base0 (~> 0.5)
94
+ avm-eac_postgresql_base0 (~> 0.2)
95
95
  avm-eac_ubuntu_base0 (~> 0.3)
96
- eac_ruby_utils (~> 0.68)
96
+ eac_ruby_utils (~> 0.98)
97
97
 
98
98
  PATH
99
99
  remote: sub/avm-eac_wordpress_base0
100
100
  specs:
101
- avm-eac_wordpress_base0 (0.1.1)
102
- avm (~> 0.35)
103
- avm-eac_webapp_base0 (~> 0.3, >= 0.3.1)
104
- eac_ruby_utils (~> 0.97)
101
+ avm-eac_wordpress_base0 (0.1.2)
102
+ avm (~> 0.35, >= 0.35.1)
103
+ avm-eac_webapp_base0 (~> 0.4)
104
+ eac_ruby_utils (~> 0.98)
105
105
 
106
106
  PATH
107
107
  remote: sub/avm-tools
108
108
  specs:
109
- avm-tools (0.132.1)
109
+ avm-tools (0.133.0)
110
110
  aranha-parsers (~> 0.14, >= 0.14.1)
111
- avm (~> 0.35, >= 0.35.1)
112
- avm-eac_ruby_base1 (~> 0.19)
111
+ avm (~> 0.37)
112
+ avm-eac_ruby_base1 (~> 0.19, >= 0.19.1)
113
113
  avm-eac_ubuntu_base0 (~> 0.3)
114
114
  avm-files (~> 0.3, >= 0.3.2)
115
115
  avm-git (~> 0.4)
116
116
  clipboard (~> 1.3, >= 1.3.6)
117
117
  curb (~> 0.9, >= 0.9.11)
118
- eac_git (~> 0.12, >= 0.12.1)
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
121
  git (~> 1.11)
@@ -124,12 +124,12 @@ PATH
124
124
  PATH
125
125
  remote: sub/avm
126
126
  specs:
127
- avm (0.35.1)
127
+ avm (0.38.0)
128
128
  eac_cli (~> 0.27, >= 0.27.8)
129
- eac_config (~> 0.10)
129
+ eac_config (~> 0.11)
130
130
  eac_docker (~> 0.4, >= 0.4.2)
131
- eac_git (~> 0.12, >= 0.12.1)
132
- eac_ruby_utils (~> 0.98)
131
+ eac_git (~> 0.12, >= 0.12.2)
132
+ eac_ruby_utils (~> 0.100)
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.10.0)
150
- addressable
151
- eac_ruby_utils (~> 0.97)
149
+ eac_config (0.11.0)
150
+ addressable (~> 2.8)
151
+ eac_ruby_utils (~> 0.100)
152
152
 
153
153
  PATH
154
154
  remote: sub/eac_docker
@@ -177,7 +177,7 @@ PATH
177
177
  PATH
178
178
  remote: sub/eac_ruby_utils
179
179
  specs:
180
- eac_ruby_utils (0.98.0)
180
+ eac_ruby_utils (0.100.0)
181
181
  activesupport (>= 4, < 7)
182
182
  addressable (~> 2.6)
183
183
  bundler
@@ -229,7 +229,7 @@ GEM
229
229
  parslet (~> 2.0)
230
230
  curb (0.9.11)
231
231
  diff-lcs (1.5.0)
232
- eac_git (0.12.1)
232
+ eac_git (0.12.2)
233
233
  eac_ruby_utils (~> 0.83)
234
234
  parseconfig (~> 1.0, >= 1.0.8)
235
235
  eac_rest (0.6.1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.22.0'
4
+ VERSION = '0.24.1'
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.10'
16
+ s.add_dependency 'eac_config', '~> 0.11'
17
17
  s.add_dependency 'eac_docker', '~> 0.4', '>= 0.4.2'
18
- s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.1'
19
- s.add_dependency 'eac_ruby_utils', '~> 0.98'
18
+ s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.2'
19
+ s.add_dependency 'eac_ruby_utils', '~> 0.100'
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'
@@ -0,0 +1,55 @@
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
+ 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
15
+
16
+ def inherited_result
17
+ entries_provider.inherited_entry_value(
18
+ id_entry_path.to_string,
19
+ component_entry_path.to_string
20
+ )
21
+ end
22
+
23
+ # @return [EacConfig::EntryPath]
24
+ def id_entry_path
25
+ root_entry_path + %w[id]
26
+ end
27
+
28
+ # @return [String, nil]
29
+ 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
36
+ end
37
+
38
+ # @return [EacConfig::EntryPath]
39
+ def root_entry_path
40
+ component_entry_path[0..-2]
41
+ end
42
+
43
+ # @return [Avm::Entries::Entry]
44
+ def url_entry
45
+ entries_provider.entry((root_entry_path + %w[url]).to_string)
46
+ end
47
+
48
+ # @return [String]
49
+ def component
50
+ component_entry_path.last
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -6,6 +6,8 @@ require 'avm/entries/entry'
6
6
  module Avm
7
7
  module Entries
8
8
  module Base
9
+ require_sub __FILE__, require_dependency: true
10
+
9
11
  def entries_provider_id
10
12
  id
11
13
  end
@@ -10,7 +10,16 @@ module Avm
10
10
  common_constructor :parent, :suffix, :options
11
11
 
12
12
  def auto_value
13
- ::Avm::Entries::AutoValues::Entry.new(parent, suffix).value
13
+ auto_value_entry.value
14
+ end
15
+
16
+ def auto_value_entry
17
+ @auto_value_entry ||= ::Avm::Entries::AutoValues::Entry.new(parent, suffix)
18
+ end
19
+
20
+ # @return [Boolean]
21
+ def context_found?
22
+ context_entry.found?
14
23
  end
15
24
 
16
25
  def full_path
@@ -42,6 +42,10 @@ module Avm
42
42
 
43
43
  common_constructor :data, default: [{}]
44
44
 
45
+ def avm_field_get(avm_field)
46
+ field_get(translate_field(avm_field))
47
+ end
48
+
45
49
  def field_get(name)
46
50
  data[name.to_sym].if_present(&:to_s)
47
51
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/entries/uri_builder'
3
4
  require 'avm/instances/entry_keys'
4
5
 
5
6
  module Avm
@@ -13,19 +14,10 @@ module Avm
13
14
  read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
14
15
  end
15
16
 
16
- def auto_install_hostname
17
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
18
- ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME)
19
- end
20
-
21
- def auto_install_port
22
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
23
- ::Avm::Instances::EntryKeys::INSTALL_PORT) || 22
24
- end
25
-
26
- def auto_install_username
27
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
28
- ::Avm::Instances::EntryKeys::INSTALL_USERNAME)
17
+ ::Avm::Entries::UriBuilder::ENTRIES_FIELDS.each do |component|
18
+ define_method "auto_install_#{component}" do
19
+ uri_component_entry_value("install.#{component}")
20
+ end
29
21
  end
30
22
 
31
23
  def auto_install_url
@@ -53,7 +53,7 @@ module Avm
53
53
  def host_env_uncached
54
54
  install_uri = entry(::Avm::Instances::EntryKeys::INSTALL_URL).value.to_uri
55
55
  case install_uri.scheme
56
- when 'local' then ::EacRubyUtils::Envs.local
56
+ when 'file' then ::EacRubyUtils::Envs.local
57
57
  when 'ssh' then ::EacRubyUtils::Envs.ssh(install_uri)
58
58
  else raise("Unmapped access value: \"#{install_uri}\"")
59
59
  end
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/entries/uri_builder'
3
4
  require 'eac_ruby_utils/core_ext'
4
5
 
5
6
  module Avm
6
7
  module Instances
7
8
  module EntryKeys
8
- URI_FIELDS = %i[fragment hostname password path port query scheme url username].freeze
9
+ URI_FIELDS = ::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[url]
9
10
 
10
11
  class << self
11
12
  def all
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/applications/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Sources
8
+ class Base
9
+ module Application
10
+ APPLICATION_NAME_KEY = 'application'
11
+
12
+ # @return [Avm::Applications::Base]
13
+ def application
14
+ @application ||= ::Avm::Applications::Base.new(application_id)
15
+ end
16
+
17
+ # @return [String]
18
+ def application_id
19
+ application_id_by_configuration || application_id_by_directory
20
+ end
21
+
22
+ # @return [String, nil]
23
+ def application_id_by_configuration
24
+ configuration.entry(APPLICATION_NAME_KEY).value
25
+ end
26
+
27
+ # @return [String]
28
+ def application_id_by_directory
29
+ path.basename.to_path
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -24,6 +24,8 @@ module Avm
24
24
 
25
25
  # @return [EacRubyUtils::Envs::Command, nil]
26
26
  def configuration_value_to_env_command(value)
27
+ return value if value.is_a?(::EacRubyUtils::Envs::Command)
28
+
27
29
  configuration_value_to_shell_words(value).if_present { |v| env.command(v).chdir(path) }
28
30
  end
29
31
 
@@ -57,7 +57,7 @@ module Avm
57
57
 
58
58
  def configured_enumerable_value_as_test_commands(value)
59
59
  configured_hash_value_as_test_commands(
60
- value.each_with_index.map { |v| ["test_#{v[1]}", v[0]] }.to_h
60
+ value.each_with_index.map { |v, i| ["test_#{i}", v] }.to_h
61
61
  )
62
62
  end
63
63
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.35.1'
4
+ VERSION = '0.38.0'
5
5
  end
@@ -57,6 +57,22 @@ RSpec.describe ::Avm::Instances::Base do
57
57
  ::Avm::Instances::EntryKeys::INSTALL_GROUPNAME => 'group4',
58
58
  ::Avm::Instances::EntryKeys::INSTALL_URL => 'ssh://user4@host4.net'
59
59
  },
60
+ 'app_5' => {
61
+ ::Avm::Instances::EntryKeys::INSTALL_SCHEME => 'ssh',
62
+ ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'host5.net',
63
+ ::Avm::Instances::EntryKeys::INSTALL_PORT => '2222',
64
+ ::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'user5',
65
+ ::Avm::Instances::EntryKeys::INSTALL_PASSWORD => 'passwd5',
66
+ ::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5'
67
+ },
68
+ 'app_6' => {
69
+ ::Avm::Instances::EntryKeys::INSTALL_SCHEME => 'ssh',
70
+ ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'host5.net',
71
+ ::Avm::Instances::EntryKeys::INSTALL_PORT => '2222',
72
+ ::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'user5',
73
+ ::Avm::Instances::EntryKeys::INSTALL_PASSWORD => 'passwd5',
74
+ ::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5'
75
+ },
60
76
  'mailer_0' => {
61
77
  ::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
62
78
  ::Avm::Instances::EntryKeys::MAILER_REPLY_TO => '',
@@ -28,6 +28,12 @@ app_4:
28
28
  username: user4
29
29
  hostname: host4.net
30
30
  groupname: group4
31
+ app_5:
32
+ install:
33
+ url: ssh://user5:passwd5@host5.net:2222/path/to/app5
34
+ app_6:
35
+ install:
36
+ id: app_5
31
37
  mailer_0:
32
38
  mailer:
33
39
  from: 'noreply@example.net'
@@ -12,11 +12,11 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.12'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.2'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.63'
18
- s.add_dependency 'os'
19
- s.add_dependency 'rouge', '~> 3.26'
15
+ s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.17'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.4'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.98'
18
+ s.add_dependency 'os', '~> 1.1', '>= 1.1.4'
19
+ s.add_dependency 'rouge', '~> 3.30'
20
20
 
21
21
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
22
22
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/instances/base'
4
+
5
+ module Avm
6
+ module EacAsciidoctorBase0
7
+ module Instances
8
+ class Base < ::Avm::EacWebappBase0::Instances::Base
9
+ FILES_UNITS = {}.freeze
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacAsciidoctorBase0
7
+ module Instances
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacAsciidoctorBase0
5
- VERSION = '0.4.0'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  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.34'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.3', '>= 0.3.1'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.97'
15
+ s.add_dependency 'avm', '~> 0.35', '>= 0.35.1'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.4'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.98'
18
18
 
19
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
20
20
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_webapp_base0/instance'
3
+ require 'avm/eac_webapp_base0/instances/base'
4
4
 
5
5
  module Avm
6
6
  module EacLatexBase0
7
7
  module Instances
8
- class Base < ::Avm::EacWebappBase0::Instance
8
+ class Base < ::Avm::EacWebappBase0::Instances::Base
9
9
  FILES_UNITS = {}.freeze
10
10
  end
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacLatexBase0
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
@@ -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.4', '>= 0.4.2'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.97'
15
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.5'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.98'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
19
19
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/instances/base'
4
+
5
+ module Avm
6
+ module EacRailsBase0
7
+ module Instances
8
+ class Base < ::Avm::EacRailsBase1::Instances::Base
9
+ FILES_UNITS = { uploads: 'public/uploads' }.freeze
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRailsBase0
7
+ module Instances
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_rails_base0/instance'
3
+ require 'avm/eac_rails_base0/instances/base'
4
4
  require 'avm/eac_rails_base0/deploy'
5
5
  require 'avm/eac_rails_base0/apache_host'
6
6
  require 'avm/eac_rails_base0/apache_path'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.6.1'
5
+ VERSION = '0.7.0'
6
6
  end
7
7
  end