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.
- checksums.yaml +4 -4
- data/Gemfile.lock +42 -36
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/data/callbacks.rb +37 -0
- data/sub/avm/lib/avm/data/package.rb +15 -7
- data/sub/avm/lib/avm/data/unit.rb +2 -23
- data/sub/avm/lib/avm/instances/base/auto_values/data.rb +1 -1
- data/sub/avm/lib/avm/instances/data/files_unit.rb +55 -0
- data/sub/avm/lib/avm/{data/instance → instances/data}/package.rb +2 -2
- data/sub/avm/lib/avm/instances/data/unit.rb +14 -0
- data/sub/avm/lib/avm/instances/data.rb +11 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +3 -2
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/instances/base.rb +14 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/instances.rb +11 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/source_generators/base.rb +28 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/source_generators.rb +11 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/sources/base.rb +17 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/sources.rb +11 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +1 -1
- data/sub/avm-eac_php_base0/spec/lib/avm/eac_php_base0/source_generators/base_spec.rb +8 -0
- data/sub/avm-eac_php_base0/spec/lib/avm/eac_php_base0/source_generators/base_spec_files/no_options/index.php +0 -0
- data/sub/avm-eac_php_base0/spec/lib/avm/eac_php_base0/sources/base_spec.rb +7 -0
- data/sub/avm-eac_php_base0/template/avm/eac_php_base0/source_generators/base/index.php +0 -0
- data/sub/avm-eac_postgresql_base0/Gemfile +5 -0
- data/sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec +19 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/assert.rb +77 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +39 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance.rb +74 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance_with.rb +18 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +7 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb +9 -0
- data/sub/avm-eac_postgresql_base0/spec/rubocop_spec.rb +3 -0
- data/sub/avm-eac_postgresql_base0/spec/spec_helper.rb +4 -0
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +4 -4
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/files.rb +22 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +11 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/install.rb +37 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +3 -9
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_package.rb +23 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +1 -19
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_plugin_base0/avm-eac_redmine_plugin_base0.gemspec +2 -2
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/init.rb +27 -0
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/parent.rb +31 -0
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/rubocop.rb +29 -0
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/version.rb +31 -0
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base.rb +2 -36
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/init_file.rb +43 -0
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_plugin_base0/spec/lib/avm/eac_redmine_plugin_base0/sources/init_file_spec.rb +14 -0
- 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
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +3 -3
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +4 -4
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-git/avm-git.gemspec +3 -3
- data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +1 -1
- data/sub/avm-git/lib/avm/git/version.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/append_command_options.rb +38 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/concat.rb +17 -2
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/debugging.rb +19 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/envvars.rb +3 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/execution.rb +52 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +28 -84
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/{command/exec_error.rb → execution_error.rb} +1 -3
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/execution_result.rb +45 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command_spec.rb +93 -0
- metadata +61 -39
- data/sub/avm/lib/avm/data/instance/files_unit.rb +0 -41
- data/sub/avm/lib/avm/data/instance/unit.rb +0 -17
- data/sub/avm/lib/avm/data/instance.rb +0 -11
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_unit.rb +0 -53
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3418d6903a368e33472395b53a332d45ba663fef893c5e657f68ccb5bfc22c17
|
4
|
+
data.tar.gz: 53b2d9b4c6a88ae9371176752c14bcaa623537f685f9400080c61ec274cee36e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
5
|
-
avm (~> 0.
|
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.
|
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.
|
13
|
-
avm-eac_redmine_plugin_base0 (~> 0.
|
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.
|
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.
|
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.
|
62
|
-
avm-eac_generic_base0 (~> 0.
|
63
|
-
|
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.
|
83
|
-
avm (~> 0.
|
84
|
-
avm-eac_ruby_base1 (~> 0.
|
85
|
-
avm-eac_webapp_base0 (~> 0.
|
86
|
-
eac_ruby_utils (~> 0.
|
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.
|
92
|
-
avm (~> 0.
|
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.
|
105
|
-
avm-eac_ruby_base1 (~> 0.
|
106
|
-
eac_ruby_utils (~> 0.
|
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.
|
120
|
-
avm (~> 0.
|
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.
|
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.
|
149
|
-
avm (~> 0.
|
156
|
+
avm-git (0.10.1)
|
157
|
+
avm (~> 0.57)
|
150
158
|
avm-files (~> 0.6)
|
151
|
-
eac_git (~> 0.
|
152
|
-
eac_ruby_utils (~> 0.
|
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.
|
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.
|
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.
|
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!
|
data/lib/eac_tools/version.rb
CHANGED
@@ -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/
|
4
|
-
require '
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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 ::
|
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
|
@@ -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
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -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.
|
16
|
-
s.add_dependency '
|
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,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,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
|
File without changes
|
File without changes
|
@@ -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
|