eac_tools 0.60.0 → 0.60.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +51 -51
- data/lib/eac_tools/version.rb +1 -1
- data/sub/aranha-parsers/aranha-parsers.gemspec +2 -5
- data/sub/aranha-parsers/lib/aranha/parsers/source_address/hash_http_base.rb +13 -22
- data/sub/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +6 -12
- data/sub/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec.rb +32 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_get.source.yml +6 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_get.target.yaml +10 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_post.source.yml +5 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_post.target.yaml +12 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/http_get.source.yml +1 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/http_get.target.yaml +10 -0
- data/sub/avm/avm.gemspec +1 -1
- data/sub/avm/lib/avm/data/package/build_directory.rb +28 -0
- data/sub/avm/lib/avm/data/package/dump.rb +10 -8
- data/sub/avm/lib/avm/data/package/load.rb +8 -11
- data/sub/avm/lib/avm/data/package.rb +3 -0
- data/sub/avm/lib/avm/data/unit.rb +5 -0
- data/sub/avm/lib/avm/instances/data/files_unit.rb +8 -1
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/base.rb +0 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/base.rb +0 -1
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
- data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +3 -3
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/instances/base.rb +0 -1
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +1 -1
- data/sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec +2 -2
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +1 -1
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +1 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb +11 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +2 -2
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +5 -0
- 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.rb +5 -4
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +7 -2
- 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/docker_image/apache_path_dockerfile +5 -0
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +7 -12
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/{file_unit.rb → setup_files_unit.rb} +12 -3
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +3 -4
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb +2 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/base.rb +19 -1
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
- metadata +53 -21
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_package.rb +0 -23
- /data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/{Dockerfile_apache_setup → apache_host_dockerfile} +0 -0
@@ -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-eac_generic_base0', '~> 0.
|
16
|
-
s.add_dependency 'avm-eac_webapp_base0', '~> 0.
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
15
|
+
s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
|
16
|
+
s.add_dependency 'avm-eac_webapp_base0', '~> 0.15'
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
18
18
|
|
19
19
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
|
20
20
|
end
|
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.66', '>= 0.66.1'
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
17
17
|
|
18
18
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
19
19
|
end
|
@@ -28,7 +28,7 @@ module Avm
|
|
28
28
|
info 'Database has no tables'
|
29
29
|
else
|
30
30
|
info "Removing #{ts.count} table(s)..."
|
31
|
-
run_sql('drop table ' + ts.map { |t| "\"#{t}\"" }.join(', ') + ' cascade')
|
31
|
+
run_sql('drop table if exists ' + ts.map { |t| "\"#{t}\"" }.join(', ') + ' cascade')
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -12,7 +12,7 @@ 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.8', '>= 0.8.
|
15
|
+
s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.3'
|
16
16
|
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
17
17
|
|
18
18
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
@@ -7,7 +7,17 @@ module Avm
|
|
7
7
|
module EacRailsBase0
|
8
8
|
module Instances
|
9
9
|
class Base < ::Avm::EacRailsBase1::Instances::Base
|
10
|
-
|
10
|
+
UPLOADS_UNIT_SUBPATH = 'public/uploads'
|
11
|
+
|
12
|
+
# @return [Avm::Instances::Data::Package]
|
13
|
+
def data_package_create
|
14
|
+
super.add_unit('uploads', uploads_unit)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Avm::Instances::Data::FilesUnit]
|
18
|
+
def uploads_unit
|
19
|
+
::Avm::Instances::Data::FilesUnit.new(self, UPLOADS_UNIT_SUBPATH)
|
20
|
+
end
|
11
21
|
end
|
12
22
|
end
|
13
23
|
end
|
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.67'
|
16
16
|
s.add_dependency 'avm-eac_ruby_base1', '~> 0.30', '>= 0.30.1'
|
17
|
-
s.add_dependency 'avm-eac_webapp_base0', '~> 0.
|
17
|
+
s.add_dependency 'avm-eac_webapp_base0', '~> 0.15'
|
18
18
|
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
19
19
|
|
20
20
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
@@ -17,6 +17,11 @@ module Avm
|
|
17
17
|
the_gem.bundle(*args).chdir_root.envvar('RAILS_ENV', DEFAULT_RAILS_ENVIRONMENT)
|
18
18
|
end
|
19
19
|
|
20
|
+
# @return [Avm::Instances::Data::Package]
|
21
|
+
def data_package_create
|
22
|
+
super.add_unit('database', database_unit)
|
23
|
+
end
|
24
|
+
|
20
25
|
def rake(*args)
|
21
26
|
bundle('exec', 'rake', *args)
|
22
27
|
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.
|
15
|
+
s.add_dependency 'avm', '~> 0.67'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
|
17
|
-
s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.
|
17
|
+
s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.3'
|
18
18
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.1'
|
19
19
|
s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
|
20
20
|
s.add_dependency 'eac_fs', '~> 0.16'
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'addressable/uri'
|
4
|
-
require 'avm/eac_redmine_base0/instances/data_package'
|
5
4
|
require 'avm/eac_redmine_base0/instances/docker_image'
|
6
5
|
require 'avm/eac_redmine_base0/instances/runners'
|
7
6
|
require 'avm/eac_redmine_base0/instances/rest_api'
|
@@ -31,9 +30,11 @@ module Avm
|
|
31
30
|
]
|
32
31
|
end
|
33
32
|
|
34
|
-
# @return [Avm::
|
35
|
-
def
|
36
|
-
|
33
|
+
# @return [Avm::Instances::Data::Package]
|
34
|
+
def data_package_create
|
35
|
+
r = super.add_unit('files', files_data_unit).add_unit('gitolite', gitolite_data_unit)
|
36
|
+
r.after_load { instance.run_installer }
|
37
|
+
r
|
37
38
|
end
|
38
39
|
|
39
40
|
# @return [Addressable::URI]
|
@@ -12,6 +12,8 @@ module Avm
|
|
12
12
|
class DockerImage < ::Avm::Instances::DockerImage
|
13
13
|
enable_simple_cache
|
14
14
|
|
15
|
+
APACHE_HOST_DOCKERFILE_SUBPATH = 'apache_host_dockerfile'
|
16
|
+
APACHE_PATH_DOCKERFILE_SUBPATH = 'apache_path_dockerfile'
|
15
17
|
INSTALLER_TARGET_TASK_WITH_WEB_PATH_BLANK = 'redmine_as_apache_base'
|
16
18
|
INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT = 'redmine_as_apache_path'
|
17
19
|
REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source'
|
@@ -23,9 +25,12 @@ module Avm
|
|
23
25
|
end
|
24
26
|
|
25
27
|
def apache_setup
|
26
|
-
|
28
|
+
template.child(apache_setup_dockerfile).apply(self)
|
29
|
+
end
|
27
30
|
|
28
|
-
|
31
|
+
# @return [String]
|
32
|
+
def apache_setup_dockerfile
|
33
|
+
web_path_present? ? APACHE_PATH_DOCKERFILE_SUBPATH : APACHE_HOST_DOCKERFILE_SUBPATH
|
29
34
|
end
|
30
35
|
|
31
36
|
def base_image
|
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.67'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
|
17
|
-
s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2', '>= 0.2.
|
17
|
+
s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2', '>= 0.2.4'
|
18
18
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.1'
|
19
19
|
s.add_dependency 'avm-files', '~> 0.6'
|
20
20
|
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
@@ -4,7 +4,6 @@ require 'avm/instances/base'
|
|
4
4
|
require 'avm/eac_postgresql_base0/instance_with'
|
5
5
|
require 'avm/instances/data/files_unit'
|
6
6
|
require 'avm/instances/data/package'
|
7
|
-
require 'avm/eac_webapp_base0/instances/deploy/file_unit'
|
8
7
|
require 'avm/eac_webapp_base0/instances/runners'
|
9
8
|
require 'avm/eac_ubuntu_base0/instances/base'
|
10
9
|
|
@@ -16,8 +15,6 @@ module Avm
|
|
16
15
|
include ::Avm::EacPostgresqlBase0::InstanceWith
|
17
16
|
enable_simple_cache
|
18
17
|
|
19
|
-
FILES_UNITS = [].freeze
|
20
|
-
|
21
18
|
def data_dump(argv = [])
|
22
19
|
run_subcommand(data_dump_runner_class, argv)
|
23
20
|
end
|
@@ -33,10 +30,14 @@ module Avm
|
|
33
30
|
).run
|
34
31
|
end
|
35
32
|
|
33
|
+
# @return [Avm::Instances::Data::Package]
|
36
34
|
def data_package
|
37
|
-
@data_package ||=
|
38
|
-
|
39
|
-
|
35
|
+
@data_package ||= data_package_create
|
36
|
+
end
|
37
|
+
|
38
|
+
# @return [Avm::Instances::Data::Package]
|
39
|
+
def data_package_create
|
40
|
+
::Avm::Instances::Data::Package.new(self)
|
40
41
|
end
|
41
42
|
|
42
43
|
def database_unit
|
@@ -49,12 +50,6 @@ module Avm
|
|
49
50
|
def platform_instance_uncached
|
50
51
|
::Avm::EacUbuntuBase0::Instances::Base.by_id(id)
|
51
52
|
end
|
52
|
-
|
53
|
-
def files_units
|
54
|
-
self.class.const_get('FILES_UNITS').transform_values do |fs_path_subpath|
|
55
|
-
::Avm::Instances::Data::FilesUnit.new(self, fs_path_subpath)
|
56
|
-
end
|
57
|
-
end
|
58
53
|
end
|
59
54
|
end
|
60
55
|
end
|
@@ -4,7 +4,8 @@ module Avm
|
|
4
4
|
module EacWebappBase0
|
5
5
|
module Instances
|
6
6
|
class Deploy
|
7
|
-
class
|
7
|
+
class SetupFilesUnit < ::SimpleDelegator
|
8
|
+
enable_method_class
|
8
9
|
attr_reader :data_key, :fs_path_subpath
|
9
10
|
|
10
11
|
def initialize(deploy, data_key, fs_path_subpath)
|
@@ -13,7 +14,7 @@ module Avm
|
|
13
14
|
@fs_path_subpath = fs_path_subpath
|
14
15
|
end
|
15
16
|
|
16
|
-
def
|
17
|
+
def result
|
17
18
|
assert_source_directory
|
18
19
|
link_source_target
|
19
20
|
end
|
@@ -34,9 +35,17 @@ module Avm
|
|
34
35
|
|
35
36
|
def link_source_target
|
36
37
|
infom "Linking \"#{data_key}\" directory..."
|
37
|
-
|
38
|
+
return unless remove_target
|
39
|
+
|
38
40
|
instance.host_env.command('ln', '-s', source_path, target_path).execute!
|
39
41
|
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
# @return [Boolean]
|
46
|
+
def remove_target
|
47
|
+
instance.host_env.command('rm', '-rf', target_path).execute.fetch(:exit_code).zero?
|
48
|
+
end
|
40
49
|
end
|
41
50
|
end
|
42
51
|
end
|
@@ -10,7 +10,7 @@ module Avm
|
|
10
10
|
module EacWebappBase0
|
11
11
|
module Instances
|
12
12
|
class Deploy
|
13
|
-
require_sub __FILE__, include_modules: true
|
13
|
+
require_sub __FILE__, include_modules: true, require_dependency: true
|
14
14
|
|
15
15
|
DEFAULT_REFERENCE = 'HEAD'
|
16
16
|
|
@@ -42,9 +42,8 @@ module Avm
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def setup_files_units
|
45
|
-
instance.
|
46
|
-
|
47
|
-
end
|
45
|
+
instance.data_package.units.values.map(&:installation_files_data).select(&:present?)
|
46
|
+
.each { |unit_install| setup_files_unit(unit_install.key, unit_install.subpath) }
|
48
47
|
end
|
49
48
|
|
50
49
|
def assert_instance_branch
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'active_support/core_ext/numeric/time'
|
4
|
+
require 'avm/result'
|
4
5
|
require 'eac_cli/speaker'
|
5
6
|
require 'eac_ruby_utils/simple_cache'
|
6
7
|
|
@@ -17,7 +18,7 @@ module Avm
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def run
|
20
|
-
return
|
21
|
+
return fatal_error("Dump \"#{dump_path}\" does not exist") unless
|
21
22
|
::File.exist?(dump_path)
|
22
23
|
|
23
24
|
load_dump
|
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
16
|
-
s.add_dependency 'avm-eac_webapp_base0', '~> 0.
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.67'
|
16
|
+
s.add_dependency 'avm-eac_webapp_base0', '~> 0.15'
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
18
18
|
|
19
19
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
|
20
20
|
end
|
@@ -7,7 +7,15 @@ module Avm
|
|
7
7
|
module EacWordpressBase0
|
8
8
|
module Instances
|
9
9
|
class Base < ::Avm::EacWebappBase0::Instances::Base
|
10
|
-
|
10
|
+
THEMES_UNIT_SUBPATH = 'wp-content/themes'
|
11
|
+
UPLOADS_UNIT_SUBPATH = 'wp-content/uploads'
|
12
|
+
|
13
|
+
# @return [Avm::Instances::Data::Package]
|
14
|
+
def data_package_create
|
15
|
+
%w[database themes uploads].inject(super) do |a, e|
|
16
|
+
a.add_unit(e, send("#{e}_unit"))
|
17
|
+
end
|
18
|
+
end
|
11
19
|
|
12
20
|
def database_unit
|
13
21
|
web_url = read_entry(::Avm::Instances::EntryKeys::WEB_URL)
|
@@ -20,6 +28,16 @@ module Avm
|
|
20
28
|
SQL
|
21
29
|
end
|
22
30
|
end
|
31
|
+
|
32
|
+
# @return [Avm::Instances::Data::FilesUnit]
|
33
|
+
def themes_unit
|
34
|
+
::Avm::Instances::Data::FilesUnit.new(self, THEMES_UNIT_SUBPATH)
|
35
|
+
end
|
36
|
+
|
37
|
+
# @return [Avm::Instances::Data::FilesUnit]
|
38
|
+
def uploads_unit
|
39
|
+
::Avm::Instances::Data::FilesUnit.new(self, UPLOADS_UNIT_SUBPATH)
|
40
|
+
end
|
23
41
|
end
|
24
42
|
end
|
25
43
|
end
|