eac_tools 0.55.7 → 0.56.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +16 -16
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/file_formats/base.rb +8 -41
- data/sub/avm/lib/avm/file_formats/file_result.rb +13 -0
- data/sub/avm/lib/avm/file_formats/unknown.rb +18 -0
- data/sub/avm/lib/avm/registry/file_formats.rb +6 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec +1 -1
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/apply.rb +34 -0
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/match.rb +69 -0
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base.rb +2 -2
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/{apache_host.rb → instances/apache_host.rb} +3 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/apache_path.rb +21 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb +1 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/deploy.rb +55 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/{apache_host_spec.rb → instances/apache_host_spec.rb} +2 -2
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/{apache_path_spec.rb → instances/apache_path_spec.rb} +2 -2
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +4 -4
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/xml.rb +2 -2
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- metadata +24 -32
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb +0 -19
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +0 -53
- /data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/{apache_host_spec_files → instances/apache_host_spec_files}/apache_host_spec_no_ssl_content.conf +0 -0
- /data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/{apache_path_spec_files → instances/apache_path_spec_files}/stub-app_0_apache_path.conf +0 -0
- /data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/{apache_path → instances/apache_path}/extra_content.conf +0 -0
- /data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/{deploy → instances/deploy}/config/database.yml.template +0 -0
- /data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/{deploy → instances/deploy}/config/envvars.d/email.yml.template +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 949ef60a80a3a91c57e7ae1feae75288c8f12cb7ceee676b9a5c29b155995b09
|
4
|
+
data.tar.gz: a2fa387df7aee4bf7fa9581ae1bf54e1062c8b6d647fdcec6199833d9a035d43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ab6afc8b93ddc9e43503f833d66dbccfb64db57a156b98cbe9e28f818fbef6adb8fc8dbd61114450d7065e9cc84b967e1accd83134cea71bc4ae1b3f27bd03
|
7
|
+
data.tar.gz: 36cf6388a7729e7ae847b8b68731197bef2598bb85487ceca70b04d594c020b9a7a3362d4ba83d83e3863944ef701979b5acb554af73d41ede9f21a7d1ebf828
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm (~> 0.
|
4
|
+
eac_tools (0.56.1)
|
5
|
+
avm (~> 0.66)
|
6
6
|
avm-eac_asciidoctor_base0 (~> 0.15)
|
7
|
-
avm-eac_generic_base0 (~> 0.
|
7
|
+
avm-eac_generic_base0 (~> 0.12)
|
8
8
|
avm-eac_latex_base0 (~> 0.3)
|
9
9
|
avm-eac_php_base0 (~> 0.4, >= 0.4.1)
|
10
10
|
avm-eac_postgresql_base0 (~> 0.2, >= 0.2.3)
|
11
11
|
avm-eac_python_base0 (~> 0.2, >= 0.2.1)
|
12
|
-
avm-eac_rails_base0 (~> 0.
|
12
|
+
avm-eac_rails_base0 (~> 0.10)
|
13
13
|
avm-eac_rails_base1 (~> 0.8, >= 0.8.1)
|
14
14
|
avm-eac_redmine_base0 (~> 0.18, >= 0.18.2)
|
15
15
|
avm-eac_redmine_plugin_base0 (~> 0.4)
|
16
16
|
avm-eac_ruby_base1 (~> 0.30)
|
17
|
-
avm-eac_webapp_base0 (~> 0.
|
17
|
+
avm-eac_webapp_base0 (~> 0.14)
|
18
18
|
avm-eac_wordpress_base0 (~> 0.3)
|
19
19
|
avm-git (~> 0.13, >= 0.13.1)
|
20
20
|
avm-tools (~> 0.145, >= 0.145.1)
|
@@ -47,8 +47,8 @@ PATH
|
|
47
47
|
PATH
|
48
48
|
remote: sub/avm-eac_generic_base0
|
49
49
|
specs:
|
50
|
-
avm-eac_generic_base0 (0.
|
51
|
-
avm (~> 0.
|
50
|
+
avm-eac_generic_base0 (0.12.0)
|
51
|
+
avm (~> 0.66)
|
52
52
|
eac_ruby_utils (~> 0.112)
|
53
53
|
|
54
54
|
PATH
|
@@ -84,7 +84,7 @@ PATH
|
|
84
84
|
PATH
|
85
85
|
remote: sub/avm-eac_rails_base0
|
86
86
|
specs:
|
87
|
-
avm-eac_rails_base0 (0.
|
87
|
+
avm-eac_rails_base0 (0.10.0)
|
88
88
|
avm-eac_rails_base1 (~> 0.8, >= 0.8.1)
|
89
89
|
eac_ruby_utils (~> 0.112)
|
90
90
|
|
@@ -137,13 +137,13 @@ PATH
|
|
137
137
|
PATH
|
138
138
|
remote: sub/avm-eac_webapp_base0
|
139
139
|
specs:
|
140
|
-
avm-eac_webapp_base0 (0.
|
141
|
-
avm (~> 0.
|
142
|
-
avm-eac_generic_base0 (~> 0.
|
140
|
+
avm-eac_webapp_base0 (0.14.0)
|
141
|
+
avm (~> 0.66)
|
142
|
+
avm-eac_generic_base0 (~> 0.12)
|
143
143
|
avm-eac_postgresql_base0 (~> 0.2, >= 0.2.3)
|
144
|
-
avm-eac_ubuntu_base0 (~> 0.4)
|
144
|
+
avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.1)
|
145
145
|
avm-files (~> 0.6)
|
146
|
-
eac_ruby_utils (~> 0.
|
146
|
+
eac_ruby_utils (~> 0.112)
|
147
147
|
|
148
148
|
PATH
|
149
149
|
remote: sub/avm-eac_wordpress_base0
|
@@ -194,7 +194,7 @@ PATH
|
|
194
194
|
PATH
|
195
195
|
remote: sub/avm
|
196
196
|
specs:
|
197
|
-
avm (0.
|
197
|
+
avm (0.66.0)
|
198
198
|
aranha-parsers (~> 0.17)
|
199
199
|
eac_cli (~> 0.30, >= 0.30.1)
|
200
200
|
eac_config (~> 0.12)
|
@@ -272,7 +272,7 @@ GEM
|
|
272
272
|
minitest (>= 5.1)
|
273
273
|
tzinfo (~> 2.0)
|
274
274
|
zeitwerk (~> 2.3)
|
275
|
-
addressable (2.8.
|
275
|
+
addressable (2.8.2)
|
276
276
|
public_suffix (>= 2.0.2, < 6.0)
|
277
277
|
asciidoctor (2.0.18)
|
278
278
|
ast (2.4.2)
|
@@ -334,7 +334,7 @@ GEM
|
|
334
334
|
os (1.1.4)
|
335
335
|
parallel (1.22.1)
|
336
336
|
parseconfig (1.1.2)
|
337
|
-
parser (3.2.
|
337
|
+
parser (3.2.2.0)
|
338
338
|
ast (~> 2.4.1)
|
339
339
|
parslet (2.0.0)
|
340
340
|
public_suffix (5.0.1)
|
data/lib/eac_tools/version.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/file_formats/utf8_assert'
|
4
3
|
require 'eac_fs/file_info'
|
5
4
|
require 'ostruct'
|
6
5
|
|
@@ -10,10 +9,10 @@ module Avm
|
|
10
9
|
enable_abstract_methods
|
11
10
|
compare_by :class
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
# @params files [Enumerable<Pathname>]
|
13
|
+
# @return [Enumerable<Avm::FileFormats::FileResult>]
|
14
|
+
def apply(_files)
|
15
|
+
raise_abstract_method __method__
|
17
16
|
end
|
18
17
|
|
19
18
|
# @param path [Pathname]
|
@@ -26,42 +25,10 @@ module Avm
|
|
26
25
|
self.class.name.demodulize
|
27
26
|
end
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
def valid_basenames
|
34
|
-
constant_or_array('VALID_BASENAMES')
|
35
|
-
end
|
36
|
-
|
37
|
-
def valid_types
|
38
|
-
constant_or_array('VALID_TYPES')
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
def constant_or_array(name)
|
44
|
-
return [] unless self.class.const_defined?(name)
|
45
|
-
|
46
|
-
self.class.const_get(name)
|
47
|
-
end
|
48
|
-
|
49
|
-
def build_file_result(file, old_content)
|
50
|
-
::OpenStruct.new(file: file, format: self.class,
|
51
|
-
changed: (old_content != File.read(file)))
|
52
|
-
end
|
53
|
-
|
54
|
-
def match_by_filename?(file)
|
55
|
-
valid_basenames.any? do |valid_basename|
|
56
|
-
file.basename.fnmatch?(valid_basename)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def match_by_type?(file)
|
61
|
-
info = ::EacFs::FileInfo.new(file)
|
62
|
-
return unless info.content_type.type == 'text'
|
63
|
-
|
64
|
-
valid_types.include?(info.content_type.subtype)
|
28
|
+
# @param file [Pathname]
|
29
|
+
# @return [Boolean]
|
30
|
+
def match?(_file)
|
31
|
+
raise_abstract_method __method__
|
65
32
|
end
|
66
33
|
end
|
67
34
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/file_formats/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module FileFormats
|
8
|
+
class Unknown < ::Avm::FileFormats::Base
|
9
|
+
# @params files [Enumerable<Pathname>]
|
10
|
+
# @return [Enumerable<Avm::FileFormats::FileResult>]
|
11
|
+
def apply(files)
|
12
|
+
files.map do |file|
|
13
|
+
::Avm::FileFormats::FileResult.new(file, self.class, false)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/file_formats/unknown'
|
3
4
|
require 'avm/registry/from_gems'
|
4
5
|
|
5
6
|
module Avm
|
@@ -9,6 +10,11 @@ module Avm
|
|
9
10
|
def class_detect(klass, detect_args)
|
10
11
|
klass.new if klass.new.match?(detect_args.first)
|
11
12
|
end
|
13
|
+
|
14
|
+
# @return [Avm::FileFormats::Base, Avm::FileFormats::Unknown]
|
15
|
+
def detect_optional(*registered_initialize_args)
|
16
|
+
super || ::Avm::FileFormats::Unknown.new
|
17
|
+
end
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,locale}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.66'
|
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'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/file_formats/base'
|
4
|
+
require 'avm/file_formats/file_result'
|
5
|
+
require 'avm/file_formats/utf8_assert'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacGenericBase0
|
10
|
+
class FileFormats
|
11
|
+
class Base < ::Avm::FileFormats::Base
|
12
|
+
class Apply
|
13
|
+
enable_method_class
|
14
|
+
common_constructor :file_format, :files
|
15
|
+
|
16
|
+
# @return [Enumerable<Avm::FileFormats::FileResult>]
|
17
|
+
def result
|
18
|
+
old_content = Hash[files.map { |f| [f, File.read(f)] }]
|
19
|
+
::Avm::FileFormats::Utf8Assert.assert_files(files) { file_format.internal_apply(files) }
|
20
|
+
files.map { |f| file_result(f, old_content[f]) }
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param path [Pathname]
|
24
|
+
# @param old_content [String]
|
25
|
+
# @return [Avm::FileFormats::FileResult]
|
26
|
+
def file_result(file, old_content)
|
27
|
+
::Avm::FileFormats::FileResult.new(file, file_format.class,
|
28
|
+
old_content != File.read(file))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/file_formats/base'
|
4
|
+
require 'eac_fs/file_info'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacGenericBase0
|
9
|
+
class FileFormats
|
10
|
+
class Base < ::Avm::FileFormats::Base
|
11
|
+
class Match
|
12
|
+
DEFAULT_TYPE = 'text'
|
13
|
+
|
14
|
+
common_constructor :file_format, :file
|
15
|
+
|
16
|
+
# @return [Boolean]
|
17
|
+
def result
|
18
|
+
result_by_filename? || result_by_type?
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [Array<String>]
|
22
|
+
def valid_basenames
|
23
|
+
constant_or_array('VALID_BASENAMES')
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [Array<String>]
|
27
|
+
def valid_types
|
28
|
+
constant_or_array('VALID_TYPES').map do |mime_type|
|
29
|
+
mime_type_sanitize(mime_type)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
protected
|
34
|
+
|
35
|
+
# @return [String]
|
36
|
+
def mime_type_sanitize(mime_type)
|
37
|
+
if mime_type.split('/').count > 1
|
38
|
+
mime_type
|
39
|
+
else
|
40
|
+
"#{DEFAULT_TYPE}/#{mime_type}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
# @return [Array<String>]
|
47
|
+
def constant_or_array(name)
|
48
|
+
return [] unless file_format.class.const_defined?(name)
|
49
|
+
|
50
|
+
file_format.class.const_get(name)
|
51
|
+
end
|
52
|
+
|
53
|
+
# @return [Boolean]
|
54
|
+
def result_by_filename?
|
55
|
+
valid_basenames.any? do |valid_basename|
|
56
|
+
file.basename.fnmatch?(valid_basename)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# @return [Boolean]
|
61
|
+
def result_by_type?
|
62
|
+
info = ::EacFs::FileInfo.new(file)
|
63
|
+
valid_types.include?(info.content_type.mime_type)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -7,7 +7,7 @@ module Avm
|
|
7
7
|
module EacGenericBase0
|
8
8
|
class FileFormats
|
9
9
|
class Base < ::Avm::FileFormats::Base
|
10
|
-
require_sub __FILE__, include_modules: true
|
10
|
+
require_sub __FILE__, include_modules: true, require_dependency: true
|
11
11
|
|
12
12
|
VALID_BASENAMES = %w[*.asm *.bat *.coffee *.java *.js *.rb *.s *.sql *.tex *.url *.yml
|
13
13
|
*.yaml].freeze
|
@@ -21,7 +21,7 @@ module Avm
|
|
21
21
|
# @param file [Pathname]
|
22
22
|
# @return [Boolean]
|
23
23
|
def match?(file)
|
24
|
-
|
24
|
+
::Avm::EacGenericBase0::FileFormats::Base::Match.new(self, file).result || !file.exist?
|
25
25
|
end
|
26
26
|
|
27
27
|
def file_apply(file)
|
data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/{apache_host.rb → instances/apache_host.rb}
RENAMED
@@ -4,7 +4,9 @@ require 'avm/eac_rails_base1/instances/apache_host'
|
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module EacRailsBase0
|
7
|
-
|
7
|
+
module Instances
|
8
|
+
class ApacheHost < ::Avm::EacRailsBase1::Instances::ApacheHost
|
9
|
+
end
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_templates/core_ext'
|
4
|
+
require 'avm/eac_webapp_base0/instances/apache_path'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacRailsBase0
|
9
|
+
module Instances
|
10
|
+
class ApachePath < ::Avm::EacWebappBase0::Instances::ApachePath
|
11
|
+
def document_root
|
12
|
+
::File.join(super, 'public')
|
13
|
+
end
|
14
|
+
|
15
|
+
def extra_content
|
16
|
+
template.child('extra_content.conf').apply(instance)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_templates/core_ext'
|
4
|
+
require 'avm/eac_webapp_base0/instances/deploy'
|
5
|
+
require 'avm/instances/entry_keys'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacRailsBase0
|
9
|
+
module Instances
|
10
|
+
class Deploy < ::Avm::EacWebappBase0::Instances::Deploy
|
11
|
+
set_callback :assert_instance_branch, :after do
|
12
|
+
bundle_install
|
13
|
+
assert_database
|
14
|
+
database_migrate
|
15
|
+
compile_assets
|
16
|
+
restart_tasks_scheduler
|
17
|
+
touch_restart_file
|
18
|
+
end
|
19
|
+
|
20
|
+
def assert_database
|
21
|
+
infom 'Asserting database...'
|
22
|
+
instance.pg.assert
|
23
|
+
end
|
24
|
+
|
25
|
+
def bundle_install
|
26
|
+
infom 'Running "bundle install"...'
|
27
|
+
instance.bundle('install').system!
|
28
|
+
end
|
29
|
+
|
30
|
+
def compile_assets
|
31
|
+
infom 'Compiling assets...'
|
32
|
+
instance.rake('assets:clean', 'assets:precompile').system!
|
33
|
+
end
|
34
|
+
|
35
|
+
def database_migrate
|
36
|
+
infom 'Running database migrations...'
|
37
|
+
instance.rake('db:migrate').system!
|
38
|
+
end
|
39
|
+
|
40
|
+
def restart_tasks_scheduler
|
41
|
+
infom 'Restarting Tasks Scheduler\'s daemon...'
|
42
|
+
instance.bundle('exec', 'tasks_scheduler', 'restart').system!
|
43
|
+
end
|
44
|
+
|
45
|
+
def touch_restart_file
|
46
|
+
infom 'Touching restart file...'
|
47
|
+
instance.host_env.command(
|
48
|
+
'touch', ::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
|
49
|
+
'tmp', 'restart.txt')
|
50
|
+
).system!
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/eac_rails_base0/apache_host'
|
3
|
+
require 'avm/eac_rails_base0/instances/apache_host'
|
4
4
|
require 'avm/eac_rails_base0/instances/base'
|
5
5
|
|
6
|
-
RSpec.describe ::Avm::EacRailsBase0::ApacheHost do
|
6
|
+
RSpec.describe ::Avm::EacRailsBase0::Instances::ApacheHost do
|
7
7
|
describe '#no_ssl_site_content' do
|
8
8
|
let(:instance) { ::Avm::EacRailsBase0::Instances::Base.by_id('stub-app_0') }
|
9
9
|
let(:apache_host) { described_class.new(instance) }
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/eac_rails_base0/apache_path'
|
3
|
+
require 'avm/eac_rails_base0/instances/apache_path'
|
4
4
|
require 'avm/eac_rails_base0/instances/base'
|
5
5
|
|
6
|
-
RSpec.describe ::Avm::EacRailsBase0::ApachePath do
|
6
|
+
RSpec.describe ::Avm::EacRailsBase0::Instances::ApachePath do
|
7
7
|
describe '#no_ssl_site_content' do
|
8
8
|
let(:instance) { ::Avm::EacRailsBase0::Instances::Base.by_id('stub-app_0') }
|
9
9
|
let(:apache_path) { described_class.new(instance) }
|
@@ -12,12 +12,12 @@ 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_generic_base0', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.66'
|
16
|
+
s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
|
17
17
|
s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2', '>= 0.2.3'
|
18
|
-
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4'
|
18
|
+
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.1'
|
19
19
|
s.add_dependency 'avm-files', '~> 0.6'
|
20
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
20
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
21
21
|
|
22
22
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
|
23
23
|
end
|
@@ -7,8 +7,8 @@ module Avm
|
|
7
7
|
module EacWebappBase0
|
8
8
|
module FileFormats
|
9
9
|
class Xml < ::Avm::EacGenericBase0::FileFormats::Base
|
10
|
-
VALID_BASENAMES = %w[*.xml].freeze
|
11
|
-
VALID_TYPES = ['xml'].freeze
|
10
|
+
VALID_BASENAMES = %w[*.svg *.xml].freeze
|
11
|
+
VALID_TYPES = ['image/svg+xml', 'xml'].freeze
|
12
12
|
|
13
13
|
def internal_apply(files)
|
14
14
|
format_command(files).system!
|
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.56.1
|
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: 2023-
|
11
|
+
date: 2023-04-01 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.66'
|
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.66'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: avm-eac_asciidoctor_base0
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.12'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: avm-eac_latex_base0
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,20 +132,14 @@ dependencies:
|
|
132
132
|
requirements:
|
133
133
|
- - "~>"
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: '0.
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 0.9.1
|
135
|
+
version: '0.10'
|
139
136
|
type: :runtime
|
140
137
|
prerelease: false
|
141
138
|
version_requirements: !ruby/object:Gem::Requirement
|
142
139
|
requirements:
|
143
140
|
- - "~>"
|
144
141
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0.
|
146
|
-
- - ">="
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
version: 0.9.1
|
142
|
+
version: '0.10'
|
149
143
|
- !ruby/object:Gem::Dependency
|
150
144
|
name: avm-eac_rails_base1
|
151
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,20 +214,14 @@ dependencies:
|
|
220
214
|
requirements:
|
221
215
|
- - "~>"
|
222
216
|
- !ruby/object:Gem::Version
|
223
|
-
version: '0.
|
224
|
-
- - ">="
|
225
|
-
- !ruby/object:Gem::Version
|
226
|
-
version: 0.13.1
|
217
|
+
version: '0.14'
|
227
218
|
type: :runtime
|
228
219
|
prerelease: false
|
229
220
|
version_requirements: !ruby/object:Gem::Requirement
|
230
221
|
requirements:
|
231
222
|
- - "~>"
|
232
223
|
- !ruby/object:Gem::Version
|
233
|
-
version: '0.
|
234
|
-
- - ">="
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: 0.13.1
|
224
|
+
version: '0.14'
|
237
225
|
- !ruby/object:Gem::Dependency
|
238
226
|
name: avm-eac_wordpress_base0
|
239
227
|
requirement: !ruby/object:Gem::Requirement
|
@@ -419,7 +407,9 @@ files:
|
|
419
407
|
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0.rb
|
420
408
|
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats.rb
|
421
409
|
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base.rb
|
410
|
+
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/apply.rb
|
422
411
|
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
|
412
|
+
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/match.rb
|
423
413
|
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/instances.rb
|
424
414
|
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/instances/base.rb
|
425
415
|
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources.rb
|
@@ -522,23 +512,23 @@ files:
|
|
522
512
|
- sub/avm-eac_rails_base0/Gemfile
|
523
513
|
- sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec
|
524
514
|
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0.rb
|
525
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb
|
526
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb
|
527
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb
|
528
515
|
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances.rb
|
516
|
+
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/apache_host.rb
|
517
|
+
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/apache_path.rb
|
529
518
|
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb
|
519
|
+
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/deploy.rb
|
530
520
|
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/source_generators/base.rb
|
531
521
|
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb
|
532
522
|
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb
|
533
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec.rb
|
534
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec_files/apache_host_spec_no_ssl_content.conf
|
535
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb
|
536
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec_files/stub-app_0_apache_path.conf
|
523
|
+
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_host_spec.rb
|
524
|
+
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_host_spec_files/apache_host_spec_no_ssl_content.conf
|
525
|
+
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_path_spec.rb
|
526
|
+
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_path_spec_files/stub-app_0_apache_path.conf
|
537
527
|
- sub/avm-eac_rails_base0/spec/rubocop_spec.rb
|
538
528
|
- sub/avm-eac_rails_base0/spec/spec_helper.rb
|
539
|
-
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/apache_path/extra_content.conf
|
540
|
-
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/database.yml.template
|
541
|
-
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template
|
529
|
+
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/instances/apache_path/extra_content.conf
|
530
|
+
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/instances/deploy/config/database.yml.template
|
531
|
+
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/instances/deploy/config/envvars.d/email.yml.template
|
542
532
|
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/Gemfile
|
543
533
|
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/Rakefile
|
544
534
|
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/app/assets/config/manifest.js
|
@@ -1111,7 +1101,9 @@ files:
|
|
1111
1101
|
- sub/avm/lib/avm/executables.rb
|
1112
1102
|
- sub/avm/lib/avm/file_formats.rb
|
1113
1103
|
- sub/avm/lib/avm/file_formats/base.rb
|
1104
|
+
- sub/avm/lib/avm/file_formats/file_result.rb
|
1114
1105
|
- sub/avm/lib/avm/file_formats/search_formatter.rb
|
1106
|
+
- sub/avm/lib/avm/file_formats/unknown.rb
|
1115
1107
|
- sub/avm/lib/avm/file_formats/utf8_assert.rb
|
1116
1108
|
- sub/avm/lib/avm/instances.rb
|
1117
1109
|
- sub/avm/lib/avm/instances/base.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_templates/core_ext'
|
4
|
-
require 'avm/eac_webapp_base0/instances/apache_path'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module EacRailsBase0
|
9
|
-
class ApachePath < ::Avm::EacWebappBase0::Instances::ApachePath
|
10
|
-
def document_root
|
11
|
-
::File.join(super, 'public')
|
12
|
-
end
|
13
|
-
|
14
|
-
def extra_content
|
15
|
-
template.child('extra_content.conf').apply(instance)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_templates/core_ext'
|
4
|
-
require 'avm/eac_webapp_base0/instances/deploy'
|
5
|
-
require 'avm/instances/entry_keys'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module EacRailsBase0
|
9
|
-
class Deploy < ::Avm::EacWebappBase0::Instances::Deploy
|
10
|
-
set_callback :assert_instance_branch, :after do
|
11
|
-
bundle_install
|
12
|
-
assert_database
|
13
|
-
database_migrate
|
14
|
-
compile_assets
|
15
|
-
restart_tasks_scheduler
|
16
|
-
touch_restart_file
|
17
|
-
end
|
18
|
-
|
19
|
-
def assert_database
|
20
|
-
infom 'Asserting database...'
|
21
|
-
instance.pg.assert
|
22
|
-
end
|
23
|
-
|
24
|
-
def bundle_install
|
25
|
-
infom 'Running "bundle install"...'
|
26
|
-
instance.bundle('install').system!
|
27
|
-
end
|
28
|
-
|
29
|
-
def compile_assets
|
30
|
-
infom 'Compiling assets...'
|
31
|
-
instance.rake('assets:clean', 'assets:precompile').system!
|
32
|
-
end
|
33
|
-
|
34
|
-
def database_migrate
|
35
|
-
infom 'Running database migrations...'
|
36
|
-
instance.rake('db:migrate').system!
|
37
|
-
end
|
38
|
-
|
39
|
-
def restart_tasks_scheduler
|
40
|
-
infom 'Restarting Tasks Scheduler\'s daemon...'
|
41
|
-
instance.bundle('exec', 'tasks_scheduler', 'restart').system!
|
42
|
-
end
|
43
|
-
|
44
|
-
def touch_restart_file
|
45
|
-
infom 'Touching restart file...'
|
46
|
-
instance.host_env.command(
|
47
|
-
'touch', ::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
|
48
|
-
'tmp', 'restart.txt')
|
49
|
-
).system!
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|