eac_tools 0.45.2 → 0.47.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +42 -36
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/lib/avm/data/callbacks.rb +37 -0
  5. data/sub/avm/lib/avm/data/package.rb +15 -7
  6. data/sub/avm/lib/avm/data/unit.rb +2 -23
  7. data/sub/avm/lib/avm/instances/base/auto_values/data.rb +1 -1
  8. data/sub/avm/lib/avm/instances/data/files_unit.rb +55 -0
  9. data/sub/avm/lib/avm/{data/instance → instances/data}/package.rb +2 -2
  10. data/sub/avm/lib/avm/instances/data/unit.rb +14 -0
  11. data/sub/avm/lib/avm/instances/data.rb +11 -0
  12. data/sub/avm/lib/avm/version.rb +1 -1
  13. data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +3 -2
  14. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/instances/base.rb +14 -0
  15. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/instances.rb +11 -0
  16. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/source_generators/base.rb +28 -0
  17. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/source_generators.rb +11 -0
  18. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/sources/base.rb +17 -0
  19. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/sources.rb +11 -0
  20. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +1 -1
  21. data/sub/avm-eac_php_base0/spec/lib/avm/eac_php_base0/source_generators/base_spec.rb +8 -0
  22. data/sub/avm-eac_php_base0/spec/lib/avm/eac_php_base0/source_generators/base_spec_files/no_options/index.php +0 -0
  23. data/sub/avm-eac_php_base0/spec/lib/avm/eac_php_base0/sources/base_spec.rb +7 -0
  24. data/sub/avm-eac_php_base0/template/avm/eac_php_base0/source_generators/base/index.php +0 -0
  25. data/sub/avm-eac_postgresql_base0/Gemfile +5 -0
  26. data/sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec +19 -0
  27. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/assert.rb +77 -0
  28. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +39 -0
  29. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance.rb +74 -0
  30. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance_with.rb +18 -0
  31. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +7 -0
  32. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb +9 -0
  33. data/sub/avm-eac_postgresql_base0/spec/rubocop_spec.rb +3 -0
  34. data/sub/avm-eac_postgresql_base0/spec/spec_helper.rb +4 -0
  35. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +4 -4
  36. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  37. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
  38. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/files.rb +22 -0
  39. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +11 -0
  40. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/install.rb +37 -0
  41. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +3 -9
  42. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_package.rb +23 -0
  43. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +1 -19
  44. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  45. data/sub/avm-eac_redmine_plugin_base0/avm-eac_redmine_plugin_base0.gemspec +2 -2
  46. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/init.rb +27 -0
  47. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/parent.rb +31 -0
  48. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/rubocop.rb +29 -0
  49. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/version.rb +31 -0
  50. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base.rb +2 -36
  51. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/init_file.rb +43 -0
  52. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/version.rb +1 -1
  53. data/sub/avm-eac_redmine_plugin_base0/spec/lib/avm/eac_redmine_plugin_base0/sources/init_file_spec.rb +14 -0
  54. data/sub/avm-eac_redmine_plugin_base0/spec/lib/avm/eac_redmine_plugin_base0/sources/init_file_spec_files/a_init_file.rb +12 -0
  55. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +3 -3
  56. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +4 -4
  57. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  58. data/sub/avm-git/avm-git.gemspec +3 -3
  59. data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +1 -1
  60. data/sub/avm-git/lib/avm/git/version.rb +1 -1
  61. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/append_command_options.rb +38 -0
  62. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/concat.rb +17 -2
  63. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/debugging.rb +19 -0
  64. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/envvars.rb +3 -0
  65. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/execution.rb +52 -0
  66. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +28 -84
  67. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/{command/exec_error.rb → execution_error.rb} +1 -3
  68. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/execution_result.rb +45 -0
  69. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  70. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command_spec.rb +93 -0
  71. metadata +61 -39
  72. data/sub/avm/lib/avm/data/instance/files_unit.rb +0 -41
  73. data/sub/avm/lib/avm/data/instance/unit.rb +0 -17
  74. data/sub/avm/lib/avm/data/instance.rb +0 -11
  75. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_unit.rb +0 -53
  76. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/execute_result.rb +0 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5895138920c46d129b675b1e7f264baae15f265aaceac01b77ec06c519b0b92
4
- data.tar.gz: 4c1abea1083c04b96cacac8e9cf12b5bb3a688ac22bccdcf400c23b50eed7dc0
3
+ metadata.gz: 3418d6903a368e33472395b53a332d45ba663fef893c5e657f68ccb5bfc22c17
4
+ data.tar.gz: 53b2d9b4c6a88ae9371176752c14bcaa623537f685f9400080c61ec274cee36e
5
5
  SHA512:
6
- metadata.gz: be4d60eb73a687e391c59ef23d7c0ff8845c49a6c6f5cd80f70019339f07673a8ce9597a7c8b4c79ff4e8dbb978702229eee24a13bc077268f1cf6bcb91eb316
7
- data.tar.gz: 8728eae853dc90dace706b001f144caf36885871c208f8a4f9786bc730939aff3cbf2d9838ac2fe0b4738827489a9d463c1c23c9d2b1c212e11ccaf504fcc93c
6
+ metadata.gz: 37e4b8af6160ac8056ad0c724639b304260ce2c4b47fb405488a8fa529d01d3535264b0b28a06bff17f4adfd62eb47253f4d81c20e52e77637100ff05937aa05
7
+ data.tar.gz: 1c72ca7d308189e28abc9bd8b1f01ff7d02a74841bffe80374f43fd9da5be792c6c90fce48ceef451bff95f56117fe95f5dde5d3869393696d2d8ae4dece2edf
data/Gemfile.lock CHANGED
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.45.2)
5
- avm (~> 0.56, >= 0.56.1)
4
+ eac_tools (0.47.0)
5
+ avm (~> 0.58)
6
6
  avm-eac_asciidoctor_base0 (~> 0.12)
7
7
  avm-eac_generic_base0 (~> 0.8)
8
8
  avm-eac_latex_base0 (~> 0.3)
9
- avm-eac_php_base0 (~> 0.3)
9
+ avm-eac_php_base0 (~> 0.4)
10
10
  avm-eac_rails_base0 (~> 0.8, >= 0.8.1)
11
- avm-eac_rails_base1 (~> 0.7)
12
- avm-eac_redmine_base0 (~> 0.16, >= 0.16.1)
13
- avm-eac_redmine_plugin_base0 (~> 0.3)
11
+ avm-eac_rails_base1 (~> 0.7, >= 0.7.1)
12
+ avm-eac_redmine_base0 (~> 0.17)
13
+ avm-eac_redmine_plugin_base0 (~> 0.4)
14
14
  avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
15
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.2)
15
+ avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
16
16
  avm-eac_wordpress_base0 (~> 0.2, >= 0.2.1)
17
17
  avm-tools (~> 0.142, >= 0.142.6)
18
- eac_ruby_utils (~> 0.107, >= 0.107.1)
18
+ eac_ruby_utils (~> 0.108)
19
19
 
20
20
  PATH
21
21
  remote: sub/aranha-parsers
@@ -58,9 +58,17 @@ PATH
58
58
  PATH
59
59
  remote: sub/avm-eac_php_base0
60
60
  specs:
61
- avm-eac_php_base0 (0.3.0)
62
- avm-eac_generic_base0 (~> 0.7)
63
- eac_ruby_utils (~> 0.106)
61
+ avm-eac_php_base0 (0.4.0)
62
+ avm-eac_generic_base0 (~> 0.8)
63
+ avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
64
+ eac_ruby_utils (~> 0.108)
65
+
66
+ PATH
67
+ remote: sub/avm-eac_postgresql_base0
68
+ specs:
69
+ avm-eac_postgresql_base0 (0.2.1)
70
+ avm (~> 0.56, >= 0.56.1)
71
+ eac_ruby_utils (~> 0.107, >= 0.107.1)
64
72
 
65
73
  PATH
66
74
  remote: sub/avm-eac_python_base0
@@ -79,19 +87,19 @@ PATH
79
87
  PATH
80
88
  remote: sub/avm-eac_rails_base1
81
89
  specs:
82
- avm-eac_rails_base1 (0.7.0)
83
- avm (~> 0.45)
84
- avm-eac_ruby_base1 (~> 0.21)
85
- avm-eac_webapp_base0 (~> 0.9)
86
- eac_ruby_utils (~> 0.104)
90
+ avm-eac_rails_base1 (0.7.1)
91
+ avm (~> 0.57)
92
+ avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
93
+ avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
94
+ eac_ruby_utils (~> 0.107, >= 0.107.1)
87
95
 
88
96
  PATH
89
97
  remote: sub/avm-eac_redmine_base0
90
98
  specs:
91
- avm-eac_redmine_base0 (0.16.1)
92
- avm (~> 0.56, >= 0.56.1)
99
+ avm-eac_redmine_base0 (0.17.0)
100
+ avm (~> 0.57)
93
101
  avm-eac_generic_base0 (~> 0.8)
94
- avm-eac_rails_base1 (~> 0.7)
102
+ avm-eac_rails_base1 (~> 0.7, >= 0.7.1)
95
103
  avm-eac_ubuntu_base0 (~> 0.3)
96
104
  curb (~> 0.9, >= 0.9.11)
97
105
  eac_fs (~> 0.15)
@@ -101,9 +109,9 @@ PATH
101
109
  PATH
102
110
  remote: sub/avm-eac_redmine_plugin_base0
103
111
  specs:
104
- avm-eac_redmine_plugin_base0 (0.3.0)
105
- avm-eac_ruby_base1 (~> 0.11)
106
- eac_ruby_utils (~> 0.95, >= 0.95.1)
112
+ avm-eac_redmine_plugin_base0 (0.4.0)
113
+ avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
114
+ eac_ruby_utils (~> 0.107, >= 0.107.1)
107
115
 
108
116
  PATH
109
117
  remote: sub/avm-eac_ruby_base1
@@ -116,13 +124,13 @@ PATH
116
124
  PATH
117
125
  remote: sub/avm-eac_webapp_base0
118
126
  specs:
119
- avm-eac_webapp_base0 (0.12.2)
120
- avm (~> 0.54)
127
+ avm-eac_webapp_base0 (0.12.3)
128
+ avm (~> 0.57)
121
129
  avm-eac_generic_base0 (~> 0.8)
122
- avm-eac_postgresql_base0 (~> 0.2)
130
+ avm-eac_postgresql_base0 (~> 0.2, >= 0.2.1)
123
131
  avm-eac_ubuntu_base0 (~> 0.3)
124
132
  avm-files (~> 0.6)
125
- eac_ruby_utils (~> 0.106, >= 0.106.1)
133
+ eac_ruby_utils (~> 0.107, >= 0.107.1)
126
134
 
127
135
  PATH
128
136
  remote: sub/avm-eac_wordpress_base0
@@ -145,11 +153,11 @@ PATH
145
153
  PATH
146
154
  remote: sub/avm-git
147
155
  specs:
148
- avm-git (0.10.0)
149
- avm (~> 0.54)
156
+ avm-git (0.10.1)
157
+ avm (~> 0.57)
150
158
  avm-files (~> 0.6)
151
- eac_git (~> 0.13)
152
- eac_ruby_utils (~> 0.106, >= 0.106.1)
159
+ eac_git (~> 0.14)
160
+ eac_ruby_utils (~> 0.108)
153
161
  git (~> 1.12)
154
162
 
155
163
  PATH
@@ -173,7 +181,7 @@ PATH
173
181
  PATH
174
182
  remote: sub/avm
175
183
  specs:
176
- avm (0.56.1)
184
+ avm (0.57.0)
177
185
  aranha-parsers (~> 0.14, >= 0.14.4)
178
186
  eac_cli (~> 0.30)
179
187
  eac_config (~> 0.12)
@@ -235,7 +243,7 @@ PATH
235
243
  PATH
236
244
  remote: sub/eac_ruby_utils
237
245
  specs:
238
- eac_ruby_utils (0.107.1)
246
+ eac_ruby_utils (0.108.0)
239
247
  activesupport (>= 4, < 7)
240
248
  addressable (~> 2.8, >= 2.8.1)
241
249
  bundler
@@ -255,9 +263,6 @@ GEM
255
263
  public_suffix (>= 2.0.2, < 6.0)
256
264
  asciidoctor (2.0.18)
257
265
  ast (2.4.2)
258
- avm-eac_postgresql_base0 (0.2.0)
259
- avm (~> 0.12, >= 0.12.1)
260
- eac_ruby_utils (~> 0.82)
261
266
  avm-eac_ubuntu_base0 (0.3.0)
262
267
  avm (~> 0.7)
263
268
  eac_ruby_utils (~> 0.77, >= 0.77.1)
@@ -333,7 +338,7 @@ GEM
333
338
  parslet (2.0.0)
334
339
  public_suffix (5.0.0)
335
340
  racc (1.6.0)
336
- rack (3.0.0)
341
+ rack (3.0.1)
337
342
  rainbow (3.1.1)
338
343
  rchardet (1.8.0)
339
344
  rexml (3.2.5)
@@ -383,6 +388,7 @@ DEPENDENCIES
383
388
  avm-eac_generic_base0!
384
389
  avm-eac_latex_base0!
385
390
  avm-eac_php_base0!
391
+ avm-eac_postgresql_base0!
386
392
  avm-eac_python_base0!
387
393
  avm-eac_rails_base0!
388
394
  avm-eac_rails_base1!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.45.2'
4
+ VERSION = '0.47.0'
5
5
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/callbacks'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Data
8
+ module Callbacks
9
+ common_concern do
10
+ include ::ActiveSupport::Callbacks
11
+
12
+ %i[dump load].each do |action|
13
+ define_callbacks action
14
+
15
+ %i[before after].each do |callback|
16
+ method_name = "#{callback}_#{action}"
17
+ singleton_class.class_eval do
18
+ define_method method_name do |callback_method = nil, &block|
19
+ if callback_method
20
+ set_callback action, callback, callback_method
21
+ else
22
+ set_callback action, callback, &block
23
+ end
24
+ self
25
+ end
26
+ end
27
+
28
+ define_method method_name do |callback_method = nil, &block|
29
+ singleton_class.send(method_name, callback_method, &block)
30
+ self
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/data/package/dump'
4
- require 'avm/data/package/load'
3
+ require 'avm/data/callbacks'
4
+ require 'eac_ruby_utils/core_ext'
5
5
 
6
6
  module Avm
7
7
  module Data
8
8
  class Package
9
- attr_reader :units
9
+ require_sub __FILE__
10
+ include ::Avm::Data::Callbacks
10
11
 
11
12
  def initialize(options)
12
- @units = {}
13
13
  options = options.to_options_consumer
14
14
  units = options.consume(:units)
15
15
  options.validate
@@ -19,7 +19,7 @@ module Avm
19
19
  end
20
20
 
21
21
  def add_unit(identifier, unit)
22
- @units[identifier.to_sym] = unit
22
+ units[identifier.to_sym] = unit
23
23
  end
24
24
 
25
25
  def dump(data_path, options = {})
@@ -31,11 +31,19 @@ module Avm
31
31
  end
32
32
 
33
33
  def dump_units_to_directory(directory)
34
- @units.each { |identifier, unit| unit.dump_to_directory(directory, identifier) }
34
+ run_callbacks :dump do
35
+ units.each { |identifier, unit| unit.dump_to_directory(directory, identifier) }
36
+ end
35
37
  end
36
38
 
37
39
  def load_units_from_directory(directory)
38
- @units.each { |identifier, unit| unit.load_from_directory(directory, identifier) }
40
+ run_callbacks :load do
41
+ units.each { |identifier, unit| unit.load_from_directory(directory, identifier) }
42
+ end
43
+ end
44
+
45
+ def units
46
+ @units ||= {}
39
47
  end
40
48
  end
41
49
  end
@@ -1,14 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/data/callbacks'
3
4
  require 'eac_ruby_utils/core_ext'
4
- require 'active_support/callbacks'
5
5
 
6
6
  module Avm
7
7
  module Data
8
8
  class Unit
9
- include ::ActiveSupport::Callbacks
9
+ include ::Avm::Data::Callbacks
10
10
 
11
- define_callbacks :dump, :load
12
11
  enable_speaker
13
12
 
14
13
  %w[dump load].each do |action|
@@ -20,26 +19,6 @@ module Avm
20
19
  fail "\\"#{method_name}\\" is a abstract method. Override in #{singleton_class}."
21
20
  end
22
21
  CODE
23
-
24
- # Callbacks
25
- %w[before after].each do |callback|
26
- method = "#{callback}_#{action}"
27
- class_eval <<~CODE, __FILE__, __LINE__ + 1
28
- def self.#{method}(callback_method = nil, &block)
29
- if callback_method
30
- set_callback :#{action}, :#{callback}, callback_method
31
- else
32
- set_callback :#{action}, :#{callback}, &block
33
- end
34
- self
35
- end
36
-
37
- def #{method}(callback_method = nil, &block)
38
- singleton_class.#{method}(callback_method, &block)
39
- self
40
- end
41
- CODE
42
- end
43
22
  end
44
23
 
45
24
  def extension
@@ -15,7 +15,7 @@ module Avm
15
15
  .if_present do |v|
16
16
  ::File.join(
17
17
  v,
18
- "#{id}#{::Avm::Data::Instance::Package::Dump::DEFAULT_FILE_EXTENSION}"
18
+ "#{id}#{::Avm::Instances::Data::Package::Dump::DEFAULT_FILE_EXTENSION}"
19
19
  )
20
20
  end
21
21
  end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/instances/data/unit'
4
+
5
+ module Avm
6
+ module Instances
7
+ module Data
8
+ class FilesUnit < ::Avm::Instances::Data::Unit
9
+ EXTENSION = '.tar.gz'
10
+
11
+ enable_listable
12
+ lists.add_symbol :option, :sudo_user
13
+
14
+ common_constructor :instance, :fs_path_subpath, :options, default: [{}],
15
+ super_args: -> { [instance] } do
16
+ self.fs_path_subpath = fs_path_subpath.to_pathname
17
+ self.options = self.class.lists.option.hash_keys_validate!(options)
18
+ end
19
+
20
+ before_load :clear_files
21
+
22
+ # @return [Pathname]
23
+ def files_path
24
+ fs_path_subpath
25
+ .expand_path(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH))
26
+ end
27
+
28
+ def dump_command
29
+ instance_command('tar', '-czf', '-', '-C', files_path, '.')
30
+ end
31
+
32
+ def load_command
33
+ instance_command('tar', '-xzf', '-', '-C', files_path)
34
+ end
35
+
36
+ def clear_files
37
+ infom "Removing all files under #{files_path}..."
38
+ instance_command('mkdir', '-p', files_path).execute!
39
+ instance_command('find', files_path, '-mindepth', 1, '-delete').execute!
40
+ end
41
+
42
+ # @return [EacRubyUtils::Envs::Command]
43
+ def instance_command(*args)
44
+ args = ['sudo', '-Hu', sudo_user] + args if sudo_user.present?
45
+ instance.host_env.command(*args)
46
+ end
47
+
48
+ # @return [String, nil]
49
+ def sudo_user
50
+ options[OPTION_SUDO_USER]
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -3,8 +3,8 @@
3
3
  require 'avm/data/package'
4
4
 
5
5
  module Avm
6
- module Data
7
- module Instance
6
+ module Instances
7
+ module Data
8
8
  class Package < ::Avm::Data::Package
9
9
  attr_reader :instance
10
10
 
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/data/unit'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Instances
8
+ module Data
9
+ class Unit < ::Avm::Data::Unit
10
+ common_constructor :instance
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Instances
7
+ module Data
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.56.1'
4
+ VERSION = '0.57.0'
5
5
  end
@@ -12,8 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_generic_base0', '~> 0.7'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.106'
15
+ s.add_dependency 'avm-eac_generic_base0', '~> 0.8'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.12', '>= 0.12.3'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.108'
17
18
 
18
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
19
20
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/instances/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacPhpBase0
8
+ module Instances
9
+ class Base < ::Avm::EacWebappBase0::Instances::Base
10
+ FILES_UNITS = {}.freeze
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacPhpBase0
7
+ module Instances
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/source_generators/base'
4
+ require 'eac_templates/core_ext'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacPhpBase0
9
+ module SourceGenerators
10
+ class Base < ::Avm::SourceGenerators::Base
11
+ OPTIONS = {}.freeze
12
+
13
+ enable_speaker
14
+ enable_simple_cache
15
+
16
+ class << self
17
+ def option_list
18
+ OPTIONS.inject(super) { |a, e| a.option(*e) }
19
+ end
20
+ end
21
+
22
+ def perform
23
+ template.apply(self, target_path)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacPhpBase0
7
+ module SourceGenerators
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/sources/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacPhpBase0
8
+ module Sources
9
+ class Base < ::Avm::EacWebappBase0::Sources::Base
10
+ # @return [Boolean]
11
+ def valid?
12
+ path.glob('*.php').any?(&:file?)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacPhpBase0
7
+ module Sources
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacPhpBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_php_base0/source_generators/base'
4
+ require 'avm/source_generators/runner'
5
+
6
+ RSpec.describe ::Avm::EacPhpBase0::SourceGenerators::Base do
7
+ include_examples 'avm_source_generated', __FILE__, 'EacPhpBase0'
8
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_php_base0/sources/base'
4
+
5
+ ::RSpec.describe ::Avm::EacPhpBase0::Sources::Base do
6
+ include_examples 'in_avm_registry', 'sources'
7
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ require 'avm/eac_postgresql_base0/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'avm-eac_postgresql_base0'
9
+ s.version = Avm::EacPostgresqlBase0::VERSION
10
+ s.authors = ['Put here the authors']
11
+ s.summary = 'Put here de description.'
12
+
13
+ s.files = Dir['{lib}/**/*']
14
+
15
+ s.add_dependency 'avm', '~> 0.56', '>= 0.56.1'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.107', '>= 0.107.1'
17
+
18
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
19
+ end