eac_tools 0.45.1 → 0.46.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 +35 -30
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +2 -2
- 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/entries/uri_builder.rb +3 -1
- 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/spec/lib/avm/instances/base_spec.rb +3 -1
- data/sub/avm/spec/lib/avm/instances/base_spec_files/config.yml +2 -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 +5 -5
- 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_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +2 -2
- 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
- metadata +41 -15
- 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
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.46.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.57'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.57'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: avm-eac_asciidoctor_base0
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,6 +107,9 @@ dependencies:
|
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0.7'
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 0.7.1
|
110
113
|
type: :runtime
|
111
114
|
prerelease: false
|
112
115
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -114,34 +117,37 @@ dependencies:
|
|
114
117
|
- - "~>"
|
115
118
|
- !ruby/object:Gem::Version
|
116
119
|
version: '0.7'
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 0.7.1
|
117
123
|
- !ruby/object:Gem::Dependency
|
118
124
|
name: avm-eac_redmine_base0
|
119
125
|
requirement: !ruby/object:Gem::Requirement
|
120
126
|
requirements:
|
121
127
|
- - "~>"
|
122
128
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0.
|
129
|
+
version: '0.17'
|
124
130
|
type: :runtime
|
125
131
|
prerelease: false
|
126
132
|
version_requirements: !ruby/object:Gem::Requirement
|
127
133
|
requirements:
|
128
134
|
- - "~>"
|
129
135
|
- !ruby/object:Gem::Version
|
130
|
-
version: '0.
|
136
|
+
version: '0.17'
|
131
137
|
- !ruby/object:Gem::Dependency
|
132
138
|
name: avm-eac_redmine_plugin_base0
|
133
139
|
requirement: !ruby/object:Gem::Requirement
|
134
140
|
requirements:
|
135
141
|
- - "~>"
|
136
142
|
- !ruby/object:Gem::Version
|
137
|
-
version: '0.
|
143
|
+
version: '0.4'
|
138
144
|
type: :runtime
|
139
145
|
prerelease: false
|
140
146
|
version_requirements: !ruby/object:Gem::Requirement
|
141
147
|
requirements:
|
142
148
|
- - "~>"
|
143
149
|
- !ruby/object:Gem::Version
|
144
|
-
version: '0.
|
150
|
+
version: '0.4'
|
145
151
|
- !ruby/object:Gem::Dependency
|
146
152
|
name: avm-eac_ruby_base1
|
147
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,7 +177,7 @@ dependencies:
|
|
171
177
|
version: '0.12'
|
172
178
|
- - ">="
|
173
179
|
- !ruby/object:Gem::Version
|
174
|
-
version: 0.12.
|
180
|
+
version: 0.12.3
|
175
181
|
type: :runtime
|
176
182
|
prerelease: false
|
177
183
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -181,7 +187,7 @@ dependencies:
|
|
181
187
|
version: '0.12'
|
182
188
|
- - ">="
|
183
189
|
- !ruby/object:Gem::Version
|
184
|
-
version: 0.12.
|
190
|
+
version: 0.12.3
|
185
191
|
- !ruby/object:Gem::Dependency
|
186
192
|
name: avm-eac_wordpress_base0
|
187
193
|
requirement: !ruby/object:Gem::Requirement
|
@@ -426,6 +432,16 @@ files:
|
|
426
432
|
- sub/avm-eac_php_base0/spec/lib/avm/eac_php_base0/file_formats/base_spec_files/php_iso88591_code.php.target
|
427
433
|
- sub/avm-eac_php_base0/spec/rubocop_spec.rb
|
428
434
|
- sub/avm-eac_php_base0/spec/spec_helper.rb
|
435
|
+
- sub/avm-eac_postgresql_base0/Gemfile
|
436
|
+
- sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec
|
437
|
+
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb
|
438
|
+
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance.rb
|
439
|
+
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/assert.rb
|
440
|
+
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb
|
441
|
+
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance_with.rb
|
442
|
+
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb
|
443
|
+
- sub/avm-eac_postgresql_base0/spec/rubocop_spec.rb
|
444
|
+
- sub/avm-eac_postgresql_base0/spec/spec_helper.rb
|
429
445
|
- sub/avm-eac_python_base0/Gemfile
|
430
446
|
- sub/avm-eac_python_base0/avm-eac_python_base0.gemspec
|
431
447
|
- sub/avm-eac_python_base0/lib/avm/eac_python_base0.rb
|
@@ -520,9 +536,11 @@ files:
|
|
520
536
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/apache_host.rb
|
521
537
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb
|
522
538
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/database.rb
|
539
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/files.rb
|
523
540
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb
|
541
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/install.rb
|
524
542
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/web.rb
|
525
|
-
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/
|
543
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_package.rb
|
526
544
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb
|
527
545
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb
|
528
546
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api.rb
|
@@ -558,7 +576,14 @@ files:
|
|
558
576
|
- sub/avm-eac_redmine_plugin_base0/avm-eac_redmine_plugin_base0.gemspec
|
559
577
|
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0.rb
|
560
578
|
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base.rb
|
579
|
+
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/init.rb
|
580
|
+
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/parent.rb
|
581
|
+
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/rubocop.rb
|
582
|
+
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base/version.rb
|
583
|
+
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/init_file.rb
|
561
584
|
- sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/version.rb
|
585
|
+
- sub/avm-eac_redmine_plugin_base0/spec/lib/avm/eac_redmine_plugin_base0/sources/init_file_spec.rb
|
586
|
+
- sub/avm-eac_redmine_plugin_base0/spec/lib/avm/eac_redmine_plugin_base0/sources/init_file_spec_files/a_init_file.rb
|
562
587
|
- sub/avm-eac_redmine_plugin_base0/spec/rubocop_spec.rb
|
563
588
|
- sub/avm-eac_redmine_plugin_base0/spec/spec_helper.rb
|
564
589
|
- sub/avm-eac_ruby_base1/Gemfile
|
@@ -970,10 +995,7 @@ files:
|
|
970
995
|
- sub/avm/lib/avm/applications/base.rb
|
971
996
|
- sub/avm/lib/avm/applications/base/publishing.rb
|
972
997
|
- sub/avm/lib/avm/applications/base/stereotype.rb
|
973
|
-
- sub/avm/lib/avm/data/
|
974
|
-
- sub/avm/lib/avm/data/instance/files_unit.rb
|
975
|
-
- sub/avm/lib/avm/data/instance/package.rb
|
976
|
-
- sub/avm/lib/avm/data/instance/unit.rb
|
998
|
+
- sub/avm/lib/avm/data/callbacks.rb
|
977
999
|
- sub/avm/lib/avm/data/package.rb
|
978
1000
|
- sub/avm/lib/avm/data/package/dump.rb
|
979
1001
|
- sub/avm/lib/avm/data/package/load.rb
|
@@ -1023,6 +1045,10 @@ files:
|
|
1023
1045
|
- sub/avm/lib/avm/instances/base/entry_keys.rb
|
1024
1046
|
- sub/avm/lib/avm/instances/base/install.rb
|
1025
1047
|
- sub/avm/lib/avm/instances/base/web.rb
|
1048
|
+
- sub/avm/lib/avm/instances/data.rb
|
1049
|
+
- sub/avm/lib/avm/instances/data/files_unit.rb
|
1050
|
+
- sub/avm/lib/avm/instances/data/package.rb
|
1051
|
+
- sub/avm/lib/avm/instances/data/unit.rb
|
1026
1052
|
- sub/avm/lib/avm/instances/docker_image.rb
|
1027
1053
|
- sub/avm/lib/avm/instances/entry_keys.rb
|
1028
1054
|
- sub/avm/lib/avm/instances/ids.rb
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/data/instance/unit'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Data
|
7
|
-
module Instance
|
8
|
-
class FilesUnit < ::Avm::Data::Instance::Unit
|
9
|
-
EXTENSION = '.tar.gz'
|
10
|
-
|
11
|
-
attr_reader :fs_path_subpath
|
12
|
-
|
13
|
-
def initialize(instance, fs_path_subpath)
|
14
|
-
super(instance)
|
15
|
-
@fs_path_subpath = fs_path_subpath
|
16
|
-
end
|
17
|
-
|
18
|
-
before_load :clear_files
|
19
|
-
|
20
|
-
def files_path
|
21
|
-
::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
|
22
|
-
fs_path_subpath)
|
23
|
-
end
|
24
|
-
|
25
|
-
def dump_command
|
26
|
-
instance.host_env.command('tar', '-czf', '-', '-C', files_path, '.')
|
27
|
-
end
|
28
|
-
|
29
|
-
def load_command
|
30
|
-
instance.host_env.command('tar', '-xzf', '-', '-C', files_path)
|
31
|
-
end
|
32
|
-
|
33
|
-
def clear_files
|
34
|
-
infom "Removing all files under #{files_path}..."
|
35
|
-
instance.host_env.command('mkdir', '-p', files_path).execute!
|
36
|
-
instance.host_env.command('find', files_path, '-mindepth', 1, '-delete').execute!
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/data/unit'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Data
|
7
|
-
module Instance
|
8
|
-
class Unit < ::Avm::Data::Unit
|
9
|
-
attr_reader :instance
|
10
|
-
|
11
|
-
def initialize(instance)
|
12
|
-
@instance = instance
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/data/instance/unit'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
require 'curb'
|
6
|
-
require 'open-uri'
|
7
|
-
|
8
|
-
module Avm
|
9
|
-
module EacRedmineBase0
|
10
|
-
module Instances
|
11
|
-
class DataUnit < ::Avm::Data::Instance::Unit
|
12
|
-
common_constructor :instance
|
13
|
-
|
14
|
-
EXPORT_PATH = '/backup/export'
|
15
|
-
EXTENSION = '.tar'
|
16
|
-
IMPORT_PATH = '/backup/import.json'
|
17
|
-
|
18
|
-
def do_dump(data_path)
|
19
|
-
::File.open(data_path, 'wb') do |file|
|
20
|
-
file << export_request.response.body_data_or_raise
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def do_load(data_path)
|
25
|
-
do_load_by_web(data_path) || do_load_by_rake(data_path) || raise('Failed to load')
|
26
|
-
end
|
27
|
-
|
28
|
-
def do_load_by_web(data_path)
|
29
|
-
c = Curl::Easy.new(import_url)
|
30
|
-
c.multipart_form_post = true
|
31
|
-
c.http_post(Curl::PostField.file('redmine_with_git_tableless_load[path]', data_path))
|
32
|
-
c.perform
|
33
|
-
true
|
34
|
-
rescue Curl::Err::ConnectionFailedError
|
35
|
-
false
|
36
|
-
end
|
37
|
-
|
38
|
-
def do_load_by_rake(data_path)
|
39
|
-
instance.bundle('exec', 'rake', "redmine_with_git:load:all[#{data_path}]").system
|
40
|
-
true
|
41
|
-
end
|
42
|
-
|
43
|
-
def export_request
|
44
|
-
instance.rest_api.request(EXPORT_PATH)
|
45
|
-
end
|
46
|
-
|
47
|
-
def import_url
|
48
|
-
instance.rest_api.build_service_url(IMPORT_PATH).to_s
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|