eac_tools 0.47.2 → 0.48.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +34 -34
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +2 -2
  5. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  6. data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +2 -2
  7. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +1 -1
  8. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
  9. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  10. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +3 -3
  11. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +1 -0
  12. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/bundle.rb +28 -0
  13. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/code_runner.rb +28 -0
  14. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/log.rb +45 -0
  15. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs/clear.rb +27 -0
  16. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs.rb +19 -0
  17. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/rails_server.rb +34 -0
  18. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler/systemd_unit.rb +48 -0
  19. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler.rb +19 -0
  20. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/{runner.rb → instances/runners.rb} +4 -3
  21. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  22. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -3
  23. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb +1 -1
  24. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  25. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  26. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  27. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  28. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  29. metadata +23 -56
  30. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners/base.rb +0 -13
  31. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners.rb +0 -11
  32. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb +0 -26
  33. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb +0 -11
  34. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb +0 -26
  35. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb +0 -26
  36. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb +0 -43
  37. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb +0 -26
  38. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +0 -18
  39. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb +0 -32
  40. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +0 -46
  41. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb +0 -17
  42. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +0 -25
  43. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners.rb +0 -11
  44. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner.rb +0 -12
  45. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners/base.rb +0 -14
  46. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d1686f4681d753bcc8fb8b0c40a99704ae171fe9cca28a0a6e639e7dc1ddde5
4
- data.tar.gz: f3d0612fabd22de4d4e32df9d4b976550c5266c0c92930eca71cfd6882e84046
3
+ metadata.gz: 171ff2484c7f126b41c7ce7cd1779956403eaab987125c00f667cae8b88f0f44
4
+ data.tar.gz: 3dbbead13aa461c61ade55f6bf2a7d226b2147ea410a419be436992bc95952f1
5
5
  SHA512:
6
- metadata.gz: 2616efcacfe0c154f8472dc90b6cdd04cfe14ed8e2ec97d37a6b7313e002f1d6dcc67c4e634b057d890d2e93a7c5c21b596364f33b4294ca3d8077c409c268ca
7
- data.tar.gz: 452475bfa82a589cac04c8417704289e2422174b35a6d05966606d76408af1f97e8e1ed55ea866f1790b7efcee201d4d5b0c2fe2412fe94a50357c2ed9b20b2a
6
+ metadata.gz: f08562855ba9e9c9228de11b49086b2ff4fe2ffcd633dfc2fa4d21634e2cd2a318f6a67ad0d1ad09e20f6f9f8dd1bdacfddde34901eb254eb5d271e1192c78dc
7
+ data.tar.gz: f3abee1c74294f1029608a59986ad33fd1a484423f02079c7acf1fd433fb9c22d272fa7517bbc3e2450b3b07f94e027f4187f7d3ac62fb65cd9d262b8d42ab28
data/Gemfile.lock CHANGED
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.47.2)
4
+ eac_tools (0.48.0)
5
5
  avm (~> 0.57)
6
- avm-eac_asciidoctor_base0 (~> 0.12)
6
+ avm-eac_asciidoctor_base0 (~> 0.13)
7
7
  avm-eac_generic_base0 (~> 0.8)
8
8
  avm-eac_latex_base0 (~> 0.3)
9
9
  avm-eac_php_base0 (~> 0.4)
10
10
  avm-eac_postgresql_base0 (~> 0.2, >= 0.2.2)
11
11
  avm-eac_python_base0 (~> 0.2, >= 0.2.1)
12
- avm-eac_rails_base0 (~> 0.8, >= 0.8.1)
13
- avm-eac_rails_base1 (~> 0.7, >= 0.7.1)
14
- avm-eac_redmine_base0 (~> 0.17)
12
+ avm-eac_rails_base0 (~> 0.9)
13
+ avm-eac_rails_base1 (~> 0.8)
14
+ avm-eac_redmine_base0 (~> 0.18)
15
15
  avm-eac_redmine_plugin_base0 (~> 0.4)
16
16
  avm-eac_ruby_base1 (~> 0.27, >= 0.27.3)
17
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
18
- avm-eac_wordpress_base0 (~> 0.2, >= 0.2.1)
17
+ avm-eac_webapp_base0 (~> 0.13)
18
+ avm-eac_wordpress_base0 (~> 0.3)
19
19
  avm-tools (~> 0.142, >= 0.142.7)
20
20
  eac_ruby_utils (~> 0.109)
21
21
 
@@ -35,10 +35,10 @@ PATH
35
35
  PATH
36
36
  remote: sub/avm-eac_asciidoctor_base0
37
37
  specs:
38
- avm-eac_asciidoctor_base0 (0.12.0)
38
+ avm-eac_asciidoctor_base0 (0.13.0)
39
39
  asciidoctor (~> 2.0, >= 2.0.18)
40
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.2)
41
- eac_ruby_utils (~> 0.107)
40
+ avm-eac_webapp_base0 (~> 0.13)
41
+ eac_ruby_utils (~> 0.109)
42
42
  os (~> 1.1, >= 1.1.4)
43
43
  rouge (~> 3.30)
44
44
 
@@ -60,10 +60,10 @@ PATH
60
60
  PATH
61
61
  remote: sub/avm-eac_php_base0
62
62
  specs:
63
- avm-eac_php_base0 (0.4.0)
63
+ avm-eac_php_base0 (0.4.1)
64
64
  avm-eac_generic_base0 (~> 0.8)
65
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
66
- eac_ruby_utils (~> 0.108)
65
+ avm-eac_webapp_base0 (~> 0.13)
66
+ eac_ruby_utils (~> 0.109)
67
67
 
68
68
  PATH
69
69
  remote: sub/avm-eac_postgresql_base0
@@ -82,31 +82,31 @@ PATH
82
82
  PATH
83
83
  remote: sub/avm-eac_rails_base0
84
84
  specs:
85
- avm-eac_rails_base0 (0.8.1)
86
- avm-eac_rails_base1 (~> 0.7)
87
- eac_ruby_utils (~> 0.104)
85
+ avm-eac_rails_base0 (0.9.0)
86
+ avm-eac_rails_base1 (~> 0.8)
87
+ eac_ruby_utils (~> 0.109)
88
88
 
89
89
  PATH
90
90
  remote: sub/avm-eac_rails_base1
91
91
  specs:
92
- avm-eac_rails_base1 (0.7.1)
92
+ avm-eac_rails_base1 (0.8.0)
93
93
  avm (~> 0.57)
94
- avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
95
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
96
- eac_ruby_utils (~> 0.107, >= 0.107.1)
94
+ avm-eac_ruby_base1 (~> 0.27, >= 0.27.3)
95
+ avm-eac_webapp_base0 (~> 0.13)
96
+ eac_ruby_utils (~> 0.109)
97
97
 
98
98
  PATH
99
99
  remote: sub/avm-eac_redmine_base0
100
100
  specs:
101
- avm-eac_redmine_base0 (0.17.0)
101
+ avm-eac_redmine_base0 (0.18.0)
102
102
  avm (~> 0.57)
103
103
  avm-eac_generic_base0 (~> 0.8)
104
- avm-eac_rails_base1 (~> 0.7, >= 0.7.1)
104
+ avm-eac_rails_base1 (~> 0.8)
105
105
  avm-eac_ubuntu_base0 (~> 0.3)
106
106
  curb (~> 0.9, >= 0.9.11)
107
- eac_fs (~> 0.15)
107
+ eac_fs (~> 0.16)
108
108
  eac_rest (~> 0.6, >= 0.6.1)
109
- eac_ruby_utils (~> 0.107, >= 0.107.1)
109
+ eac_ruby_utils (~> 0.109)
110
110
 
111
111
  PATH
112
112
  remote: sub/avm-eac_redmine_plugin_base0
@@ -126,21 +126,21 @@ PATH
126
126
  PATH
127
127
  remote: sub/avm-eac_webapp_base0
128
128
  specs:
129
- avm-eac_webapp_base0 (0.12.3)
129
+ avm-eac_webapp_base0 (0.13.0)
130
130
  avm (~> 0.57)
131
131
  avm-eac_generic_base0 (~> 0.8)
132
- avm-eac_postgresql_base0 (~> 0.2, >= 0.2.1)
132
+ avm-eac_postgresql_base0 (~> 0.2, >= 0.2.2)
133
133
  avm-eac_ubuntu_base0 (~> 0.3)
134
134
  avm-files (~> 0.6)
135
- eac_ruby_utils (~> 0.107, >= 0.107.1)
135
+ eac_ruby_utils (~> 0.109)
136
136
 
137
137
  PATH
138
138
  remote: sub/avm-eac_wordpress_base0
139
139
  specs:
140
- avm-eac_wordpress_base0 (0.2.1)
141
- avm (~> 0.45)
142
- avm-eac_webapp_base0 (~> 0.9)
143
- eac_ruby_utils (~> 0.104)
140
+ avm-eac_wordpress_base0 (0.3.0)
141
+ avm (~> 0.57)
142
+ avm-eac_webapp_base0 (~> 0.13)
143
+ eac_ruby_utils (~> 0.109)
144
144
 
145
145
  PATH
146
146
  remote: sub/avm-files
@@ -328,7 +328,7 @@ GEM
328
328
  minitest (5.16.3)
329
329
  multipart-post (2.2.3)
330
330
  net-ssh (4.2.0)
331
- nokogiri (1.13.9-x86_64-linux)
331
+ nokogiri (1.13.10-x86_64-linux)
332
332
  racc (~> 1.4)
333
333
  ofx-parser (1.1.0)
334
334
  hpricot (>= 0.6)
@@ -338,7 +338,7 @@ GEM
338
338
  parser (3.1.3.0)
339
339
  ast (~> 2.4.1)
340
340
  parslet (2.0.0)
341
- public_suffix (5.0.0)
341
+ public_suffix (5.0.1)
342
342
  racc (1.6.1)
343
343
  rack (3.0.2)
344
344
  rainbow (3.1.1)
@@ -354,7 +354,7 @@ GEM
354
354
  rspec-expectations (3.12.0)
355
355
  diff-lcs (>= 1.2.0, < 2.0)
356
356
  rspec-support (~> 3.12.0)
357
- rspec-mocks (3.12.0)
357
+ rspec-mocks (3.12.1)
358
358
  diff-lcs (>= 1.2.0, < 2.0)
359
359
  rspec-support (~> 3.12.0)
360
360
  rspec-support (3.12.0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.47.2'
4
+ VERSION = '0.48.0'
5
5
  end
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
15
  s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.18'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.12', '>= 0.12.2'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.107'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.13'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
18
18
  s.add_dependency 'os', '~> 1.1', '>= 1.1.4'
19
19
  s.add_dependency 'rouge', '~> 3.30'
20
20
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacAsciidoctorBase0
5
- VERSION = '0.12.0'
5
+ VERSION = '0.13.0'
6
6
  end
7
7
  end
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
15
  s.add_dependency 'avm-eac_generic_base0', '~> 0.8'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.12', '>= 0.12.3'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.108'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.13'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
18
18
 
19
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
20
20
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacPhpBase0
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
7
7
  end
@@ -12,8 +12,8 @@ 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.7'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.104'
15
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.8'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
19
19
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.8.1'
5
+ VERSION = '0.9.0'
6
6
  end
7
7
  end
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.57'
16
- s.add_dependency 'avm-eac_ruby_base1', '~> 0.27', '>= 0.27.1'
17
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.12', '>= 0.12.3'
18
- s.add_dependency 'eac_ruby_utils', '~> 0.107', '>= 0.107.1'
16
+ s.add_dependency 'avm-eac_ruby_base1', '~> 0.27', '>= 0.27.3'
17
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.13'
18
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
19
19
 
20
20
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
21
21
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/eac_rails_base1/instances/runners'
3
4
  require 'avm/eac_ruby_base1/sources/base'
4
5
  require 'avm/eac_webapp_base0/instances/base'
5
6
 
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/runner_with/bundle'
4
+ require 'eac_cli/core_ext'
5
+ require 'shellwords'
6
+
7
+ module Avm
8
+ module EacRailsBase1
9
+ module Instances
10
+ module Runners
11
+ class Bundle
12
+ runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle, :help do
13
+ desc 'Runs "bundle ...".'
14
+ pos_arg :'bundle-args', repeat: true, optional: true
15
+ end
16
+
17
+ def run
18
+ bundle_run
19
+ end
20
+
21
+ def bundle_args
22
+ parsed.bundle_args.reject { |arg| arg == '--' }
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/runner_with/bundle'
4
+ require 'eac_cli/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase1
8
+ module Instances
9
+ module Runners
10
+ class CodeRunner
11
+ runner_with :help, ::Avm::EacRailsBase1::RunnerWith::Bundle do
12
+ desc 'Runs a Ruby code with "rails runner".'
13
+ pos_arg :code
14
+ end
15
+
16
+ def run
17
+ infov 'Environment', runner_context.call(:instance).host_env
18
+ bundle_run
19
+ end
20
+
21
+ def bundle_args
22
+ %w[exec rails runner] + [parsed.code]
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/runner_with/rails_environment'
4
+
5
+ module Avm
6
+ module EacRailsBase1
7
+ module Instances
8
+ module Runners
9
+ class Log
10
+ runner_with :help, ::Avm::EacRailsBase1::RunnerWith::RailsEnvironment do
11
+ desc 'Read application\'s log.'
12
+ bool_opt '-f', '--follow', 'Output appended data as the log grows.'
13
+ end
14
+
15
+ def run
16
+ start_banner
17
+ tail_command.system
18
+ end
19
+
20
+ private
21
+
22
+ def log_path
23
+ ::File.join(rails_instance.read_entry('install.path'), 'log',
24
+ "#{rails_environment}.log")
25
+ end
26
+
27
+ def start_banner
28
+ infov 'Environment', rails_environment
29
+ infov 'Log path', log_path
30
+ end
31
+
32
+ def tail_command
33
+ rails_instance.host_env.command(*tail_command_args)
34
+ end
35
+
36
+ def tail_command_args
37
+ r = %w[tail]
38
+ r << '--follow' if parsed.follow?
39
+ r + [log_path]
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/runner_with/rails_environment'
4
+
5
+ module Avm
6
+ module EacRailsBase1
7
+ module Instances
8
+ module Runners
9
+ class Logs
10
+ class Clear
11
+ runner_with :help, ::Avm::EacRailsBase1::RunnerWith::Bundle do
12
+ desc 'Clear logs.'
13
+ end
14
+
15
+ def run
16
+ bundle_run
17
+ end
18
+
19
+ def bundle_args
20
+ %w[exec rake log:clear]
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+
5
+ module Avm
6
+ module EacRailsBase1
7
+ module Instances
8
+ module Runners
9
+ class Logs
10
+ require_sub __FILE__
11
+ runner_with :help, :subcommands do
12
+ desc 'Manipule multiple application\'s logs.'
13
+ subcommands
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/runner_with/bundle'
4
+ require 'avm/instances/entry_keys'
5
+ require 'eac_cli/core_ext'
6
+ require 'shellwords'
7
+
8
+ module Avm
9
+ module EacRailsBase1
10
+ module Instances
11
+ module Runners
12
+ class RailsServer
13
+ DEFAULT_RAILS_ENVIRONMENT = 'development'
14
+ runner_with :help, ::Avm::EacRailsBase1::RunnerWith::Bundle do
15
+ desc 'Run the embbeded Rails web server.'
16
+ end
17
+
18
+ def run
19
+ infov 'Environment', rails_environment
20
+ infov 'Bundle args', ::Shellwords.join(bundle_args)
21
+ infov 'Result', bundle_command.system
22
+ end
23
+
24
+ protected
25
+
26
+ def bundle_args
27
+ ['exec', 'rails', 'server', '--port',
28
+ runner_context.call(:instance).read_entry(::Avm::Instances::EntryKeys::WEB_PORT)]
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/instances/systemd_unit'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase1
8
+ module Instances
9
+ module Runners
10
+ class TasksScheduler
11
+ class SystemdUnit
12
+ DEFAULT_RESTART = 'on-failure'
13
+
14
+ runner_with :help do
15
+ desc 'Configure Systemd unit for instace\'s tasks scheduler daemon (Reference: ' \
16
+ 'https://www.freedesktop.org/software/systemd/man/systemd.service.html).'
17
+ bool_opt '-e', '--exec-run', 'Run daemon with "run" instead of "start"/"stop".'
18
+ arg_opt '-r', '--restart', 'Value for systemd.service, Restart=.',
19
+ default: DEFAULT_RESTART
20
+ end
21
+
22
+ delegate :restart, to: :parsed
23
+
24
+ def run
25
+ if result.error?
26
+ fatal_error result.to_s
27
+ else
28
+ infov 'Result', result.label
29
+ end
30
+ end
31
+
32
+ private
33
+
34
+ def systemd_unit_uncached
35
+ ::Avm::EacRailsBase1::Instances::SystemdUnit.new(runner_context.call(:instance),
36
+ restart: parsed.restart,
37
+ exec_run: parsed.exec_run?)
38
+ end
39
+
40
+ def result_uncached
41
+ systemd_unit.run
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRailsBase1
7
+ module Instances
8
+ module Runners
9
+ class TasksScheduler
10
+ require_sub __FILE__
11
+
12
+ runner_with :help, :subcommands do
13
+ subcommands
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_webapp_base0/runner'
4
3
  require 'eac_ruby_utils/core_ext'
5
4
 
6
5
  module Avm
7
6
  module EacRailsBase1
8
- class Runner < ::Avm::EacWebappBase0::Runner
9
- require_sub __FILE__
7
+ module Instances
8
+ module Runners
9
+ require_sub __FILE__
10
+ end
10
11
  end
11
12
  end
12
13
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.7.1'
5
+ VERSION = '0.8.0'
6
6
  end
7
7
  end
@@ -14,12 +14,12 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.57'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.8'
17
- s.add_dependency 'avm-eac_rails_base1', '~> 0.7', '>= 0.7.1'
17
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.8'
18
18
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
19
19
  s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
20
- s.add_dependency 'eac_fs', '~> 0.15'
20
+ s.add_dependency 'eac_fs', '~> 0.16'
21
21
  s.add_dependency 'eac_rest', '~> 0.6', '>= 0.6.1'
22
- s.add_dependency 'eac_ruby_utils', '~> 0.107', '>= 0.107.1'
22
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
23
23
 
24
24
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
25
25
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_cli/core_ext'
4
- require 'avm/eac_rails_base1/runner/code_runner'
4
+ require 'avm/eac_rails_base1/instances/runners/code_runner'
5
5
 
6
6
  module Avm
7
7
  module EacRedmineBase0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.17.0'
5
+ VERSION = '0.18.0'
6
6
  end
7
7
  end
@@ -14,10 +14,10 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.57'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.8'
17
- s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2', '>= 0.2.1'
17
+ s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2', '>= 0.2.2'
18
18
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
19
19
  s.add_dependency 'avm-files', '~> 0.6'
20
- s.add_dependency 'eac_ruby_utils', '~> 0.107', '>= 0.107.1'
20
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
21
21
 
22
22
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
23
23
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacWebappBase0
5
- VERSION = '0.12.3'
5
+ VERSION = '0.13.0'
6
6
  end
7
7
  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.45'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.9'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.104'
15
+ s.add_dependency 'avm', '~> 0.57'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.13'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
18
18
 
19
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
20
20
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacWordpressBase0
5
- VERSION = '0.2.1'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
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.47.2
4
+ version: 0.48.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-12-07 00:00:00.000000000 Z
11
+ date: 2022-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.12'
33
+ version: '0.13'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.12'
40
+ version: '0.13'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: avm-eac_generic_base0
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -126,54 +126,42 @@ dependencies:
126
126
  requirements:
127
127
  - - "~>"
128
128
  - !ruby/object:Gem::Version
129
- version: '0.8'
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: 0.8.1
129
+ version: '0.9'
133
130
  type: :runtime
134
131
  prerelease: false
135
132
  version_requirements: !ruby/object:Gem::Requirement
136
133
  requirements:
137
134
  - - "~>"
138
135
  - !ruby/object:Gem::Version
139
- version: '0.8'
140
- - - ">="
141
- - !ruby/object:Gem::Version
142
- version: 0.8.1
136
+ version: '0.9'
143
137
  - !ruby/object:Gem::Dependency
144
138
  name: avm-eac_rails_base1
145
139
  requirement: !ruby/object:Gem::Requirement
146
140
  requirements:
147
141
  - - "~>"
148
142
  - !ruby/object:Gem::Version
149
- version: '0.7'
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: 0.7.1
143
+ version: '0.8'
153
144
  type: :runtime
154
145
  prerelease: false
155
146
  version_requirements: !ruby/object:Gem::Requirement
156
147
  requirements:
157
148
  - - "~>"
158
149
  - !ruby/object:Gem::Version
159
- version: '0.7'
160
- - - ">="
161
- - !ruby/object:Gem::Version
162
- version: 0.7.1
150
+ version: '0.8'
163
151
  - !ruby/object:Gem::Dependency
164
152
  name: avm-eac_redmine_base0
165
153
  requirement: !ruby/object:Gem::Requirement
166
154
  requirements:
167
155
  - - "~>"
168
156
  - !ruby/object:Gem::Version
169
- version: '0.17'
157
+ version: '0.18'
170
158
  type: :runtime
171
159
  prerelease: false
172
160
  version_requirements: !ruby/object:Gem::Requirement
173
161
  requirements:
174
162
  - - "~>"
175
163
  - !ruby/object:Gem::Version
176
- version: '0.17'
164
+ version: '0.18'
177
165
  - !ruby/object:Gem::Dependency
178
166
  name: avm-eac_redmine_plugin_base0
179
167
  requirement: !ruby/object:Gem::Requirement
@@ -214,40 +202,28 @@ dependencies:
214
202
  requirements:
215
203
  - - "~>"
216
204
  - !ruby/object:Gem::Version
217
- version: '0.12'
218
- - - ">="
219
- - !ruby/object:Gem::Version
220
- version: 0.12.3
205
+ version: '0.13'
221
206
  type: :runtime
222
207
  prerelease: false
223
208
  version_requirements: !ruby/object:Gem::Requirement
224
209
  requirements:
225
210
  - - "~>"
226
211
  - !ruby/object:Gem::Version
227
- version: '0.12'
228
- - - ">="
229
- - !ruby/object:Gem::Version
230
- version: 0.12.3
212
+ version: '0.13'
231
213
  - !ruby/object:Gem::Dependency
232
214
  name: avm-eac_wordpress_base0
233
215
  requirement: !ruby/object:Gem::Requirement
234
216
  requirements:
235
217
  - - "~>"
236
218
  - !ruby/object:Gem::Version
237
- version: '0.2'
238
- - - ">="
239
- - !ruby/object:Gem::Version
240
- version: 0.2.1
219
+ version: '0.3'
241
220
  type: :runtime
242
221
  prerelease: false
243
222
  version_requirements: !ruby/object:Gem::Requirement
244
223
  requirements:
245
224
  - - "~>"
246
225
  - !ruby/object:Gem::Version
247
- version: '0.2'
248
- - - ">="
249
- - !ruby/object:Gem::Version
250
- version: 0.2.1
226
+ version: '0.3'
251
227
  - !ruby/object:Gem::Dependency
252
228
  name: avm-tools
253
229
  requirement: !ruby/object:Gem::Requirement
@@ -363,8 +339,6 @@ files:
363
339
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_macro_value.rb
364
340
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/pre_process_line.rb
365
341
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb
366
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners.rb
367
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners/base.rb
368
342
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/source_generators.rb
369
343
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/source_generators/base.rb
370
344
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources.rb
@@ -506,8 +480,6 @@ files:
506
480
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb
507
481
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances.rb
508
482
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb
509
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb
510
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb
511
483
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/source_generators/base.rb
512
484
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb
513
485
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb
@@ -553,18 +525,18 @@ files:
553
525
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances.rb
554
526
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_host.rb
555
527
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
528
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners.rb
529
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/bundle.rb
530
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/code_runner.rb
531
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/log.rb
532
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs.rb
533
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs/clear.rb
534
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/rails_server.rb
535
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler.rb
536
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler/systemd_unit.rb
556
537
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit.rb
557
538
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/service.rb
558
539
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.rb
559
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner.rb
560
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb
561
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb
562
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb
563
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb
564
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb
565
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb
566
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb
567
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb
568
540
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/bundle.rb
569
541
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb
570
542
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
@@ -591,8 +563,6 @@ files:
591
563
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners.rb
592
564
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/docker.rb
593
565
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb
594
- - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners.rb
595
- - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb
596
566
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources.rb
597
567
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb
598
568
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/core_update.rb
@@ -793,7 +763,6 @@ files:
793
763
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/dump.rb
794
764
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb
795
765
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
796
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner.rb
797
766
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources.rb
798
767
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources/base.rb
799
768
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb
@@ -826,8 +795,6 @@ files:
826
795
  - sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/apache_host.rb
827
796
  - sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/base.rb
828
797
  - sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/deploy.rb
829
- - sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners.rb
830
- - sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners/base.rb
831
798
  - sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb
832
799
  - sub/avm-eac_wordpress_base0/spec/lib/avm/eac_wordpress_base0/instances/apache_host_spec.rb
833
800
  - sub/avm-eac_wordpress_base0/spec/lib/avm/eac_wordpress_base0/instances/apache_host_spec_no_ssl_content.conf
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/runner'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- module Runners
8
- class Base < ::Avm::EacWebappBase0::Runner
9
- require_sub __FILE__
10
- end
11
- end
12
- end
13
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- module Runners
8
- require_sub __FILE__
9
- end
10
- end
11
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base0/instances/base'
4
- require 'avm/eac_rails_base0/deploy'
5
- require 'avm/eac_rails_base0/apache_host'
6
- require 'avm/eac_rails_base0/apache_path'
7
- require 'avm/eac_rails_base1/runner'
8
- require 'eac_ruby_utils/core_ext'
9
-
10
- module Avm
11
- module EacRailsBase0
12
- module Runners
13
- class Base < ::Avm::EacRailsBase1::Runner
14
- require_sub __FILE__
15
-
16
- STEREOTYPE_NAME = 'EacRailsBase0'
17
-
18
- class << self
19
- def stereotype_name
20
- STEREOTYPE_NAME
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase0
7
- module Runners
8
- require_sub __FILE__
9
- end
10
- end
11
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/runner_with/bundle'
4
- require 'eac_cli/core_ext'
5
- require 'shellwords'
6
-
7
- module Avm
8
- module EacRailsBase1
9
- class Runner < ::Avm::EacWebappBase0::Runner
10
- class Bundle
11
- runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle, :help do
12
- desc 'Runs "bundle ...".'
13
- pos_arg :'bundle-args', repeat: true, optional: true
14
- end
15
-
16
- def run
17
- bundle_run
18
- end
19
-
20
- def bundle_args
21
- parsed.bundle_args.reject { |arg| arg == '--' }
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/runner_with/bundle'
4
- require 'eac_cli/core_ext'
5
-
6
- module Avm
7
- module EacRailsBase1
8
- class Runner < ::Avm::EacWebappBase0::Runner
9
- class CodeRunner
10
- runner_with :help, ::Avm::EacRailsBase1::RunnerWith::Bundle do
11
- desc 'Runs a Ruby code with "rails runner".'
12
- pos_arg :code
13
- end
14
-
15
- def run
16
- infov 'Environment', runner_context.call(:instance).host_env
17
- bundle_run
18
- end
19
-
20
- def bundle_args
21
- %w[exec rails runner] + [parsed.code]
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/runner_with/rails_environment'
4
- require 'avm/eac_webapp_base0/runner'
5
-
6
- module Avm
7
- module EacRailsBase1
8
- class Runner < ::Avm::EacWebappBase0::Runner
9
- class Log
10
- runner_with :help, ::Avm::EacRailsBase1::RunnerWith::RailsEnvironment do
11
- desc 'Read application\'s log.'
12
- bool_opt '-f', '--follow', 'Output appended data as the log grows.'
13
- end
14
-
15
- def run
16
- start_banner
17
- tail_command.system
18
- end
19
-
20
- private
21
-
22
- def log_path
23
- ::File.join(rails_instance.read_entry('install.path'), 'log', "#{rails_environment}.log")
24
- end
25
-
26
- def start_banner
27
- infov 'Environment', rails_environment
28
- infov 'Log path', log_path
29
- end
30
-
31
- def tail_command
32
- rails_instance.host_env.command(*tail_command_args)
33
- end
34
-
35
- def tail_command_args
36
- r = %w[tail]
37
- r << '--follow' if parsed.follow?
38
- r + [log_path]
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/runner_with/rails_environment'
4
- require 'avm/eac_webapp_base0/runner'
5
-
6
- module Avm
7
- module EacRailsBase1
8
- class Runner < ::Avm::EacWebappBase0::Runner
9
- class Logs
10
- class Clear
11
- runner_with :help, ::Avm::EacRailsBase1::RunnerWith::Bundle do
12
- desc 'Clear logs.'
13
- end
14
-
15
- def run
16
- bundle_run
17
- end
18
-
19
- def bundle_args
20
- %w[exec rake log:clear]
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/runner'
4
- require 'eac_cli/core_ext'
5
-
6
- module Avm
7
- module EacRailsBase1
8
- class Runner < ::Avm::EacWebappBase0::Runner
9
- class Logs
10
- require_sub __FILE__
11
- runner_with :help, :subcommands do
12
- desc 'Manipule multiple application\'s logs.'
13
- subcommands
14
- end
15
- end
16
- end
17
- end
18
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/runner_with/bundle'
4
- require 'avm/instances/entry_keys'
5
- require 'eac_cli/core_ext'
6
- require 'shellwords'
7
-
8
- module Avm
9
- module EacRailsBase1
10
- class Runner < ::Avm::EacWebappBase0::Runner
11
- class RailsServer
12
- DEFAULT_RAILS_ENVIRONMENT = 'development'
13
- runner_with :help, ::Avm::EacRailsBase1::RunnerWith::Bundle do
14
- desc 'Run the embbeded Rails web server.'
15
- end
16
-
17
- def run
18
- infov 'Environment', rails_environment
19
- infov 'Bundle args', ::Shellwords.join(bundle_args)
20
- infov 'Result', bundle_command.system
21
- end
22
-
23
- protected
24
-
25
- def bundle_args
26
- ['exec', 'rails', 'server', '--port',
27
- runner_context.call(:instance).read_entry(::Avm::Instances::EntryKeys::WEB_PORT)]
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/instances/systemd_unit'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module EacRailsBase1
8
- class Runner < ::Avm::EacWebappBase0::Runner
9
- class TasksScheduler
10
- class SystemdUnit
11
- DEFAULT_RESTART = 'on-failure'
12
-
13
- runner_with :help do
14
- desc 'Configure Systemd unit for instace\'s tasks scheduler daemon (Reference: ' \
15
- 'https://www.freedesktop.org/software/systemd/man/systemd.service.html).'
16
- bool_opt '-e', '--exec-run', 'Run daemon with "run" instead of "start"/"stop".'
17
- arg_opt '-r', '--restart', 'Value for systemd.service, Restart=.',
18
- default: DEFAULT_RESTART
19
- end
20
-
21
- delegate :restart, to: :parsed
22
-
23
- def run
24
- if result.error?
25
- fatal_error result.to_s
26
- else
27
- infov 'Result', result.label
28
- end
29
- end
30
-
31
- private
32
-
33
- def systemd_unit_uncached
34
- ::Avm::EacRailsBase1::Instances::SystemdUnit.new(runner_context.call(:instance),
35
- restart: parsed.restart,
36
- exec_run: parsed.exec_run?)
37
- end
38
-
39
- def result_uncached
40
- systemd_unit.run
41
- end
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class Runner < ::Avm::EacWebappBase0::Runner
8
- class TasksScheduler
9
- require_sub __FILE__
10
-
11
- runner_with :help, :subcommands do
12
- subcommands
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_redmine_base0/instances/base'
4
- require 'avm/eac_redmine_base0/instances/deploy'
5
- require 'avm/eac_redmine_base0/instances/apache_host'
6
- require 'avm/eac_rails_base1/runner'
7
- require 'eac_ruby_utils/core_ext'
8
-
9
- module Avm
10
- module EacRedmineBase0
11
- module Runners
12
- class Base < ::Avm::EacRailsBase1::Runner
13
- require_sub __FILE__
14
-
15
- STEREOTYPE_NAME = 'EacRedmineBase0'
16
-
17
- class << self
18
- def stereotype_name
19
- STEREOTYPE_NAME
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRedmineBase0
7
- module Runners
8
- require_sub __FILE__
9
- end
10
- end
11
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/instances/runner'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module EacWebappBase0
8
- class Runner < ::Avm::Instances::Runner
9
- require_sub __FILE__
10
- end
11
- end
12
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/runner'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module EacWordpressBase0
8
- module Runners
9
- class Base < ::Avm::EacWebappBase0::Runner
10
- require_sub __FILE__
11
- end
12
- end
13
- end
14
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacWordpressBase0
7
- module Runners
8
- require_sub __FILE__
9
- end
10
- end
11
- end