eac_tools 0.47.2 → 0.48.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +55 -50
  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_postgresql_base0/avm-eac_postgresql_base0.gemspec +1 -1
  9. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +13 -7
  10. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance.rb +16 -1
  11. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +1 -1
  12. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
  13. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  14. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +3 -3
  15. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +1 -0
  16. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/bundle.rb +28 -0
  17. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/code_runner.rb +28 -0
  18. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/log.rb +45 -0
  19. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs/clear.rb +27 -0
  20. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs.rb +19 -0
  21. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/rails_server.rb +34 -0
  22. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler/systemd_unit.rb +48 -0
  23. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler.rb +19 -0
  24. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/{runner.rb → instances/runners.rb} +4 -3
  25. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  26. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -3
  27. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb +1 -1
  28. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  29. data/sub/avm-eac_ubuntu_base0/Gemfile +5 -0
  30. data/sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec +21 -0
  31. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/apache/resource.rb +59 -0
  32. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/apache.rb +26 -0
  33. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/docker_image.rb +29 -0
  34. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances/base.rb +22 -0
  35. data/sub/{avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners.rb → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances.rb} +2 -2
  36. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/rspec/ssh_docker_server.rb +84 -0
  37. data/sub/{avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/rspec.rb} +2 -2
  38. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base/docker.rb +19 -0
  39. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base.rb +28 -0
  40. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb +7 -0
  41. data/sub/{avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners.rb → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0.rb} +2 -4
  42. data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/docker_image_spec.rb +16 -0
  43. data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base/docker_spec.rb +14 -0
  44. data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base_spec.rb +7 -0
  45. data/sub/avm-eac_ubuntu_base0/spec/rubocop_spec.rb +3 -0
  46. data/sub/avm-eac_ubuntu_base0/spec/spec_helper.rb +4 -0
  47. data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/docker_image/Dockerfile.template +24 -0
  48. data/sub/{avm-tools/spec/spec_helper/stub_templates/stubbed_docker_server → avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server}/Dockerfile +0 -0
  49. data/sub/{avm-tools/spec/spec_helper/stub_templates/stubbed_docker_server → avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server}/id_rsa +0 -0
  50. data/sub/{avm-tools/spec/spec_helper/stub_templates/stubbed_docker_server → avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server}/id_rsa.pub +0 -0
  51. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  52. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  53. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  54. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  55. data/sub/avm-tools/avm-tools.gemspec +3 -3
  56. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  57. data/sub/avm-tools/spec/lib/avm/tools/runner/git/deploy_spec.rb +4 -2
  58. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -0
  59. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/composite_command.rb +14 -2
  60. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +2 -1
  61. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  62. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/{command_spec.rb → command/base_example.rb} +2 -5
  63. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/local_env_spec.rb +11 -0
  64. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/ssh_env_spec.rb +17 -0
  65. metadata +64 -66
  66. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners/base.rb +0 -13
  67. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners.rb +0 -11
  68. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb +0 -26
  69. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb +0 -26
  70. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb +0 -26
  71. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb +0 -43
  72. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb +0 -26
  73. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +0 -18
  74. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb +0 -32
  75. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +0 -46
  76. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb +0 -17
  77. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +0 -25
  78. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner.rb +0 -12
  79. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners/base.rb +0 -14
  80. data/sub/avm-tools/spec/spec_helper/stubbed_docker_server.rb +0 -93
  81. data/sub/avm-tools/spec/spec_helper/templates.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d1686f4681d753bcc8fb8b0c40a99704ae171fe9cca28a0a6e639e7dc1ddde5
4
- data.tar.gz: f3d0612fabd22de4d4e32df9d4b976550c5266c0c92930eca71cfd6882e84046
3
+ metadata.gz: 3952d236b92a07dab2d6090167fce27692d8c9a12114d77ec5cf17b55a914c91
4
+ data.tar.gz: ce7c0f2f4855475d499a72a0f5e956468e79e9f38b49004fecd94400e2f24662
5
5
  SHA512:
6
- metadata.gz: 2616efcacfe0c154f8472dc90b6cdd04cfe14ed8e2ec97d37a6b7313e002f1d6dcc67c4e634b057d890d2e93a7c5c21b596364f33b4294ca3d8077c409c268ca
7
- data.tar.gz: 452475bfa82a589cac04c8417704289e2422174b35a6d05966606d76408af1f97e8e1ed55ea866f1790b7efcee201d4d5b0c2fe2412fe94a50357c2ed9b20b2a
6
+ metadata.gz: ffc30f40ffde2c2454d4939a491dbc1671da9481be935c5a07b3fa5a65a9e2a05307238e7100620a92c8e86c99667ebb1aee589d283884a69d5a2b013a054649
7
+ data.tar.gz: 6c30ff53dfe58d88fb1af3162121d36c8e7c68c056d9850b897d0e6e1b233be149e72b6f2a9d9c075db6a11da45cfa1c24b1d9c62ba6620fab223e5f97b97862
data/Gemfile.lock CHANGED
@@ -1,23 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.47.2)
4
+ eac_tools (0.48.1)
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
- avm-eac_php_base0 (~> 0.4)
10
- avm-eac_postgresql_base0 (~> 0.2, >= 0.2.2)
9
+ avm-eac_php_base0 (~> 0.4, >= 0.4.1)
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.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)
19
- avm-tools (~> 0.142, >= 0.142.7)
20
- eac_ruby_utils (~> 0.109)
17
+ avm-eac_webapp_base0 (~> 0.13)
18
+ avm-eac_wordpress_base0 (~> 0.3)
19
+ avm-tools (~> 0.142, >= 0.142.8)
20
+ eac_ruby_utils (~> 0.109, >= 0.109.1)
21
21
 
22
22
  PATH
23
23
  remote: sub/aranha-parsers
@@ -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,17 +60,17 @@ 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
70
70
  specs:
71
- avm-eac_postgresql_base0 (0.2.2)
71
+ avm-eac_postgresql_base0 (0.2.3)
72
72
  avm (~> 0.57)
73
- eac_ruby_utils (~> 0.108)
73
+ eac_ruby_utils (~> 0.109)
74
74
 
75
75
  PATH
76
76
  remote: sub/avm-eac_python_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
@@ -123,24 +123,32 @@ PATH
123
123
  avm-eac_generic_base0 (~> 0.8)
124
124
  eac_ruby_utils (~> 0.109)
125
125
 
126
+ PATH
127
+ remote: sub/avm-eac_ubuntu_base0
128
+ specs:
129
+ avm-eac_ubuntu_base0 (0.4.0)
130
+ avm (~> 0.57)
131
+ eac_ruby_utils (~> 0.109)
132
+ eac_templates (~> 0.3, >= 0.3.2)
133
+
126
134
  PATH
127
135
  remote: sub/avm-eac_webapp_base0
128
136
  specs:
129
- avm-eac_webapp_base0 (0.12.3)
137
+ avm-eac_webapp_base0 (0.13.0)
130
138
  avm (~> 0.57)
131
139
  avm-eac_generic_base0 (~> 0.8)
132
- avm-eac_postgresql_base0 (~> 0.2, >= 0.2.1)
140
+ avm-eac_postgresql_base0 (~> 0.2, >= 0.2.2)
133
141
  avm-eac_ubuntu_base0 (~> 0.3)
134
142
  avm-files (~> 0.6)
135
- eac_ruby_utils (~> 0.107, >= 0.107.1)
143
+ eac_ruby_utils (~> 0.109)
136
144
 
137
145
  PATH
138
146
  remote: sub/avm-eac_wordpress_base0
139
147
  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)
148
+ avm-eac_wordpress_base0 (0.3.0)
149
+ avm (~> 0.57)
150
+ avm-eac_webapp_base0 (~> 0.13)
151
+ eac_ruby_utils (~> 0.109)
144
152
 
145
153
  PATH
146
154
  remote: sub/avm-files
@@ -165,11 +173,11 @@ PATH
165
173
  PATH
166
174
  remote: sub/avm-tools
167
175
  specs:
168
- avm-tools (0.142.7)
176
+ avm-tools (0.142.8)
169
177
  aranha-parsers (~> 0.14, >= 0.14.4)
170
178
  avm (~> 0.57)
171
- avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
172
- avm-eac_ubuntu_base0 (~> 0.3)
179
+ avm-eac_ruby_base1 (~> 0.27, >= 0.27.3)
180
+ avm-eac_ubuntu_base0 (~> 0.4)
173
181
  avm-files (~> 0.6)
174
182
  avm-git (~> 0.10, >= 0.10.1)
175
183
  clipboard (~> 1.3, >= 1.3.6)
@@ -177,7 +185,7 @@ PATH
177
185
  eac_git (~> 0.14)
178
186
  eac_ruby_base0 (~> 0.17, >= 0.17.1)
179
187
  eac_templates (~> 0.3, >= 0.3.2)
180
- git (~> 1.12)
188
+ git (~> 1.13)
181
189
  ruby-progressbar (~> 1.11)
182
190
 
183
191
  PATH
@@ -245,7 +253,7 @@ PATH
245
253
  PATH
246
254
  remote: sub/eac_ruby_utils
247
255
  specs:
248
- eac_ruby_utils (0.109.0)
256
+ eac_ruby_utils (0.109.1)
249
257
  activesupport (>= 4, < 7)
250
258
  addressable (~> 2.8, >= 2.8.1)
251
259
  bundler
@@ -265,10 +273,6 @@ GEM
265
273
  public_suffix (>= 2.0.2, < 6.0)
266
274
  asciidoctor (2.0.18)
267
275
  ast (2.4.2)
268
- avm-eac_ubuntu_base0 (0.3.0)
269
- avm (~> 0.7)
270
- eac_ruby_utils (~> 0.77, >= 0.77.1)
271
- eac_templates (~> 0.3)
272
276
  clipboard (1.3.6)
273
277
  colorize (0.8.1)
274
278
  concurrent-ruby (1.1.10)
@@ -316,7 +320,7 @@ GEM
316
320
  faraday_middleware (1.2.0)
317
321
  faraday (~> 1.0)
318
322
  filesize (0.2.0)
319
- git (1.12.0)
323
+ git (1.13.0)
320
324
  addressable (~> 2.8)
321
325
  rchardet (~> 1.8)
322
326
  hpricot (0.8.6)
@@ -328,7 +332,7 @@ GEM
328
332
  minitest (5.16.3)
329
333
  multipart-post (2.2.3)
330
334
  net-ssh (4.2.0)
331
- nokogiri (1.13.9-x86_64-linux)
335
+ nokogiri (1.13.10-x86_64-linux)
332
336
  racc (~> 1.4)
333
337
  ofx-parser (1.1.0)
334
338
  hpricot (>= 0.6)
@@ -338,7 +342,7 @@ GEM
338
342
  parser (3.1.3.0)
339
343
  ast (~> 2.4.1)
340
344
  parslet (2.0.0)
341
- public_suffix (5.0.0)
345
+ public_suffix (5.0.1)
342
346
  racc (1.6.1)
343
347
  rack (3.0.2)
344
348
  rainbow (3.1.1)
@@ -354,7 +358,7 @@ GEM
354
358
  rspec-expectations (3.12.0)
355
359
  diff-lcs (>= 1.2.0, < 2.0)
356
360
  rspec-support (~> 3.12.0)
357
- rspec-mocks (3.12.0)
361
+ rspec-mocks (3.12.1)
358
362
  diff-lcs (>= 1.2.0, < 2.0)
359
363
  rspec-support (~> 3.12.0)
360
364
  rspec-support (3.12.0)
@@ -397,6 +401,7 @@ DEPENDENCIES
397
401
  avm-eac_redmine_base0!
398
402
  avm-eac_redmine_plugin_base0!
399
403
  avm-eac_ruby_base1!
404
+ avm-eac_ubuntu_base0!
400
405
  avm-eac_webapp_base0!
401
406
  avm-eac_wordpress_base0!
402
407
  avm-files!
@@ -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.1'
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
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.57'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.108'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.109'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
19
19
  end
@@ -7,6 +7,7 @@ module Avm
7
7
  class Instance
8
8
  class DataUnit < ::Avm::Instances::Data::Unit
9
9
  EXTENSION = '.pgdump.gz'
10
+ TABLES_SQL = 'select tablename from pg_tables where schemaname = \'public\''
10
11
 
11
12
  before_load :clear_database
12
13
 
@@ -15,24 +16,29 @@ module Avm
15
16
  end
16
17
 
17
18
  def load_command
18
- instance.psql_command.prepend(['gzip', '-d', '@ESC_|'])
19
+ instance.load_gzip_command
19
20
  end
20
21
 
21
22
  private
22
23
 
23
24
  def clear_database
24
25
  info 'Clearing database (Dropping all tables)...'
25
- run_sql(drop_all_tables_sql).if_present { |v| run_sql(v) }
26
- end
27
-
28
- def drop_all_tables_sql
29
- "select 'drop table \"' || tablename || '\" cascade;' from pg_tables " \
30
- "where schemaname = 'public';"
26
+ ts = tables
27
+ if ts.empty?
28
+ info 'Database has no tables'
29
+ else
30
+ info "Removing #{ts.count} table(s)..."
31
+ run_sql('drop table ' + ts.map { |t| "\"#{t}\"" }.join(', ') + ' cascade')
32
+ end
31
33
  end
32
34
 
33
35
  def run_sql(sql)
34
36
  instance.psql_command_command(sql).execute!
35
37
  end
38
+
39
+ def tables
40
+ run_sql(TABLES_SQL).each_line.map(&:strip).reject(&:blank?)
41
+ end
36
42
  end
37
43
  end
38
44
  end
@@ -29,7 +29,22 @@ module Avm
29
29
 
30
30
  # @return [EacRubyUtils::Envs::Command]
31
31
  def dump_gzip_command
32
- dump_command.pipe(env.command('gzip', '-9', '-c'))
32
+ dump_command.pipe(gzip_compress_command)
33
+ end
34
+
35
+ # @return [EacRubyUtils::Envs::Command]
36
+ def gzip_compress_command
37
+ env.command('gzip', '-9', '-c')
38
+ end
39
+
40
+ # @return [EacRubyUtils::Envs::Command]
41
+ def gzip_decompress_command
42
+ env.command('gzip', '-d')
43
+ end
44
+
45
+ # @return [EacRubyUtils::Envs::Command]
46
+ def load_gzip_command
47
+ gzip_decompress_command.pipe(psql_command)
33
48
  end
34
49
 
35
50
  # @return [String]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacPostgresqlBase0
5
- VERSION = '0.2.2'
5
+ VERSION = '0.2.3'
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