avm-eac_webapp_base0 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/eac_webapp_base0/apache_path.rb +1 -1
- data/lib/avm/eac_webapp_base0/deploy/file_unit.rb +1 -1
- data/lib/avm/eac_webapp_base0/deploy/git_info.rb +1 -1
- data/lib/avm/eac_webapp_base0/deploy/write_on_target.rb +1 -1
- data/lib/avm/eac_webapp_base0/instances/base.rb +2 -2
- data/lib/avm/eac_webapp_base0/instances/runners/apache_host.rb +36 -0
- data/lib/avm/eac_webapp_base0/instances/runners/apache_path.rb +39 -0
- data/lib/avm/eac_webapp_base0/instances/runners/deploy.rb +43 -0
- data/lib/avm/eac_webapp_base0/version.rb +1 -1
- metadata +15 -9
- data/lib/avm/eac_webapp_base0/runner/apache_host.rb +0 -35
- data/lib/avm/eac_webapp_base0/runner/apache_path.rb +0 -40
- data/lib/avm/eac_webapp_base0/runner/deploy.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d19706588763ddfb9486347626c14084ed45f6fef3456da2ba0a4c5f89075aed
|
4
|
+
data.tar.gz: 53a8ba40b77d924ed300e26c0d4436e90c565cd0882534a64e5b260c4a3e8e82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2319d3ebf243fee42efe908daa895920e0c23cc9a0d2f1eb965a5e79581c6e1d860ff6a22acf907b847a48d648e32bc140890d44c99af53879b9fc5c543d40e7
|
7
|
+
data.tar.gz: f25dff84a1a0e9a6bb783201332465dc0a6e2830fbf578bd35c96e33d26d699ba77fa915489c39be7e42823d30c89e224a4b4f89c3dcc3f8b850a862343a17c5
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
def write_on_target
|
10
10
|
::Avm::Files::Deploy.new(
|
11
11
|
instance.host_env,
|
12
|
-
instance.read_entry(::Avm::Instances::EntryKeys::
|
12
|
+
instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
|
13
13
|
).append_plain_directory(build_dir).run
|
14
14
|
end
|
15
15
|
end
|
@@ -23,13 +23,13 @@ module Avm
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def data_dump_runner_class
|
26
|
-
|
26
|
+
::Avm::EacWebappBase0::Instances::Runners::Data::Dump
|
27
27
|
end
|
28
28
|
|
29
29
|
def run_subcommand(subcommand_class, argv)
|
30
30
|
subcommand_class.create(
|
31
31
|
argv: argv,
|
32
|
-
parent: ::Avm::EacWebappBase0::
|
32
|
+
parent: ::Avm::EacWebappBase0::Instances::Base::SubcommandParent.new(self)
|
33
33
|
).run
|
34
34
|
end
|
35
35
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacWebappBase0
|
7
|
+
module Instances
|
8
|
+
module Runners
|
9
|
+
class ApacheHost
|
10
|
+
runner_with :help do
|
11
|
+
desc 'Configure Apache virtual host for instance.'
|
12
|
+
bool_opt '-c', '--certbot', 'Install certbot.'
|
13
|
+
end
|
14
|
+
|
15
|
+
def run
|
16
|
+
result = stereotype_apache_host_class.new(runner_context.call(:instance),
|
17
|
+
stereotype_apache_host_options).run
|
18
|
+
if result.error?
|
19
|
+
fatal_error result.to_s
|
20
|
+
else
|
21
|
+
infov 'Result', result.label
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def stereotype_apache_host_class
|
26
|
+
"#{runner_context.call(:instance).class.name.deconstantize}::ApacheHost".constantize
|
27
|
+
end
|
28
|
+
|
29
|
+
def stereotype_apache_host_options
|
30
|
+
{ certbot: parsed.certbot? }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacWebappBase0
|
7
|
+
module Instances
|
8
|
+
module Runners
|
9
|
+
class ApachePath
|
10
|
+
runner_with :help do
|
11
|
+
desc 'Configure Apache path configuration for instance.'
|
12
|
+
end
|
13
|
+
|
14
|
+
def run
|
15
|
+
if result.error?
|
16
|
+
fatal_error result.to_s
|
17
|
+
else
|
18
|
+
infov 'Result', result.label
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def apache_path_uncached
|
25
|
+
stereotype_apache_path_class.new(runner_context.call(:instance))
|
26
|
+
end
|
27
|
+
|
28
|
+
def result_uncached
|
29
|
+
apache_path.run
|
30
|
+
end
|
31
|
+
|
32
|
+
def stereotype_apache_path_class
|
33
|
+
"#{runner_context.call(:instance).class.name.deconstantize}::ApachePath".constantize
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/instances/runner'
|
4
|
+
require 'avm/path_string'
|
5
|
+
require 'eac_cli/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacWebappBase0
|
9
|
+
module Instances
|
10
|
+
module Runners
|
11
|
+
class Deploy
|
12
|
+
runner_with :help do
|
13
|
+
desc 'Deploy for instance.'
|
14
|
+
arg_opt '-r', '--reference', 'Git reference to deploy.'
|
15
|
+
arg_opt '-a', '--append-dirs', 'Append directories to deploy (List separated by ":").'
|
16
|
+
bool_opt '-T', '--no-request-test', 'Do not test web interface after deploy.'
|
17
|
+
end
|
18
|
+
|
19
|
+
def deploy_class
|
20
|
+
runner_context.call(:stereotype_module).const_get('Instances').const_get('Deploy')
|
21
|
+
rescue ::NameError
|
22
|
+
runner_context.call(:stereotype_module).const_get('Deploy')
|
23
|
+
end
|
24
|
+
|
25
|
+
def run
|
26
|
+
result = deploy_class.new(runner_context.call(:instance), deploy_options).run
|
27
|
+
if result.error?
|
28
|
+
fatal_error result.to_s
|
29
|
+
else
|
30
|
+
infov 'Result', result.label
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def deploy_options
|
35
|
+
{ reference: parsed.reference,
|
36
|
+
appended_directories: ::Avm::PathString.paths(parsed.append_dirs),
|
37
|
+
no_request_test: parsed.no_request_test? }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-eac_webapp_base0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.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-08
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.41'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.41.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.41'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.41.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: avm-eac_generic_base0
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,6 +79,9 @@ dependencies:
|
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0.102'
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 0.102.1
|
82
85
|
type: :runtime
|
83
86
|
prerelease: false
|
84
87
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -86,6 +89,9 @@ dependencies:
|
|
86
89
|
- - "~>"
|
87
90
|
- !ruby/object:Gem::Version
|
88
91
|
version: '0.102'
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 0.102.1
|
89
95
|
- !ruby/object:Gem::Dependency
|
90
96
|
name: eac_ruby_gem_support
|
91
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,13 +125,13 @@ files:
|
|
119
125
|
- lib/avm/eac_webapp_base0/instances/base.rb
|
120
126
|
- lib/avm/eac_webapp_base0/instances/base/subcommand_parent.rb
|
121
127
|
- lib/avm/eac_webapp_base0/instances/runners.rb
|
128
|
+
- lib/avm/eac_webapp_base0/instances/runners/apache_host.rb
|
129
|
+
- lib/avm/eac_webapp_base0/instances/runners/apache_path.rb
|
122
130
|
- lib/avm/eac_webapp_base0/instances/runners/data.rb
|
123
131
|
- lib/avm/eac_webapp_base0/instances/runners/data/dump.rb
|
124
132
|
- lib/avm/eac_webapp_base0/instances/runners/data/load.rb
|
133
|
+
- lib/avm/eac_webapp_base0/instances/runners/deploy.rb
|
125
134
|
- lib/avm/eac_webapp_base0/runner.rb
|
126
|
-
- lib/avm/eac_webapp_base0/runner/apache_host.rb
|
127
|
-
- lib/avm/eac_webapp_base0/runner/apache_path.rb
|
128
|
-
- lib/avm/eac_webapp_base0/runner/deploy.rb
|
129
135
|
- lib/avm/eac_webapp_base0/sources.rb
|
130
136
|
- lib/avm/eac_webapp_base0/sources/base.rb
|
131
137
|
- lib/avm/eac_webapp_base0/version.rb
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/instances/runner'
|
4
|
-
require 'eac_cli/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module EacWebappBase0
|
8
|
-
class Runner < ::Avm::Instances::Runner
|
9
|
-
class ApacheHost
|
10
|
-
runner_with :help do
|
11
|
-
desc 'Configure Apache virtual host for instance.'
|
12
|
-
bool_opt '-c', '--certbot', 'Install certbot.'
|
13
|
-
end
|
14
|
-
|
15
|
-
def run
|
16
|
-
result = stereotype_apache_host_class.new(runner_context.call(:instance),
|
17
|
-
stereotype_apache_host_options).run
|
18
|
-
if result.error?
|
19
|
-
fatal_error result.to_s
|
20
|
-
else
|
21
|
-
infov 'Result', result.label
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def stereotype_apache_host_class
|
26
|
-
"#{runner_context.call(:instance).class.name.deconstantize}::ApacheHost".constantize
|
27
|
-
end
|
28
|
-
|
29
|
-
def stereotype_apache_host_options
|
30
|
-
{ certbot: parsed.certbot? }
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_cli/core_ext'
|
4
|
-
require 'avm/instances/runner'
|
5
|
-
require 'avm/eac_webapp_base0/runner/apache_host'
|
6
|
-
require 'avm/eac_rails_base0/apache_path'
|
7
|
-
|
8
|
-
module Avm
|
9
|
-
module EacWebappBase0
|
10
|
-
class Runner < ::Avm::Instances::Runner
|
11
|
-
class ApachePath
|
12
|
-
runner_with :help do
|
13
|
-
desc 'Configure Apache path configuration for instance.'
|
14
|
-
end
|
15
|
-
|
16
|
-
def run
|
17
|
-
if result.error?
|
18
|
-
fatal_error result.to_s
|
19
|
-
else
|
20
|
-
infov 'Result', result.label
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def apache_path_uncached
|
27
|
-
stereotype_apache_path_class.new(runner_context.call(:instance))
|
28
|
-
end
|
29
|
-
|
30
|
-
def result_uncached
|
31
|
-
apache_path.run
|
32
|
-
end
|
33
|
-
|
34
|
-
def stereotype_apache_path_class
|
35
|
-
"#{runner_context.call(:instance).class.name.deconstantize}::ApachePath".constantize
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/instances/runner'
|
4
|
-
require 'avm/path_string'
|
5
|
-
require 'eac_cli/core_ext'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module EacWebappBase0
|
9
|
-
class Runner < ::Avm::Instances::Runner
|
10
|
-
class Deploy
|
11
|
-
runner_with :help do
|
12
|
-
desc 'Deploy for instance.'
|
13
|
-
arg_opt '-r', '--reference', 'Git reference to deploy.'
|
14
|
-
arg_opt '-a', '--append-dirs', 'Append directories to deploy (List separated by ":").'
|
15
|
-
bool_opt '-T', '--no-request-test', 'Do not test web interface after deploy.'
|
16
|
-
end
|
17
|
-
|
18
|
-
def deploy_class
|
19
|
-
runner_context.call(:stereotype_module).const_get('Instances').const_get('Deploy')
|
20
|
-
rescue ::NameError
|
21
|
-
runner_context.call(:stereotype_module).const_get('Deploy')
|
22
|
-
end
|
23
|
-
|
24
|
-
def run
|
25
|
-
result = deploy_class.new(runner_context.call(:instance), deploy_options).run
|
26
|
-
if result.error?
|
27
|
-
fatal_error result.to_s
|
28
|
-
else
|
29
|
-
infov 'Result', result.label
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def deploy_options
|
34
|
-
{ reference: parsed.reference,
|
35
|
-
appended_directories: ::Avm::PathString.paths(parsed.append_dirs),
|
36
|
-
no_request_test: parsed.no_request_test? }
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|