eac_tools 0.31.0 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +54 -49
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/avm.gemspec +4 -4
  5. data/sub/avm/lib/avm/entries/auto_values/entry.rb +11 -4
  6. data/sub/avm/lib/avm/entries/base/uri_components_entries_values/component_factory.rb +42 -0
  7. data/sub/avm/lib/avm/entries/base/uri_components_entries_values/generic_component.rb +52 -0
  8. data/sub/avm/lib/avm/entries/base/uri_components_entries_values/path_component.rb +19 -0
  9. data/sub/avm/lib/avm/entries/base/uri_components_entries_values/url_component.rb +28 -0
  10. data/sub/avm/lib/avm/entries/base/uri_components_entries_values.rb +25 -0
  11. data/sub/avm/lib/avm/entries/base.rb +7 -0
  12. data/sub/avm/lib/avm/entries/jobs/base.rb +62 -0
  13. data/sub/avm/lib/avm/entries/jobs/variables_source/read_entry.rb +50 -0
  14. data/sub/avm/lib/avm/entries/jobs/variables_source.rb +15 -0
  15. data/sub/avm/lib/avm/entries/jobs/with_variables_source.rb +15 -0
  16. data/sub/avm/lib/avm/entries/jobs.rb +11 -0
  17. data/sub/avm/lib/avm/entries/keys_constants_set.rb +43 -0
  18. data/sub/avm/lib/avm/instances/base/entry_keys.rb +1 -1
  19. data/sub/avm/lib/avm/instances/base/install.rb +24 -0
  20. data/sub/avm/lib/avm/instances/base/web.rb +16 -0
  21. data/sub/avm/lib/avm/instances/base.rb +1 -1
  22. data/sub/avm/lib/avm/instances/entry_keys.rb +3 -22
  23. data/sub/avm/lib/avm/rspec/setup.rb +7 -8
  24. data/sub/avm/lib/avm/rspec/shared_examples/entries_values.rb +23 -0
  25. data/sub/avm/lib/avm/version.rb +1 -1
  26. data/sub/avm/spec/lib/avm/instances/base_spec.rb +77 -97
  27. data/sub/avm/spec/lib/avm/instances/{base_spec_configs_storage.yml → base_spec_files/config.yml} +0 -0
  28. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +2 -2
  29. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_host.rb +2 -2
  30. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_path.rb +2 -2
  31. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb +2 -2
  32. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  33. data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
  34. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/apache_host.rb +2 -2
  35. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/deploy.rb +2 -2
  36. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
  37. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
  38. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb +2 -2
  39. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb +2 -2
  40. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +2 -2
  41. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  42. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +4 -4
  43. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_host.rb +19 -0
  44. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/service.rb +72 -0
  45. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.rb +31 -0
  46. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit.rb +59 -0
  47. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +4 -4
  48. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  49. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/{systemd_unit → instances/systemd_unit}/tasks_scheduler.service +0 -0
  50. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/{systemd_unit → instances/systemd_unit}/tasks_scheduler_command.sh +0 -0
  51. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
  52. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/apache_host.rb +2 -2
  53. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/database.rb +30 -0
  54. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +42 -0
  55. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/web.rb +20 -0
  56. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +1 -0
  57. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +2 -2
  58. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +2 -6
  59. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  60. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec.rb +26 -0
  61. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec_files/config.yml +10 -0
  62. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +11 -3
  63. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  64. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +85 -0
  65. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb +54 -0
  66. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +1 -1
  67. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb +27 -0
  68. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb +50 -0
  69. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/file_unit.rb +44 -0
  70. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/git_info.rb +64 -0
  71. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/version.rb +26 -0
  72. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/write_on_target.rb +20 -0
  73. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +75 -0
  74. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  75. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/{apache_host → instances/apache_host}/no_ssl.conf +0 -0
  76. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/{apache_path → instances/apache_path}/default.conf +0 -0
  77. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  78. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/apache_host.rb +2 -2
  79. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/deploy.rb +2 -2
  80. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  81. data/sub/avm-tools/avm-tools.gemspec +2 -2
  82. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  83. data/sub/eac_git/Gemfile +8 -0
  84. data/sub/eac_git/eac_git.gemspec +20 -0
  85. data/sub/eac_git/lib/eac_git/executables.rb +48 -0
  86. data/sub/eac_git/lib/eac_git/local/branch.rb +27 -0
  87. data/sub/eac_git/lib/eac_git/local/commit/archive.rb +19 -0
  88. data/sub/eac_git/lib/eac_git/local/commit/changed_file.rb +46 -0
  89. data/sub/eac_git/lib/eac_git/local/commit/diff_tree_line.rb +32 -0
  90. data/sub/eac_git/lib/eac_git/local/commit.rb +73 -0
  91. data/sub/eac_git/lib/eac_git/local/dirty_files.rb +37 -0
  92. data/sub/eac_git/lib/eac_git/local/log.rb +17 -0
  93. data/sub/eac_git/lib/eac_git/local/remote.rb +27 -0
  94. data/sub/eac_git/lib/eac_git/local/remotes.rb +20 -0
  95. data/sub/eac_git/lib/eac_git/local/subrepo/config.rb +43 -0
  96. data/sub/eac_git/lib/eac_git/local/subrepo.rb +49 -0
  97. data/sub/eac_git/lib/eac_git/local.rb +127 -0
  98. data/sub/eac_git/lib/eac_git/remote/ls_result.rb +20 -0
  99. data/sub/eac_git/lib/eac_git/remote.rb +19 -0
  100. data/sub/eac_git/lib/eac_git/rspec/setup.rb +23 -0
  101. data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +71 -0
  102. data/sub/{avm/lib/avm/jobs.rb → eac_git/lib/eac_git/rspec.rb} +2 -2
  103. data/sub/eac_git/lib/eac_git/version.rb +5 -0
  104. data/sub/eac_git/lib/eac_git.rb +7 -0
  105. data/sub/eac_git/spec/lib/eac_git/executables_spec.rb +13 -0
  106. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec.rb +13 -0
  107. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.source.out +1 -0
  108. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
  109. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.source.out +1 -0
  110. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
  111. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.source.out +1 -0
  112. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
  113. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.source.out +2 -0
  114. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
  115. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
  116. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
  117. data/sub/eac_git/spec/lib/eac_git/local/commit_spec.rb +58 -0
  118. data/sub/eac_git/spec/rubocop_spec.rb +3 -0
  119. data/sub/eac_git/spec/spec_helper.rb +4 -0
  120. data/sub/eac_git/vendor/git-subrepo/Changes +110 -0
  121. data/sub/eac_git/vendor/git-subrepo/Intro.pod +509 -0
  122. data/sub/eac_git/vendor/git-subrepo/License +21 -0
  123. data/sub/eac_git/vendor/git-subrepo/Makefile +82 -0
  124. data/sub/eac_git/vendor/git-subrepo/Meta +28 -0
  125. data/sub/eac_git/vendor/git-subrepo/ReadMe.pod +698 -0
  126. data/sub/eac_git/vendor/git-subrepo/doc/comparison.swim +35 -0
  127. data/sub/eac_git/vendor/git-subrepo/doc/git-subrepo.swim +608 -0
  128. data/sub/eac_git/vendor/git-subrepo/doc/intro-to-subrepo.swim +387 -0
  129. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Changes +15 -0
  130. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/License +21 -0
  131. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Makefile +45 -0
  132. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Meta +28 -0
  133. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/ReadMe.pod +77 -0
  134. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/bin/bash+ +43 -0
  135. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +61 -0
  136. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +92 -0
  137. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +134 -0
  138. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +134 -0
  139. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/base.t +12 -0
  140. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/fcopy.t +22 -0
  141. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/bar.bash +3 -0
  142. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/foo.bash +3 -0
  143. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +18 -0
  144. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +23 -0
  145. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/test.bash +70 -0
  146. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/use.t +19 -0
  147. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Changes +15 -0
  148. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/License +21 -0
  149. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Makefile +20 -0
  150. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Meta +30 -0
  151. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +115 -0
  152. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +89 -0
  153. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +15 -0
  154. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +21 -0
  155. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +45 -0
  156. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +28 -0
  157. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +77 -0
  158. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +43 -0
  159. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +61 -0
  160. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +92 -0
  161. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +134 -0
  162. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +134 -0
  163. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +12 -0
  164. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +22 -0
  165. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/bar.bash +3 -0
  166. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/foo.bash +3 -0
  167. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +18 -0
  168. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +23 -0
  169. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/test.bash +70 -0
  170. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +19 -0
  171. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +15 -0
  172. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +21 -0
  173. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +37 -0
  174. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +28 -0
  175. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +66 -0
  176. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +48 -0
  177. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +153 -0
  178. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +119 -0
  179. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +13 -0
  180. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/done.t +10 -0
  181. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +20 -0
  182. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +15 -0
  183. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +9 -0
  184. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/pass.t +9 -0
  185. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/plan.t +10 -0
  186. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/skip_all.t +20 -0
  187. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +13 -0
  188. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/bail.t +14 -0
  189. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail.t +7 -0
  190. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail_fast.t +12 -0
  191. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-init.t +8 -0
  192. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-plan.t +9 -0
  193. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +95 -0
  194. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +173 -0
  195. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/fail.t +20 -0
  196. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/more.t +20 -0
  197. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/pass.t +9 -0
  198. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/setup +8 -0
  199. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/skip_all.t +11 -0
  200. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +12 -0
  201. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/skip_all.t +10 -0
  202. data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo +1903 -0
  203. data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/bash+.bash +1 -0
  204. data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +339 -0
  205. data/sub/eac_git/vendor/git-subrepo/man/man1/git-subrepo.1 +743 -0
  206. data/sub/eac_git/vendor/git-subrepo/note/0.4.0 +12 -0
  207. data/sub/eac_git/vendor/git-subrepo/note/AllGitCmds +148 -0
  208. data/sub/eac_git/vendor/git-subrepo/note/Cases +32 -0
  209. data/sub/eac_git/vendor/git-subrepo/note/Commands +33 -0
  210. data/sub/eac_git/vendor/git-subrepo/note/Dags +199 -0
  211. data/sub/eac_git/vendor/git-subrepo/note/Gists +7 -0
  212. data/sub/eac_git/vendor/git-subrepo/note/Links +25 -0
  213. data/sub/eac_git/vendor/git-subrepo/note/Plugins +10 -0
  214. data/sub/eac_git/vendor/git-subrepo/note/Spec +39 -0
  215. data/sub/eac_git/vendor/git-subrepo/note/Story1 +57 -0
  216. data/sub/eac_git/vendor/git-subrepo/note/ToDo +55 -0
  217. data/sub/eac_git/vendor/git-subrepo/note/design.swim +137 -0
  218. data/sub/eac_git/vendor/git-subrepo/note/design2.swim +85 -0
  219. data/sub/eac_git/vendor/git-subrepo/note/init-test +38 -0
  220. data/sub/eac_git/vendor/git-subrepo/note/pull-dance.txt +18 -0
  221. data/sub/eac_git/vendor/git-subrepo/note/recreate-rebase-conflict.sh +56 -0
  222. data/sub/eac_git/vendor/git-subrepo/note/subtree-rebase-fail-example/test.bash +29 -0
  223. data/sub/eac_git/vendor/git-subrepo/note/test-subrepo-push.sh +69 -0
  224. data/sub/eac_git/vendor/git-subrepo/note/test.sh +58 -0
  225. data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-completion.pl +210 -0
  226. data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +89 -0
  227. data/sub/eac_git/vendor/git-subrepo/share/completion.bash +42 -0
  228. data/sub/eac_git/vendor/git-subrepo/share/enable-completion.sh +50 -0
  229. data/sub/eac_git/vendor/git-subrepo/share/git-completion.bash +2738 -0
  230. data/sub/eac_git/vendor/git-subrepo/share/zsh-completion/_git-subrepo +81 -0
  231. data/sub/eac_git/vendor/git-subrepo/test/branch-all.t +41 -0
  232. data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t +43 -0
  233. data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list.t +47 -0
  234. data/sub/eac_git/vendor/git-subrepo/test/branch.t +52 -0
  235. data/sub/eac_git/vendor/git-subrepo/test/clean.t +43 -0
  236. data/sub/eac_git/vendor/git-subrepo/test/clone-annotated-tag.t +45 -0
  237. data/sub/eac_git/vendor/git-subrepo/test/clone.t +107 -0
  238. data/sub/eac_git/vendor/git-subrepo/test/compile.t +19 -0
  239. data/sub/eac_git/vendor/git-subrepo/test/config.t +58 -0
  240. data/sub/eac_git/vendor/git-subrepo/test/encode.t +91 -0
  241. data/sub/eac_git/vendor/git-subrepo/test/error.t +171 -0
  242. data/sub/eac_git/vendor/git-subrepo/test/fetch.t +43 -0
  243. data/sub/eac_git/vendor/git-subrepo/test/gitignore.t +61 -0
  244. data/sub/eac_git/vendor/git-subrepo/test/init.t +64 -0
  245. data/sub/eac_git/vendor/git-subrepo/test/issue29.t +98 -0
  246. data/sub/eac_git/vendor/git-subrepo/test/issue95.t +98 -0
  247. data/sub/eac_git/vendor/git-subrepo/test/issue96.t +96 -0
  248. data/sub/eac_git/vendor/git-subrepo/test/pull-all.t +38 -0
  249. data/sub/eac_git/vendor/git-subrepo/test/pull-merge.t +113 -0
  250. data/sub/eac_git/vendor/git-subrepo/test/pull-message.t +88 -0
  251. data/sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t +58 -0
  252. data/sub/eac_git/vendor/git-subrepo/test/pull-ours.t +90 -0
  253. data/sub/eac_git/vendor/git-subrepo/test/pull-theirs.t +82 -0
  254. data/sub/eac_git/vendor/git-subrepo/test/pull-twice.t +44 -0
  255. data/sub/eac_git/vendor/git-subrepo/test/pull-worktree.t +40 -0
  256. data/sub/eac_git/vendor/git-subrepo/test/pull.t +99 -0
  257. data/sub/eac_git/vendor/git-subrepo/test/push-after-init.t +51 -0
  258. data/sub/eac_git/vendor/git-subrepo/test/push-force.t +56 -0
  259. data/sub/eac_git/vendor/git-subrepo/test/push-new-branch.t +61 -0
  260. data/sub/eac_git/vendor/git-subrepo/test/push-no-changes.t +29 -0
  261. data/sub/eac_git/vendor/git-subrepo/test/push-squash.t +56 -0
  262. data/sub/eac_git/vendor/git-subrepo/test/push.t +176 -0
  263. data/sub/eac_git/vendor/git-subrepo/test/reclone.t +45 -0
  264. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/HEAD +1 -0
  265. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/config +4 -0
  266. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/1f/0c4b264caed0126814a0ede851a1e0b4e16ae6 +0 -0
  267. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/87/46903fdb1b9c2101377880125917c2e05b4d69 +0 -0
  268. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/94/c86ffc745232d89f78c6f895e11e71272518db +0 -0
  269. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/c6/76c57b6576743fa56278527aa60ebd2e202a7c +0 -0
  270. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
  271. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/f6/2a8ff3feadf39b0a98f1a86ec6d1eb33858ee9 +0 -0
  272. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/heads/master +1 -0
  273. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/tags/A +1 -0
  274. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/HEAD +1 -0
  275. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/config +4 -0
  276. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/a0/f4cdaaf533a936296cdebbed8206c3b9ededa8 +0 -0
  277. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e2/1291a1ad392a9d4c51dd9586804f1467b28afd +0 -0
  278. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
  279. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/refs/heads/master +1 -0
  280. data/sub/eac_git/vendor/git-subrepo/test/repo/init/HEAD +1 -0
  281. data/sub/eac_git/vendor/git-subrepo/test/repo/init/config +5 -0
  282. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/11/523f5dcf03b4c89b592dc8a3d0308f68da2386 +0 -0
  283. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/14/2addf8ec5f37334e837440122c62f2c68a29ad +0 -0
  284. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/32/5180321750a21cd7a4e7ecda319e557a4f6a09 +2 -0
  285. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3d/918c6901c02f43af5d31779dd5e1f9166aeb36 +0 -0
  286. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3e/4cb596066dce63ba4d047abddb677389b65e19 +0 -0
  287. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/4b/6e53022e7a04f07887697e4f3d7c377fd9822b +0 -0
  288. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/58/931fc1bd559b59c41ea738fc7ad04f9ad01bd3 +0 -0
  289. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/5e/c0c28e1b806f25efdca18fcf7a74b49c3755bd +0 -0
  290. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/75/fa6584e748f57eff06eebdc55e9ac21d4fcbf2 +1 -0
  291. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/80/2d5edbd5e1cb7fca82b5bd38e7c8a0a496fb20 +0 -0
  292. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/94/7b3d714c38791e95ad6f928b48c98bb8708acd +0 -0
  293. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/95/e1f2df3f4d5f3d7a60588c25a7ca8a913d3c2a +1 -0
  294. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/b1/5f4a7666baf40d949548ead946a3370e273479 +0 -0
  295. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c3/ee8978c4c5d84c3b7d00ba8e5906933d027882 +0 -0
  296. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c8/b0bffbc405ef3fad7354ff833fbec36d67ddfa +3 -0
  297. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/dd/8bdb934ec848137f011fe423b185505c343626 +2 -0
  298. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/e2/9be58c767cfeb27235c995d293a7d71aac0135 +2 -0
  299. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/ee/1224401fc6aac595145fa727dcf6706ac8aec1 +1 -0
  300. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/f1/cc1a657b2e805c400f5dcaaa76bd29c6178b1b +0 -0
  301. data/sub/eac_git/vendor/git-subrepo/test/repo/init/refs/heads/master +1 -0
  302. data/sub/eac_git/vendor/git-subrepo/test/setup +205 -0
  303. data/sub/eac_git/vendor/git-subrepo/test/status.t +68 -0
  304. data/sub/eac_git/vendor/git-subrepo/test/submodule.t +45 -0
  305. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  306. data/sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb +4 -2
  307. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/{module → class}/method_class.rb +0 -0
  308. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/static_method_class.rb +9 -0
  309. data/sub/eac_ruby_utils/lib/eac_ruby_utils/static_method_class.rb +12 -0
  310. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  311. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/{module → class}/method_class_spec.rb +1 -1
  312. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/static_method_class_spec.rb +20 -0
  313. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/static_method_class_spec.rb +44 -0
  314. metadata +303 -40
  315. data/sub/avm/lib/avm/instances/base/auto_values/install.rb +0 -47
  316. data/sub/avm/lib/avm/instances/base/auto_values/web.rb +0 -46
  317. data/sub/avm/lib/avm/jobs/base.rb +0 -63
  318. data/sub/avm/lib/avm/jobs/variables_source.rb +0 -22
  319. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/apache_host.rb +0 -17
  320. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb +0 -70
  321. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb +0 -29
  322. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb +0 -57
  323. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +0 -83
  324. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +0 -51
  325. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/appended_directories.rb +0 -25
  326. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/build.rb +0 -48
  327. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/file_unit.rb +0 -42
  328. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/git_info.rb +0 -62
  329. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/version.rb +0 -24
  330. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/write_on_target.rb +0 -18
  331. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +0 -73
  332. data/sub/avm-tools/lib/avm/tools/runner/eac_webapp_base0.rb +0 -14
@@ -1,47 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/entries/uri_builder'
4
- require 'avm/instances/entry_keys'
5
-
6
- module Avm
7
- module Instances
8
- class Base
9
- module AutoValues
10
- module Install
11
- (::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[data_path email groupname])
12
- .each do |component|
13
- method_suffix = "install_#{component}"
14
- define_method "auto_#{method_suffix}" do
15
- uri_component_entry_value(
16
- ::Avm::Instances::EntryKeys.const_get(method_suffix.underscore.upcase)
17
- )
18
- end
19
- end
20
-
21
- def auto_install_url
22
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
23
- ::Avm::Instances::EntryKeys::INSTALL_URL) ||
24
- auto_install_url_by_parts
25
- end
26
-
27
- def auto_install_url_by_parts
28
- require 'avm/entries/auto_values/uri_entry'
29
- ::Avm::Entries::AutoValues::UriEntry.new(self, 'install').value
30
- end
31
-
32
- def install_data_path_inherited_value_proc(value)
33
- value + '/' + id
34
- end
35
-
36
- def install_groupname_default_value
37
- read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
38
- end
39
-
40
- def install_path_inherited_value_proc(value)
41
- install_data_path_inherited_value_proc(value)
42
- end
43
- end
44
- end
45
- end
46
- end
47
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'addressable'
4
- require 'avm/instances/entry_keys'
5
-
6
- module Avm
7
- module Instances
8
- class Base
9
- module AutoValues
10
- module Web
11
- def auto_web_authority
12
- web_url_as_uri(&:authority)
13
- end
14
-
15
- def auto_web_hostname
16
- web_url_as_uri(&:host)
17
- end
18
-
19
- def auto_web_path
20
- web_url_as_uri(&:path)
21
- end
22
-
23
- def auto_web_port
24
- web_url_as_uri(&:port)
25
- end
26
-
27
- def auto_web_scheme
28
- web_url_as_uri(&:scheme)
29
- end
30
-
31
- def auto_web_userinfo
32
- web_url_as_uri(&:userinfo)
33
- end
34
-
35
- private
36
-
37
- def web_url_as_uri
38
- read_entry_optional(::Avm::Instances::EntryKeys::WEB_URL).if_present do |v|
39
- yield(::Addressable::URI.parse(v))
40
- end
41
- end
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/jobs/variables_source'
4
- require 'avm/result'
5
- require 'eac_cli/core_ext'
6
-
7
- module Avm
8
- module Jobs
9
- module Base
10
- common_concern do
11
- include ::ActiveSupport::Callbacks
12
-
13
- enable_speaker
14
- enable_simple_cache
15
- enable_listable
16
- common_constructor :instance, :options, default: [{}] do
17
- if option_list.present?
18
- self.options = option_list.hash_keys_validate!(options.symbolize_keys)
19
- end
20
- end
21
- define_callbacks(*jobs)
22
- end
23
-
24
- module ClassMethods
25
- def jobs
26
- const_get('JOBS').dup
27
- end
28
- end
29
-
30
- module InstanceMethods
31
- def option_list
32
- nil
33
- end
34
-
35
- def run
36
- start_banner if respond_to?(:start_banner)
37
- run_jobs
38
- ::Avm::Result.success('Done!')
39
- rescue ::Avm::Result::Error => e
40
- e.to_result
41
- end
42
-
43
- def variables_source
44
- ::Avm::Jobs::VariablesSource.new(self, instance)
45
- end
46
-
47
- protected
48
-
49
- def run_jobs
50
- jobs.each do |job|
51
- run_callbacks job do
52
- send(job)
53
- end
54
- end
55
- end
56
-
57
- def jobs
58
- self.class.jobs
59
- end
60
- end
61
- end
62
- end
63
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Jobs
7
- class VariablesSource
8
- common_constructor :job, :instance
9
-
10
- def read_entry(path, options = {})
11
- entry_from_job(path) || instance.read_entry(path, options)
12
- end
13
-
14
- private
15
-
16
- def entry_from_job(path)
17
- method = path.gsub('.', '_').underscore
18
- return job.send(method) if job.respond_to?(method, true)
19
- end
20
- end
21
- end
22
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/apache_host'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class ApacheHost < ::Avm::EacWebappBase0::ApacheHost
8
- def document_root
9
- "#{instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)}/public"
10
- end
11
-
12
- def extra_content
13
- 'PassengerEnabled On'
14
- end
15
- end
16
- end
17
- end
@@ -1,70 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class SystemdUnit
8
- module Service
9
- def service_content
10
- template.child('tasks_scheduler.service').apply(variables_source)
11
- end
12
-
13
- def service_exec_lines
14
- service_exec_operations
15
- .map { |k, v| "#{k}=#{tasks_scheduler_command_path} #{v}" }
16
- .join("\n")
17
- end
18
-
19
- def service_path
20
- ::Pathname.new('/etc/systemd/system').join(unit_name)
21
- end
22
-
23
- def service_link_path
24
- ::Pathname.new('/etc/systemd/system/multi-user.target.wants').join(unit_name)
25
- end
26
-
27
- def verify_service
28
- sudo_system!('systemd-analyze', 'verify', service_path)
29
- end
30
-
31
- private
32
-
33
- def enable_service
34
- systemctl('enable', unit_name)
35
- end
36
-
37
- def link_service
38
- sudo_execute!('rm', '-f', service_link_path)
39
- sudo_execute!('ln', '-s', service_path, service_link_path)
40
- end
41
-
42
- def reload_systemd
43
- systemctl('daemon-reload')
44
- end
45
-
46
- # @return [Hash<String, String>]
47
- def service_exec_operations
48
- if exec_run?
49
- { 'ExecStart' => 'run' }
50
- else
51
- { 'ExecStart' => 'start', 'ExecStop' => 'stop' }
52
- end
53
- end
54
-
55
- def start_service
56
- systemctl('start', unit_name)
57
- end
58
-
59
- def systemctl(*args)
60
- sudo_system!('systemctl', *args)
61
- end
62
-
63
- def write_service
64
- infom 'Writing service\'s unit file...'
65
- platform_instance.file_sudo_write(service_path, service_content)
66
- end
67
- end
68
- end
69
- end
70
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class SystemdUnit
8
- module TasksSchedulerCommand
9
- def tasks_scheduler_command_content
10
- template.child('tasks_scheduler_command.sh').apply(variables_source)
11
- end
12
-
13
- def tasks_scheduler_command_path
14
- "/opt/aux/#{instance.id}/tasks_scheduler.sh"
15
- end
16
-
17
- private
18
-
19
- def write_tasks_scheduler_command
20
- infom 'Writing tasks scheduler\'s command...'
21
- sudo_execute!('mkdir', '-p', ::File.dirname(tasks_scheduler_command_path))
22
- platform_instance.file_sudo_write(tasks_scheduler_command_path,
23
- tasks_scheduler_command_content)
24
- sudo_execute!('chmod', '+x', tasks_scheduler_command_path)
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/jobs/base'
4
- require 'avm/eac_ubuntu_base0/apache'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module EacRailsBase1
9
- class SystemdUnit
10
- JOBS = %w[write_tasks_scheduler_command write_service link_service verify_service
11
- reload_systemd enable_service start_service].freeze
12
-
13
- include ::Avm::Jobs::Base
14
- require_sub __FILE__, include_modules: true
15
- delegate :platform_instance, to: :instance
16
-
17
- enable_listable
18
- lists.add_symbol :option, :exec_run, :restart
19
-
20
- def description
21
- "#{instance.id} Tasks Scheduler"
22
- end
23
-
24
- def exec_run?
25
- options[OPTION_EXEC_RUN]
26
- end
27
-
28
- def option_list
29
- self.class.lists.option
30
- end
31
-
32
- def restart
33
- options[OPTION_RESTART]
34
- end
35
-
36
- def unit_name
37
- "#{instance.id}_tasks_scheduler.service"
38
- end
39
-
40
- def user
41
- instance.install_username
42
- end
43
-
44
- private
45
-
46
- def sudo_execute!(*args)
47
- platform_instance.host_env.command(['sudo'] + args).execute!
48
- end
49
-
50
- def sudo_system!(*args)
51
- command_args = ['sudo'] + args
52
- infom "Running \"#{::Shellwords.join(command_args)}\"..."
53
- platform_instance.host_env.command(command_args).system!
54
- end
55
- end
56
- end
57
- end
@@ -1,83 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'avm/jobs/base'
5
- require 'avm/eac_ubuntu_base0/apache'
6
- require 'eac_templates/core_ext'
7
-
8
- module Avm
9
- module EacWebappBase0
10
- class ApacheHost
11
- APACHE_DIRECTORY_EXTRA_CONFIG_KEY = 'install.apache_directory_extra_config'
12
- JOBS = %w[write_available_no_ssl_site enable_no_ssl_site remove_ssl_site reload_apache
13
- run_certbot enable_ssl_site reload_apache].freeze
14
- include ::Avm::Jobs::Base
15
-
16
- def directory_extra_config
17
- instance.entry(APACHE_DIRECTORY_EXTRA_CONFIG_KEY).value.if_present { |v| " #{v}\n" }
18
- end
19
-
20
- def no_ssl_site_content
21
- ::Avm::EacWebappBase0::ApacheHost
22
- .template.child('no_ssl.conf')
23
- .apply(variables_source)
24
- end
25
-
26
- def ssl?
27
- options[:certbot]
28
- end
29
-
30
- private
31
-
32
- def apache_uncached
33
- ::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
34
- end
35
-
36
- def enable_no_ssl_site
37
- infom 'Enabling no SSL site...'
38
- no_ssl_site.enable
39
- end
40
-
41
- def enable_ssl_site
42
- return unless ssl?
43
-
44
- infom 'Enabling SSL site...'
45
- ssl_site.enable
46
- end
47
-
48
- def no_ssl_site_uncached
49
- apache.site(instance.id)
50
- end
51
-
52
- def reload_apache
53
- infom 'Reloading Apache...'
54
- apache.service('reload')
55
- end
56
-
57
- def remove_ssl_site
58
- infom 'Removing SSL site...'
59
- ssl_site.remove
60
- end
61
-
62
- def run_certbot
63
- return unless ssl?
64
-
65
- infom 'Running Certbot...'
66
- instance.host_env.command(
67
- 'sudo', 'certbot', '--apache', '--domain', instance.read_entry('web.hostname'),
68
- '--redirect', '--non-interactive', '--agree-tos',
69
- '--email', instance.install_email
70
- ).system!
71
- end
72
-
73
- def ssl_site_uncached
74
- apache.site(no_ssl_site.name + '-le-ssl')
75
- end
76
-
77
- def write_available_no_ssl_site
78
- infom 'Writing no SSL site conf...'
79
- no_ssl_site.write(no_ssl_site_content)
80
- end
81
- end
82
- end
83
- end
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/jobs/base'
4
- require 'avm/eac_ubuntu_base0/apache'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module EacWebappBase0
9
- class ApachePath
10
- JOBS = %w[write_available_conf enable_conf reload_apache].freeze
11
- include ::Avm::Jobs::Base
12
-
13
- def content
14
- ::Avm::EacWebappBase0::ApachePath.template.child('default.conf').apply(variables_source)
15
- end
16
-
17
- def document_root
18
- instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
19
- end
20
-
21
- def extra_content
22
- ''
23
- end
24
-
25
- private
26
-
27
- def apache_uncached
28
- ::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
29
- end
30
-
31
- def enable_conf
32
- infom 'Enabling configuration...'
33
- conf.enable
34
- end
35
-
36
- def reload_apache
37
- infom 'Reloading Apache...'
38
- apache.service('reload')
39
- end
40
-
41
- def conf_uncached
42
- apache.conf(instance.id)
43
- end
44
-
45
- def write_available_conf
46
- infom 'Writing available configuration...'
47
- conf.write(content)
48
- end
49
- end
50
- end
51
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/path_string'
4
-
5
- module Avm
6
- module EacWebappBase0
7
- class Deploy
8
- module AppendedDirectories
9
- APPENDED_DIRECTORIES_ENTRY_KEY = 'deploy.appended_directories'
10
-
11
- def appended_directories
12
- appended_directories_from_instance_entry + appended_directories_from_options
13
- end
14
-
15
- def appended_directories_from_instance_entry
16
- ::Avm::PathString.paths(instance.read_entry_optional(APPENDED_DIRECTORIES_ENTRY_KEY))
17
- end
18
-
19
- def appended_directories_from_options
20
- options[OPTION_APPENDED_DIRECTORIES] || []
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/files/appender'
4
- require 'avm/files/deploy'
5
- require 'eac_ruby_utils/envs'
6
- require 'eac_ruby_utils/fs/temp'
7
-
8
- module Avm
9
- module EacWebappBase0
10
- class Deploy
11
- module Build
12
- private
13
-
14
- attr_accessor :build_dir
15
-
16
- def append_instance_content
17
- ::Avm::Files::Appender
18
- .new
19
- .variables_source_set(variables_source)
20
- .append_templatized_directory(template.path)
21
- .append_templatized_directories(appended_directories)
22
- .append_file_content(version_target_path, version)
23
- .write_appended_on(build_dir)
24
- end
25
-
26
- def build_dir_env
27
- ::EacRubyUtils::Envs.local
28
- end
29
-
30
- def create_build_dir
31
- self.build_dir = ::EacRubyUtils::Fs::Temp.directory
32
- end
33
-
34
- def remove_build_dir
35
- build_dir&.remove
36
- end
37
-
38
- def build_content
39
- infom 'Writing Git source code...'
40
- ::Avm::Git::Commit.new(git, commit_sha1).deploy_to_env_path(
41
- build_dir_env,
42
- build_dir
43
- ).variables_source_set(variables_source).run
44
- end
45
- end
46
- end
47
- end
48
- end
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module EacWebappBase0
5
- class Deploy
6
- class FileUnit < ::SimpleDelegator
7
- attr_reader :data_key, :fs_path_subpath
8
-
9
- def initialize(deploy, data_key, fs_path_subpath)
10
- super(deploy)
11
- @data_key = data_key
12
- @fs_path_subpath = fs_path_subpath
13
- end
14
-
15
- def run
16
- assert_source_directory
17
- link_source_target
18
- end
19
-
20
- def assert_source_directory
21
- infom "Asserting \"#{data_key}\" source directory..."
22
- instance.host_env.command('mkdir', '-p', source_path).execute!
23
- end
24
-
25
- def source_path
26
- ::File.join(instance.install_data_path, data_key.to_s)
27
- end
28
-
29
- def target_path
30
- ::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
31
- fs_path_subpath.to_s)
32
- end
33
-
34
- def link_source_target
35
- infom "Linking \"#{data_key}\" directory..."
36
- instance.host_env.command('rm', '-rf', target_path).execute!
37
- instance.host_env.command('ln', '-s', source_path, target_path).execute!
38
- end
39
- end
40
- end
41
- end
42
- end
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module EacWebappBase0
5
- class Deploy
6
- module GitInfo
7
- def commit_sha1_uncached
8
- git_fetch
9
- r = git.rev_parse(git_reference_found)
10
- return r if r
11
-
12
- raise ::Avm::Result::Error, "No commit SHA1 found for \"#{git_reference_found}\""
13
- end
14
-
15
- def git_fetch_uncached
16
- infom "Fetching remote \"#{git_remote_name}\" from \"#{git_repository_path}\"..."
17
- git.fetch(git_remote_name)
18
- end
19
-
20
- def git_reference
21
- options[OPTION_REFERENCE] || DEFAULT_REFERENCE
22
- end
23
-
24
- def git_reference_found_uncached
25
- %w[git_reference instance_branch master_branch].map { |b| send(b) }.find(&:present?) ||
26
- raise(
27
- ::Avm::Result::Error,
28
- 'No git reference found (Searched for option, instance and master)'
29
- )
30
- end
31
-
32
- def git_remote_hashs_uncached
33
- git.remote_hashs(git_remote_name)
34
- end
35
-
36
- def git_remote_name
37
- ::Avm::Git::DEFAULT_REMOTE_NAME
38
- end
39
-
40
- def git_repository_path
41
- instance.source_instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
42
- end
43
-
44
- def git_uncached
45
- ::Avm::Launcher::Git::Base.new(git_repository_path)
46
- end
47
-
48
- def instance_branch
49
- remote_branch(instance.id)
50
- end
51
-
52
- def remote_branch(name)
53
- git_remote_hashs.key?("refs/heads/#{name}") ? "#{git_remote_name}/#{name}" : nil
54
- end
55
-
56
- def master_branch
57
- remote_branch('master')
58
- end
59
- end
60
- end
61
- end
62
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module EacWebappBase0
5
- class Deploy
6
- module Version
7
- VERSION_TARGET_PATH = 'VERSION'
8
-
9
- def version
10
- ([::Time.now, commit_sha1] + version_git_refs).join('|')
11
- end
12
-
13
- def version_git_refs
14
- git_remote_hashs.select { |_name, sha1| sha1 == commit_sha1 }.keys
15
- .map { |ref| ref.gsub(%r{\Arefs/}, '') }.reject { |ref| ref == 'HEAD' }
16
- end
17
-
18
- def version_target_path
19
- VERSION_TARGET_PATH
20
- end
21
- end
22
- end
23
- end
24
- end