avm-eac_webapp_base0 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef908a36e6548511db94039c83e10cdc43a98a47bcde978b9a1d0a884c6202d3
4
- data.tar.gz: d4eafd0f5270d85c49ec87e78f43ca6f81a5fa66464db449629eb0fd40b4ac10
3
+ metadata.gz: d19706588763ddfb9486347626c14084ed45f6fef3456da2ba0a4c5f89075aed
4
+ data.tar.gz: 53a8ba40b77d924ed300e26c0d4436e90c565cd0882534a64e5b260c4a3e8e82
5
5
  SHA512:
6
- metadata.gz: d0afe6e4dd2bc5582225a9ad332c89ff3b33ab12b40726c97597b81a2ea55640ec236c654e81d58972de1a28b84a73dd91f35c12d48e28756757eaf1616b6dbd
7
- data.tar.gz: d0c7a37bb94ec9c11320ce783f47b95df52d1ecf48c0f74197479945dfd790a078393f4b8592ccfa2ccaf8fd221244cfb7a05fd109e683617e772ebf9a38de0e
6
+ metadata.gz: 2319d3ebf243fee42efe908daa895920e0c23cc9a0d2f1eb965a5e79581c6e1d860ff6a22acf907b847a48d648e32bc140890d44c99af53879b9fc5c543d40e7
7
+ data.tar.gz: f25dff84a1a0e9a6bb783201332465dc0a6e2830fbf578bd35c96e33d26d699ba77fa915489c39be7e42823d30c89e224a4b4f89c3dcc3f8b850a862343a17c5
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacWebappBase0
5
- VERSION = '0.6.1'
5
+ VERSION = '0.7.0'
6
6
  end
7
7
  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.6.1
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-20 00:00:00.000000000 Z
11
+ date: 2022-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -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