eac_tools 0.47.1 → 0.48.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +45 -44
  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_python_base0/avm-eac_python_base0.gemspec +2 -2
  9. data/sub/avm-eac_python_base0/lib/avm/eac_python_base0/file_formats/base.rb +1 -1
  10. data/sub/avm-eac_python_base0/lib/avm/eac_python_base0/version.rb +1 -1
  11. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
  12. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  13. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +3 -3
  14. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +1 -0
  15. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/bundle.rb +28 -0
  16. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/code_runner.rb +28 -0
  17. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/log.rb +45 -0
  18. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs/clear.rb +27 -0
  19. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs.rb +19 -0
  20. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/rails_server.rb +34 -0
  21. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler/systemd_unit.rb +48 -0
  22. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler.rb +19 -0
  23. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/{runner.rb → instances/runners.rb} +4 -3
  24. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  25. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -3
  26. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb +1 -1
  27. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  28. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
  29. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +6 -6
  30. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  31. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb +4 -4
  32. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile.lock +27 -0
  33. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec.rb +4 -0
  34. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Gemfile.lock +19 -0
  35. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  36. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  37. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  38. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  39. metadata +44 -55
  40. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners/base.rb +0 -13
  41. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners.rb +0 -11
  42. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb +0 -26
  43. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb +0 -11
  44. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb +0 -26
  45. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb +0 -26
  46. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb +0 -43
  47. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb +0 -26
  48. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +0 -18
  49. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb +0 -32
  50. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +0 -46
  51. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb +0 -17
  52. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +0 -25
  53. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners.rb +0 -11
  54. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner.rb +0 -12
  55. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners/base.rb +0 -14
  56. 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: 24f75dde80d4c4479e5f7bdd1203f9aa4fdd06dda99579b0c5212e24a9959c87
4
- data.tar.gz: a3ea613d10868c65c5801a1876f043e7bc0512459d458f0f278c425ce13974be
3
+ metadata.gz: 171ff2484c7f126b41c7ce7cd1779956403eaab987125c00f667cae8b88f0f44
4
+ data.tar.gz: 3dbbead13aa461c61ade55f6bf2a7d226b2147ea410a419be436992bc95952f1
5
5
  SHA512:
6
- metadata.gz: ca9448f7b5e0b23dc4df3bbd8efdba689a2741c672720971728c897e4c84296fb1a63d8b1b81f8dc629dc61f977e18333bca4d45f89cea40b08dc6c9d153fcb5
7
- data.tar.gz: 304b367004e5d00ffb9efeb8a4fcf1151a6976dc525d6c1271115e539fa9b2eb91b1ba4b5c302e9660ae7e60ba3a47bd19fcfe51eca2fcf117ab370973705584
6
+ metadata.gz: f08562855ba9e9c9228de11b49086b2ff4fe2ffcd633dfc2fa4d21634e2cd2a318f6a67ad0d1ad09e20f6f9f8dd1bdacfddde34901eb254eb5d271e1192c78dc
7
+ data.tar.gz: f3abee1c74294f1029608a59986ad33fd1a484423f02079c7acf1fd433fb9c22d272fa7517bbc3e2450b3b07f94e027f4187f7d3ac62fb65cd9d262b8d42ab28
data/Gemfile.lock CHANGED
@@ -1,20 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.47.1)
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
- avm-eac_rails_base0 (~> 0.8, >= 0.8.1)
12
- avm-eac_rails_base1 (~> 0.7, >= 0.7.1)
13
- avm-eac_redmine_base0 (~> 0.17)
11
+ avm-eac_python_base0 (~> 0.2, >= 0.2.1)
12
+ avm-eac_rails_base0 (~> 0.9)
13
+ avm-eac_rails_base1 (~> 0.8)
14
+ avm-eac_redmine_base0 (~> 0.18)
14
15
  avm-eac_redmine_plugin_base0 (~> 0.4)
15
- avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
16
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
17
- avm-eac_wordpress_base0 (~> 0.2, >= 0.2.1)
16
+ avm-eac_ruby_base1 (~> 0.27, >= 0.27.3)
17
+ avm-eac_webapp_base0 (~> 0.13)
18
+ avm-eac_wordpress_base0 (~> 0.3)
18
19
  avm-tools (~> 0.142, >= 0.142.7)
19
20
  eac_ruby_utils (~> 0.109)
20
21
 
@@ -34,10 +35,10 @@ PATH
34
35
  PATH
35
36
  remote: sub/avm-eac_asciidoctor_base0
36
37
  specs:
37
- avm-eac_asciidoctor_base0 (0.12.0)
38
+ avm-eac_asciidoctor_base0 (0.13.0)
38
39
  asciidoctor (~> 2.0, >= 2.0.18)
39
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.2)
40
- eac_ruby_utils (~> 0.107)
40
+ avm-eac_webapp_base0 (~> 0.13)
41
+ eac_ruby_utils (~> 0.109)
41
42
  os (~> 1.1, >= 1.1.4)
42
43
  rouge (~> 3.30)
43
44
 
@@ -59,10 +60,10 @@ PATH
59
60
  PATH
60
61
  remote: sub/avm-eac_php_base0
61
62
  specs:
62
- avm-eac_php_base0 (0.4.0)
63
+ avm-eac_php_base0 (0.4.1)
63
64
  avm-eac_generic_base0 (~> 0.8)
64
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
65
- eac_ruby_utils (~> 0.108)
65
+ avm-eac_webapp_base0 (~> 0.13)
66
+ eac_ruby_utils (~> 0.109)
66
67
 
67
68
  PATH
68
69
  remote: sub/avm-eac_postgresql_base0
@@ -74,38 +75,38 @@ PATH
74
75
  PATH
75
76
  remote: sub/avm-eac_python_base0
76
77
  specs:
77
- avm-eac_python_base0 (0.2.0)
78
- avm-eac_generic_base0 (~> 0.7)
79
- eac_ruby_utils (~> 0.106)
78
+ avm-eac_python_base0 (0.2.1)
79
+ avm-eac_generic_base0 (~> 0.8)
80
+ eac_ruby_utils (~> 0.109)
80
81
 
81
82
  PATH
82
83
  remote: sub/avm-eac_rails_base0
83
84
  specs:
84
- avm-eac_rails_base0 (0.8.1)
85
- avm-eac_rails_base1 (~> 0.7)
86
- 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)
87
88
 
88
89
  PATH
89
90
  remote: sub/avm-eac_rails_base1
90
91
  specs:
91
- avm-eac_rails_base1 (0.7.1)
92
+ avm-eac_rails_base1 (0.8.0)
92
93
  avm (~> 0.57)
93
- avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
94
- avm-eac_webapp_base0 (~> 0.12, >= 0.12.3)
95
- 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)
96
97
 
97
98
  PATH
98
99
  remote: sub/avm-eac_redmine_base0
99
100
  specs:
100
- avm-eac_redmine_base0 (0.17.0)
101
+ avm-eac_redmine_base0 (0.18.0)
101
102
  avm (~> 0.57)
102
103
  avm-eac_generic_base0 (~> 0.8)
103
- avm-eac_rails_base1 (~> 0.7, >= 0.7.1)
104
+ avm-eac_rails_base1 (~> 0.8)
104
105
  avm-eac_ubuntu_base0 (~> 0.3)
105
106
  curb (~> 0.9, >= 0.9.11)
106
- eac_fs (~> 0.15)
107
+ eac_fs (~> 0.16)
107
108
  eac_rest (~> 0.6, >= 0.6.1)
108
- eac_ruby_utils (~> 0.107, >= 0.107.1)
109
+ eac_ruby_utils (~> 0.109)
109
110
 
110
111
  PATH
111
112
  remote: sub/avm-eac_redmine_plugin_base0
@@ -117,29 +118,29 @@ PATH
117
118
  PATH
118
119
  remote: sub/avm-eac_ruby_base1
119
120
  specs:
120
- avm-eac_ruby_base1 (0.27.1)
121
- avm (~> 0.56)
121
+ avm-eac_ruby_base1 (0.27.3)
122
+ avm (~> 0.57)
122
123
  avm-eac_generic_base0 (~> 0.8)
123
- eac_ruby_utils (~> 0.107, >= 0.107.1)
124
+ eac_ruby_utils (~> 0.109)
124
125
 
125
126
  PATH
126
127
  remote: sub/avm-eac_webapp_base0
127
128
  specs:
128
- avm-eac_webapp_base0 (0.12.3)
129
+ avm-eac_webapp_base0 (0.13.0)
129
130
  avm (~> 0.57)
130
131
  avm-eac_generic_base0 (~> 0.8)
131
- avm-eac_postgresql_base0 (~> 0.2, >= 0.2.1)
132
+ avm-eac_postgresql_base0 (~> 0.2, >= 0.2.2)
132
133
  avm-eac_ubuntu_base0 (~> 0.3)
133
134
  avm-files (~> 0.6)
134
- eac_ruby_utils (~> 0.107, >= 0.107.1)
135
+ eac_ruby_utils (~> 0.109)
135
136
 
136
137
  PATH
137
138
  remote: sub/avm-eac_wordpress_base0
138
139
  specs:
139
- avm-eac_wordpress_base0 (0.2.1)
140
- avm (~> 0.45)
141
- avm-eac_webapp_base0 (~> 0.9)
142
- 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)
143
144
 
144
145
  PATH
145
146
  remote: sub/avm-files
@@ -327,19 +328,19 @@ GEM
327
328
  minitest (5.16.3)
328
329
  multipart-post (2.2.3)
329
330
  net-ssh (4.2.0)
330
- nokogiri (1.13.9-x86_64-linux)
331
+ nokogiri (1.13.10-x86_64-linux)
331
332
  racc (~> 1.4)
332
333
  ofx-parser (1.1.0)
333
334
  hpricot (>= 0.6)
334
335
  os (1.1.4)
335
336
  parallel (1.22.1)
336
337
  parseconfig (1.1.2)
337
- parser (3.1.2.1)
338
+ parser (3.1.3.0)
338
339
  ast (~> 2.4.1)
339
340
  parslet (2.0.0)
340
- public_suffix (5.0.0)
341
- racc (1.6.0)
342
- rack (3.0.1)
341
+ public_suffix (5.0.1)
342
+ racc (1.6.1)
343
+ rack (3.0.2)
343
344
  rainbow (3.1.1)
344
345
  rchardet (1.8.0)
345
346
  rexml (3.2.5)
@@ -353,7 +354,7 @@ GEM
353
354
  rspec-expectations (3.12.0)
354
355
  diff-lcs (>= 1.2.0, < 2.0)
355
356
  rspec-support (~> 3.12.0)
356
- rspec-mocks (3.12.0)
357
+ rspec-mocks (3.12.1)
357
358
  diff-lcs (>= 1.2.0, < 2.0)
358
359
  rspec-support (~> 3.12.0)
359
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.1'
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,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_generic_base0', '~> 0.7'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.106'
15
+ s.add_dependency 'avm-eac_generic_base0', '~> 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', '>= 0.5.1'
19
19
  end
@@ -8,7 +8,7 @@ module Avm
8
8
  module FileFormats
9
9
  class Base < ::Avm::EacGenericBase0::FileFormats::Base
10
10
  VALID_BASENAMES = %w[*.py].freeze
11
- VALID_TYPES = ['x-python'].freeze
11
+ VALID_TYPES = ['x-python', 'x-script.python'].freeze
12
12
 
13
13
  def internal_apply(files)
14
14
  ::Avm::EacPythonBase0::Executables.yapf.command.append(['--in-place', *files]).system!
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacPythonBase0
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.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
@@ -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.56'
15
+ s.add_dependency 'avm', '~> 0.57'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.8'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.107', '>= 0.107.1'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
18
18
 
19
19
  s.add_development_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
20
20
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'