eac_tools 0.92.0 → 0.94.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +68 -53
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/avm.gemspec +3 -3
  5. data/sub/avm/lib/avm/launcher/context.rb +0 -5
  6. data/sub/avm/lib/avm/rspec/launcher_controller.rb +96 -0
  7. data/sub/avm/lib/avm/rspec/setup.rb +1 -1
  8. data/sub/avm/lib/avm/rspec/shared_examples/with_launcher.rb +16 -0
  9. data/sub/avm/lib/avm/scms/base.rb +1 -1
  10. data/sub/avm/lib/avm/sources/base/sub.rb +1 -1
  11. data/sub/avm/lib/avm/version.rb +1 -1
  12. data/sub/avm/spec/lib/avm/launcher/context_spec.rb +2 -2
  13. data/sub/avm/spec/lib/avm/launcher/instances/base_spec.rb +2 -2
  14. data/sub/avm/template/avm/rspec/launcher_controller/settings.yml +1 -0
  15. data/sub/avm-eac_webapp_base0/Gemfile +8 -0
  16. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +25 -0
  17. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/executables.rb +26 -0
  18. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css/file_apply.rb +48 -0
  19. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css.rb +22 -0
  20. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/html.rb +43 -0
  21. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/javascript.rb +22 -0
  22. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb +25 -0
  23. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/provider.rb +24 -0
  24. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/xml.rb +26 -0
  25. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats.rb +11 -0
  26. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_base.rb +33 -0
  27. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +78 -0
  28. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb +42 -0
  29. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/apache.rb +44 -0
  30. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/deploy_info.rb +30 -0
  31. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/install.rb +22 -0
  32. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +44 -0
  33. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb +27 -0
  34. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb +50 -0
  35. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/info.rb +47 -0
  36. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/scm.rb +88 -0
  37. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/setup_files_unit.rb +53 -0
  38. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/write_on_target.rb +20 -0
  39. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +76 -0
  40. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy_info.rb +37 -0
  41. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/processes/web_server.rb +37 -0
  42. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/processes.rb +13 -0
  43. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_host.rb +36 -0
  44. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_path.rb +40 -0
  45. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb +60 -0
  46. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb +57 -0
  47. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy_info.rb +28 -0
  48. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners.rb +13 -0
  49. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources/base.rb +15 -0
  50. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources.rb +11 -0
  51. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +7 -0
  52. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0.rb +9 -0
  53. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec.rb +7 -0
  54. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec_files/css1.source.css +11 -0
  55. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec_files/css1.target.css +11 -0
  56. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec.rb +7 -0
  57. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.erb.source +8 -0
  58. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.erb.target +8 -0
  59. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.source +5 -0
  60. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.target +5 -0
  61. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec.rb +7 -0
  62. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec_files/javascript_code1.js.source +29 -0
  63. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec_files/javascript_code1.js.target +21 -0
  64. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec.rb +7 -0
  65. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec_files/json_code.json.source +8 -0
  66. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec_files/json_code.json.target +7 -0
  67. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec.rb +7 -0
  68. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec_files/xml_code.xml.source +11 -0
  69. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec_files/xml_code.xml.target +9 -0
  70. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/instances/base_spec.rb +11 -0
  71. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/sources/base_spec.rb +7 -0
  72. data/sub/avm-eac_webapp_base0/spec/rubocop_spec.rb +3 -0
  73. data/sub/avm-eac_webapp_base0/spec/spec_helper.rb +4 -0
  74. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_host/no_ssl.conf +11 -0
  75. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_path/default.conf +7 -0
  76. data/sub/avm-git/Gemfile +8 -0
  77. data/sub/avm-git/avm-git.gemspec +25 -0
  78. data/sub/avm-git/lib/avm/git/application_scms/base/assert_main_at.rb +49 -0
  79. data/sub/avm-git/lib/avm/git/application_scms/base.rb +21 -0
  80. data/sub/avm-git/lib/avm/git/application_scms.rb +11 -0
  81. data/sub/avm-git/lib/avm/git/commit/class_methods.rb +31 -0
  82. data/sub/avm-git/lib/avm/git/commit/diff_tree_line.rb +32 -0
  83. data/sub/avm-git/lib/avm/git/commit/file.rb +46 -0
  84. data/sub/avm-git/lib/avm/git/commit.rb +59 -0
  85. data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +42 -0
  86. data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +23 -0
  87. data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +61 -0
  88. data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +39 -0
  89. data/sub/avm-git/lib/avm/git/issue/complete/push.rb +60 -0
  90. data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +33 -0
  91. data/sub/avm-git/lib/avm/git/issue/complete/test.rb +40 -0
  92. data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +21 -0
  93. data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +39 -0
  94. data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +53 -0
  95. data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +19 -0
  96. data/sub/avm-git/lib/avm/git/issue/complete.rb +69 -0
  97. data/sub/avm-git/lib/avm/git/issue.rb +11 -0
  98. data/sub/avm-git/lib/avm/git/launcher/base/class_methods.rb +28 -0
  99. data/sub/avm-git/lib/avm/git/launcher/base/dirty_files.rb +23 -0
  100. data/sub/avm-git/lib/avm/git/launcher/base/remotes.rb +40 -0
  101. data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +44 -0
  102. data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +59 -0
  103. data/sub/avm-git/lib/avm/git/launcher/base.rb +87 -0
  104. data/sub/avm-git/lib/avm/git/launcher/error.rb +15 -0
  105. data/sub/avm-git/lib/avm/git/launcher/mirror_update.rb +38 -0
  106. data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +131 -0
  107. data/sub/avm-git/lib/avm/git/launcher/remote.rb +55 -0
  108. data/sub/avm-git/lib/avm/git/launcher/sub_warp_base.rb +33 -0
  109. data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +68 -0
  110. data/sub/avm-git/lib/avm/git/launcher.rb +7 -0
  111. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/local_project_mixin.rb +19 -0
  112. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/publish.rb +15 -0
  113. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/warp.rb +27 -0
  114. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git.rb +25 -0
  115. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +31 -0
  116. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +88 -0
  117. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +36 -0
  118. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/publish.rb +14 -0
  119. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/warp.rb +32 -0
  120. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree.rb +51 -0
  121. data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +22 -0
  122. data/sub/avm-git/lib/avm/git/launcher_stereotypes.rb +11 -0
  123. data/sub/avm-git/lib/avm/git/organize/reference_update.rb +34 -0
  124. data/sub/avm-git/lib/avm/git/organize/repository.rb +77 -0
  125. data/sub/avm-git/lib/avm/git/organize.rb +11 -0
  126. data/sub/avm-git/lib/avm/git/revision_test.rb +105 -0
  127. data/sub/avm-git/lib/avm/git/runners/base/commit.rb +102 -0
  128. data/sub/avm-git/lib/avm/git/runners/base/deploy.rb +111 -0
  129. data/sub/avm-git/lib/avm/git/runners/base/dirty_files.rb +44 -0
  130. data/sub/avm-git/lib/avm/git/runners/base/organize.rb +75 -0
  131. data/sub/avm-git/lib/avm/git/runners/base/revisions_test.rb +66 -0
  132. data/sub/avm-git/lib/avm/git/runners/base/subrepo/check.rb +48 -0
  133. data/sub/avm-git/lib/avm/git/runners/base/subrepo/clone.rb +83 -0
  134. data/sub/avm-git/lib/avm/git/runners/base/subrepo/fix.rb +76 -0
  135. data/sub/avm-git/lib/avm/git/runners/base/subrepo.rb +19 -0
  136. data/sub/avm-git/lib/avm/git/runners/base.rb +43 -0
  137. data/sub/avm-git/lib/avm/git/runners.rb +11 -0
  138. data/sub/avm-git/lib/avm/git/scms/git/branch.rb +31 -0
  139. data/sub/avm-git/lib/avm/git/scms/git/branches.rb +20 -0
  140. data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +36 -0
  141. data/sub/avm-git/lib/avm/git/scms/git/changed_file.rb +16 -0
  142. data/sub/avm-git/lib/avm/git/scms/git/changed_files.rb +24 -0
  143. data/sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb +43 -0
  144. data/sub/avm-git/lib/avm/git/scms/git/commit/deploy_methods.rb +30 -0
  145. data/sub/avm-git/lib/avm/git/scms/git/commit.rb +67 -0
  146. data/sub/avm-git/lib/avm/git/scms/git/commit_dirty.rb +36 -0
  147. data/sub/avm-git/lib/avm/git/scms/git/commits.rb +47 -0
  148. data/sub/avm-git/lib/avm/git/scms/git/interval.rb +31 -0
  149. data/sub/avm-git/lib/avm/git/scms/git/milestones.rb +21 -0
  150. data/sub/avm-git/lib/avm/git/scms/git/remote.rb +21 -0
  151. data/sub/avm-git/lib/avm/git/scms/git/remotes.rb +32 -0
  152. data/sub/avm-git/lib/avm/git/scms/git/run_commit.rb +57 -0
  153. data/sub/avm-git/lib/avm/git/scms/git.rb +51 -0
  154. data/sub/avm-git/lib/avm/git/scms/git_sub_base/changed_file.rb +21 -0
  155. data/sub/avm-git/lib/avm/git/scms/git_sub_base/commit.rb +27 -0
  156. data/sub/avm-git/lib/avm/git/scms/git_sub_base/interval.rb +28 -0
  157. data/sub/avm-git/lib/avm/git/scms/git_sub_base.rb +33 -0
  158. data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +37 -0
  159. data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +34 -0
  160. data/sub/avm-git/lib/avm/git/scms/provider.rb +21 -0
  161. data/sub/avm-git/lib/avm/git/scms.rb +11 -0
  162. data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +51 -0
  163. data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +89 -0
  164. data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +32 -0
  165. data/sub/avm-git/lib/avm/git/subrepo_check.rb +38 -0
  166. data/sub/avm-git/lib/avm/git/subrepo_checks.rb +60 -0
  167. data/sub/avm-git/lib/avm/git/vendor/github.rb +20 -0
  168. data/sub/avm-git/lib/avm/git/vendor.rb +11 -0
  169. data/sub/avm-git/lib/avm/git/version.rb +7 -0
  170. data/sub/avm-git/lib/avm/git.rb +9 -0
  171. data/sub/avm-git/locale/en.yml +6 -0
  172. data/sub/avm-git/locale/pt-BR.yml +6 -0
  173. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec.rb +13 -0
  174. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +1 -0
  175. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
  176. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +1 -0
  177. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
  178. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +1 -0
  179. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
  180. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +2 -0
  181. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
  182. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
  183. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
  184. data/sub/avm-git/spec/lib/avm/git/commit_spec.rb +56 -0
  185. data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +45 -0
  186. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec.rb +83 -0
  187. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_files/config.yml +5 -0
  188. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_settings.yml +6 -0
  189. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec.rb +53 -0
  190. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_files/config.yml +3 -0
  191. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_settings.yml +6 -0
  192. data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec.rb +126 -0
  193. data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append1/stub3.txt.template +1 -0
  194. data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append2/stub4.txt +1 -0
  195. data/sub/avm-git/spec/lib/avm/git/scms/git/commit/deploy_spec.rb +92 -0
  196. data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +8 -0
  197. data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +8 -0
  198. data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +23 -0
  199. data/sub/avm-git/spec/rubocop_spec.rb +3 -0
  200. data/sub/avm-git/spec/spec_helper.rb +4 -0
  201. data/sub/avm-tools/Gemfile +8 -0
  202. data/sub/avm-tools/README.textile +28 -0
  203. data/sub/avm-tools/avm-tools.gemspec +25 -0
  204. data/sub/avm-tools/exe/avm +6 -0
  205. data/sub/avm-tools/lib/avm/tools/core_ext.rb +3 -0
  206. data/sub/avm-tools/lib/avm/tools/rspec/helpers/runner.rb +20 -0
  207. data/sub/avm-tools/lib/avm/tools/rspec/helpers.rb +13 -0
  208. data/sub/avm-tools/lib/avm/tools/rspec/setup.rb +24 -0
  209. data/sub/avm-tools/lib/avm/tools/rspec.rb +11 -0
  210. data/sub/avm-tools/lib/avm/tools/runner/application/info.rb +36 -0
  211. data/sub/avm-tools/lib/avm/tools/runner/application.rb +26 -0
  212. data/sub/avm-tools/lib/avm/tools/runner/application_stereotypes/list.rb +31 -0
  213. data/sub/avm-tools/lib/avm/tools/runner/application_stereotypes.rb +16 -0
  214. data/sub/avm-tools/lib/avm/tools/runner/applications/list.rb +31 -0
  215. data/sub/avm-tools/lib/avm/tools/runner/applications.rb +16 -0
  216. data/sub/avm-tools/lib/avm/tools/runner/config/load_path.rb +52 -0
  217. data/sub/avm-tools/lib/avm/tools/runner/config.rb +17 -0
  218. data/sub/avm-tools/lib/avm/tools/runner/files/format.rb +50 -0
  219. data/sub/avm-tools/lib/avm/tools/runner/files/rotate.rb +31 -0
  220. data/sub/avm-tools/lib/avm/tools/runner/files.rb +17 -0
  221. data/sub/avm-tools/lib/avm/tools/runner/instance/data/clear.rb +18 -0
  222. data/sub/avm-tools/lib/avm/tools/runner/instance/data/dump.rb +20 -0
  223. data/sub/avm-tools/lib/avm/tools/runner/instance/data/load.rb +25 -0
  224. data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/clear.rb +20 -0
  225. data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/dump.rb +20 -0
  226. data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/load.rb +25 -0
  227. data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb +44 -0
  228. data/sub/avm-tools/lib/avm/tools/runner/instance/data.rb +27 -0
  229. data/sub/avm-tools/lib/avm/tools/runner/instance/entry.rb +43 -0
  230. data/sub/avm-tools/lib/avm/tools/runner/instance/info.rb +39 -0
  231. data/sub/avm-tools/lib/avm/tools/runner/instance/system.rb +65 -0
  232. data/sub/avm-tools/lib/avm/tools/runner/instance.rb +16 -0
  233. data/sub/avm-tools/lib/avm/tools/runner/launcher/instances.rb +36 -0
  234. data/sub/avm-tools/lib/avm/tools/runner/launcher/projects.rb +40 -0
  235. data/sub/avm-tools/lib/avm/tools/runner/launcher/publish.rb +53 -0
  236. data/sub/avm-tools/lib/avm/tools/runner/launcher.rb +17 -0
  237. data/sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb +41 -0
  238. data/sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes.rb +16 -0
  239. data/sub/avm-tools/lib/avm/tools/runner/self/docker.rb +14 -0
  240. data/sub/avm-tools/lib/avm/tools/runner/self/registry.rb +25 -0
  241. data/sub/avm-tools/lib/avm/tools/runner/self.rb +22 -0
  242. data/sub/avm-tools/lib/avm/tools/runner/source/auto_commit.rb +72 -0
  243. data/sub/avm-tools/lib/avm/tools/runner/source/info.rb +55 -0
  244. data/sub/avm-tools/lib/avm/tools/runner/source/issue/complete.rb +86 -0
  245. data/sub/avm-tools/lib/avm/tools/runner/source/issue/deliver.rb +35 -0
  246. data/sub/avm-tools/lib/avm/tools/runner/source/issue.rb +19 -0
  247. data/sub/avm-tools/lib/avm/tools/runner/source/sub/remove.rb +22 -0
  248. data/sub/avm-tools/lib/avm/tools/runner/source/sub.rb +29 -0
  249. data/sub/avm-tools/lib/avm/tools/runner/source/subs.rb +72 -0
  250. data/sub/avm-tools/lib/avm/tools/runner/source/test.rb +93 -0
  251. data/sub/avm-tools/lib/avm/tools/runner/source/update.rb +22 -0
  252. data/sub/avm-tools/lib/avm/tools/runner/source/version_bump.rb +81 -0
  253. data/sub/avm-tools/lib/avm/tools/runner/source.rb +18 -0
  254. data/sub/avm-tools/lib/avm/tools/runner/source_generate.rb +12 -0
  255. data/sub/avm-tools/lib/avm/tools/runner.rb +27 -0
  256. data/sub/avm-tools/lib/avm/tools/runner_with/include_exclude.rb +23 -0
  257. data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_clear.rb +23 -0
  258. data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_dump.rb +59 -0
  259. data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_load.rb +69 -0
  260. data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_performer.rb +40 -0
  261. data/sub/avm-tools/lib/avm/tools/runner_with.rb +11 -0
  262. data/sub/avm-tools/lib/avm/tools/self.rb +23 -0
  263. data/sub/avm-tools/lib/avm/tools/version.rb +7 -0
  264. data/sub/avm-tools/lib/avm/tools.rb +9 -0
  265. data/sub/avm-tools/lib/avm.rb +7 -0
  266. data/sub/avm-tools/spec/lib/avm/tools/runner/files/rotate_spec.rb +72 -0
  267. data/sub/avm-tools/spec/lib/avm/tools/runner/launcher_stereotypes/list_spec.rb +17 -0
  268. data/sub/avm-tools/spec/lib/avm/tools/runner/source/issue/complete_spec.rb +49 -0
  269. data/sub/avm-tools/spec/lib/avm/tools/runner_spec.rb +15 -0
  270. data/sub/avm-tools/spec/rubocop_spec.rb +3 -0
  271. data/sub/avm-tools/spec/spec_helper.rb +4 -0
  272. metadata +284 -25
  273. data/sub/avm/spec/spec_helper/launcher_context.rb +0 -75
  274. /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/avm-tools_stub/avm-tools.gemspec +0 -0
  275. /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/avm-tools_stub/lib/avm/tools/version.rb +0 -0
  276. /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/avm-tools_stub/lib/avm/tools.rb +0 -0
  277. /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/ruby_gem_stub/lib/ruby_gem_stub/version.rb +0 -0
  278. /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/ruby_gem_stub/lib/ruby_gem_stub.rb +0 -0
  279. /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/ruby_gem_stub/ruby_gem_stub.gemspec +0 -0
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'eac_ruby_utils/ruby'
5
+
6
+ module Avm
7
+ module Git
8
+ class RevisionTest
9
+ enable_simple_cache
10
+ enable_speaker
11
+ common_constructor :git, :sha1, :options
12
+
13
+ def banner
14
+ infov 'Revision to test', sha1
15
+ ::EacRubyUtils::Speaker.context.on(::EacCli::Speaker.new(err_line_prefix: ' ')) do
16
+ revision_banner
17
+ end
18
+ end
19
+
20
+ def successful_label
21
+ successful?.to_s.send((successful? ? :green : :red))
22
+ end
23
+
24
+ def to_s
25
+ sha1
26
+ end
27
+
28
+ def successful?
29
+ successful
30
+ end
31
+
32
+ private
33
+
34
+ def checkout_revision
35
+ infom 'Checking out revision...'
36
+ git.execute!('checkout', sha1)
37
+ end
38
+
39
+ def commit_uncached
40
+ ::Avm::Git::Commit.new(git, sha1)
41
+ end
42
+
43
+ def git_absolute_path
44
+ ::File.expand_path(git.to_s)
45
+ end
46
+
47
+ def revision_banner
48
+ infov '* Subject', commit.subject
49
+ infov '* Success?', successful_label
50
+ infov '* STDOUT', stdout_cache.content_path
51
+ infov '* STDERR', stderr_cache.content_path
52
+ end
53
+
54
+ def root_cache
55
+ fs_cache.child(git_absolute_path.parameterize, sha1,
56
+ options.fetch(:test_command).to_s.parameterize)
57
+ end
58
+
59
+ def run_test
60
+ infom "Running test command \"#{::Shellwords.join(test_command_args)}\" " \
61
+ "on \"#{git_absolute_path}\"..."
62
+ result = ::EacRubyUtils::Ruby.on_clean_environment { test_command.execute }
63
+ infom 'Test done'
64
+ write_result_cache(result)
65
+ end
66
+
67
+ def stdout_cache
68
+ root_cache.child('stdout')
69
+ end
70
+
71
+ def stderr_cache
72
+ root_cache.child('stderr')
73
+ end
74
+
75
+ def successful_cache
76
+ root_cache.child('successful')
77
+ end
78
+
79
+ def successful_uncached
80
+ if options.fetch(:no_cache) || !successful_cache.stored?
81
+ checkout_revision
82
+ run_test
83
+ end
84
+ successful_cache.read == 'true'
85
+ end
86
+
87
+ def test_command
88
+ ::EacRubyUtils::Envs.local.command(*test_command_args).chdir(git.to_s)
89
+ end
90
+
91
+ def test_command_args
92
+ r = ::Shellwords.split(options.fetch(:test_command).to_s)
93
+ return r if r.any?
94
+
95
+ raise 'No command found'
96
+ end
97
+
98
+ def write_result_cache(result)
99
+ stdout_cache.write(result[:stdout])
100
+ stderr_cache.write(result[:stderr])
101
+ successful_cache.write(result[:exit_code].zero? ? 'true' : 'false')
102
+ end
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/speaker'
4
+ require 'eac_ruby_utils/simple_cache'
5
+ require 'avm/git/launcher/base'
6
+ require 'filesize'
7
+ require 'avm/git/commit'
8
+
9
+ module Avm
10
+ module Git
11
+ module Runners
12
+ class Base
13
+ class Commit
14
+ runner_with :help do
15
+ desc 'Mostra informações de um commit.'
16
+ bool_opt '-f', '--files', 'Mostra os arquivos.'
17
+ bool_opt '-s', '--size', 'Mostra o tamanho de arquivos.'
18
+ pos_arg :ref
19
+ end
20
+
21
+ def run
22
+ input_banner
23
+ validate
24
+ main_info_banner
25
+ files_banner
26
+ size_banner
27
+ end
28
+
29
+ private
30
+
31
+ def input_banner
32
+ infov 'Repository', git
33
+ infov 'Reference', reference
34
+ end
35
+
36
+ def validate
37
+ return if reference_id.present?
38
+
39
+ fatal_error "Object ID not found for reference \"#{reference}\""
40
+ end
41
+
42
+ def main_info_banner
43
+ infov 'Reference ID', reference_id
44
+ infov 'Subject', commit.subject
45
+ infov 'Author', commit.author_all
46
+ infov 'Commiter', commit.commiter_all
47
+ infov 'Files', commit.files.count
48
+ end
49
+
50
+ def size_banner
51
+ return unless show_size?
52
+
53
+ infov 'Total files size', bytes_size(commit.files_size)
54
+ end
55
+
56
+ def files_banner
57
+ return unless parsed.files?
58
+
59
+ commit.files.each do |file|
60
+ infov " #{file.path}", file_value(file)
61
+ end
62
+ end
63
+
64
+ def file_value(file)
65
+ s = file.status
66
+ s += ", #{bytes_size(file.dst_size)}" if show_size?
67
+ s
68
+ end
69
+
70
+ def reference_id
71
+ git.rev_parse(reference)
72
+ end
73
+
74
+ def reference
75
+ parsed.ref
76
+ end
77
+
78
+ def git_uncached
79
+ ::Avm::Git::Launcher::Base.new(runner_context.call(:repository_path))
80
+ end
81
+
82
+ def commit_uncached
83
+ ::Avm::Git::Commit.new(git, reference_id)
84
+ end
85
+
86
+ def human_files_size
87
+ ::Filesize.from("#{commit.files_size} B").pretty
88
+ end
89
+
90
+ def bytes_size(size)
91
+ b = "#{size} B"
92
+ "#{::Filesize.from(b).pretty} (#{b})"
93
+ end
94
+
95
+ def show_size?
96
+ parsed.size?
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/git/scms/git'
4
+ require 'eac_config/node'
5
+
6
+ module Avm
7
+ module Git
8
+ module Runners
9
+ class Base
10
+ class Deploy
11
+ DEFAULT_REFERENCE = 'HEAD'
12
+
13
+ runner_with :help do
14
+ desc 'Deploy a Git revision to a location (Local or remote).'
15
+ arg_opt '-a', '--append-dirs', 'Append directories to deploy (List separated by ":").'
16
+ arg_opt '-i', '--instance', 'Read entries from instance with id=<instance-id>.'
17
+ arg_opt '-r', '--reference', "Reference (default: #{DEFAULT_REFERENCE})."
18
+ pos_arg :target_url, optional: true
19
+ end
20
+
21
+ def run
22
+ input_banner
23
+ validate
24
+ main_info_banner
25
+ deploy
26
+ success 'Done'
27
+ end
28
+
29
+ private
30
+
31
+ def input_banner
32
+ infov 'Repository', git
33
+ infov 'Reference', reference
34
+ infov 'Instance ID', instance_id.if_present('- BLANK -')
35
+ infov 'Appended directories', appended_directories
36
+ infov 'Target URL', target_url
37
+ end
38
+
39
+ def validate
40
+ if reference_sha1.blank?
41
+ fatal_error "Object ID not found for reference \"#{reference}\""
42
+ end
43
+ fatal_error 'Nor <target-url> nor --instance was setted' if target_url.blank?
44
+ end
45
+
46
+ def main_info_banner
47
+ infov 'Reference SHA1', reference_sha1
48
+ end
49
+
50
+ def reference_sha1_uncached
51
+ git.git_repo.rev_parse(reference)
52
+ end
53
+
54
+ def reference
55
+ parsed.reference || DEFAULT_REFERENCE
56
+ end
57
+
58
+ def git_uncached
59
+ ::Avm::Git::Scms::Git.new(git_repository_path)
60
+ end
61
+
62
+ def git_repository_path
63
+ if runner_context.call(:repository_path) || dev_instance_fs_path.blank?
64
+ return runner_context.call(:repository_path)
65
+ end
66
+
67
+ dev_instance_fs_path
68
+ end
69
+
70
+ def dev_instance_fs_path
71
+ instance.if_present do |v|
72
+ v.application.instance('dev').read_entry_optional(
73
+ ::Avm::Instances::EntryKeys::INSTALL_PATH
74
+ )
75
+ end
76
+ end
77
+
78
+ def deploy
79
+ git.commit(reference_sha1)
80
+ .deploy_to_url(target_url)
81
+ .append_templatized_directories(appended_directories)
82
+ .variables_source_set(variables_source)
83
+ .run
84
+ end
85
+
86
+ def target_url
87
+ parsed.target_url.if_present { |v| return v }
88
+ instance.if_present { |v| return v.install_url }
89
+ nil
90
+ end
91
+
92
+ def variables_source
93
+ instance || ::EacConfig::Node.context.current
94
+ end
95
+
96
+ def instance_uncached
97
+ instance_id.if_present { |v| ::Avm::Instances::Base.by_id(v) }
98
+ end
99
+
100
+ def instance_id
101
+ parsed.instance
102
+ end
103
+
104
+ def appended_directories
105
+ parsed.append_dirs.to_s.split(':')
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+
5
+ module Avm
6
+ module Git
7
+ module Runners
8
+ class Base
9
+ class DirtyFiles
10
+ DEFAULT_FORMAT = '%p'
11
+ FIELDS = {
12
+ i: :index, w: :worktree, p: :path, a: :absolute_path
13
+ }.transform_keys { |k| "%#{k}" }
14
+
15
+ runner_with :help do
16
+ desc 'Lists dirty files in Git repository.'
17
+ arg_opt '-f', '--format',
18
+ "Format of each line (See \"Format fields\") [default: #{DEFAULT_FORMAT}]."
19
+ end
20
+
21
+ def help_extra_text
22
+ "Format fields:\n" + FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n") # rubocop:disable Style/StringConcatenation
23
+ end
24
+
25
+ def run
26
+ runner_context.call(:git).dirty_files.each do |file|
27
+ out("#{format_file(file)}\n")
28
+ end
29
+ end
30
+
31
+ private
32
+
33
+ def format
34
+ parsed.format || DEFAULT_FORMAT
35
+ end
36
+
37
+ def format_file(file)
38
+ FIELDS.inject(format) { |a, e| a.gsub(e.first, file.send(e.last)) }
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/git/organize/repository'
4
+ require 'eac_cli/default_runner'
5
+
6
+ module Avm
7
+ module Git
8
+ module Runners
9
+ class Base
10
+ class Organize
11
+ runner_with :help do
12
+ desc 'Organize branches.'
13
+ bool_opt '-a', '--all', 'Run all organizations.'
14
+ bool_opt '-n', '--no', 'Do not run operations.'
15
+ bool_opt '-o', '--originals', 'Remove refs/original branches.'
16
+ bool_opt '-s', '--subrepos', 'Remove git-subrepo branches.'
17
+ bool_opt '-y', '--yes', 'Run operations without confirmation.'
18
+ end
19
+
20
+ def run
21
+ start_banner
22
+ collect_references
23
+ after_collect_banner
24
+ run_operations
25
+ end
26
+
27
+ private
28
+
29
+ def after_collect_banner
30
+ infov 'Collected references', repository.collected_references.count
31
+ repository.collected_references.each do |ru|
32
+ infov " * #{ru.reference}", ru.operation
33
+ end
34
+ end
35
+
36
+ def collect?(type)
37
+ parsed.fetch(type) || parsed.all?
38
+ end
39
+
40
+ def collect_references
41
+ %w[subrepos originals].each do |type|
42
+ repository.send("collect_#{type}") if collect?(type)
43
+ end
44
+ end
45
+
46
+ def run_operations
47
+ return warn('No operations to run (Run with --help to see options)') if
48
+ repository.collected_references.empty?
49
+ return unless run_operations?
50
+
51
+ repository.collected_references.each do |ru|
52
+ info "Doing operation #{ru}..."
53
+ ru.run_operation
54
+ end
55
+ end
56
+
57
+ def run_operations?
58
+ return true if parsed.yes?
59
+ return false if parsed.no?
60
+
61
+ input('Confirm operations?', bool: true)
62
+ end
63
+
64
+ def repository_uncached
65
+ ::Avm::Git::Organize::Repository.new(runner_context.call(:git).eac_git)
66
+ end
67
+
68
+ def start_banner
69
+ infov 'Repository', repository
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'avm/git/revision_test'
5
+
6
+ module Avm
7
+ module Git
8
+ module Runners
9
+ class Base
10
+ class RevisionsTest
11
+ runner_with :help do
12
+ desc 'Test multiple revisions until a error is found.'
13
+ arg_opt '-c', '--command', 'Command to test instance.'
14
+ bool_opt '-n', '--no-cache', 'Does not use cache.'
15
+ end
16
+
17
+ def run
18
+ fatal_error('Repository is dirty') if runner_context.call(:git).dirty?
19
+
20
+ return_to_branch_on_end do
21
+ infov 'Revisions found', revisions.count
22
+ if revision_with_error
23
+ warn("First revision with error: #{revision_with_error}")
24
+ else
25
+ success('No error found in revisions')
26
+ end
27
+ end
28
+ end
29
+
30
+ private
31
+
32
+ def return_to_branch_on_end
33
+ current_branch = runner_context.call(:git).current_branch
34
+ yield
35
+ ensure
36
+ infom "Returning to original branch \"#{current_branch}\""
37
+ runner_context.call(:git).execute!('checkout', current_branch)
38
+ end
39
+
40
+ def revision_with_error_uncached
41
+ revision_with_error = nil
42
+ revisions.each do |revision|
43
+ revision.banner
44
+ unless revision.successful?
45
+ revision_with_error = revision
46
+ break
47
+ end
48
+ end
49
+ revision_with_error
50
+ end
51
+
52
+ def revisions_uncached
53
+ runner_context.call(:git).execute!('log', '--pretty=format:%H', 'origin/master..HEAD')
54
+ .each_line.map(&:strip).reverse.map do |sha1|
55
+ ::Avm::Git::RevisionTest.new(runner_context.call(:git), sha1, test_revision_options)
56
+ end
57
+ end
58
+
59
+ def test_revision_options
60
+ { test_command: parsed.command, no_cache: parsed.no_cache? }
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'eac_git/local'
5
+
6
+ module Avm
7
+ module Git
8
+ module Runners
9
+ class Base
10
+ class Subrepo
11
+ class Check
12
+ runner_with :help do
13
+ desc 'Check status of subrepos.'
14
+ bool_opt '-a', '--all', 'Select all subrepos.'
15
+ bool_opt '-f', '--fix-parent', 'Fix parent SHA1.'
16
+ bool_opt '-n', '--no-error', 'Do not exit with error if check fails.'
17
+ bool_opt '-r', '--remote', 'Check subrepos remote.'
18
+ pos_arg :subrepos, repeat: true, optional: true
19
+ end
20
+
21
+ def run
22
+ subrepo_checks.show_result
23
+ return if parsed.no_error?
24
+ return unless subrepo_checks.result.error?
25
+
26
+ fatal_error 'Failed'
27
+ end
28
+
29
+ private
30
+
31
+ def subrepo_checks_uncached
32
+ r = ::Avm::Git::SubrepoChecks.new(local_repos)
33
+ r.check_remote = parsed.remote?
34
+ r.fix_parent = parsed.fix_parent?
35
+ r.add_all_subrepos if parsed.all?
36
+ r.add_subrepos(*parsed.subrepos)
37
+ r
38
+ end
39
+
40
+ def local_repos_uncached
41
+ ::EacGit::Local.new(runner_context.call(:git))
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'eac_git/local'
5
+
6
+ module Avm
7
+ module Git
8
+ module Runners
9
+ class Base
10
+ class Subrepo
11
+ class Clone
12
+ runner_with :help do
13
+ desc 'Clone git-subrepo repositories.'
14
+ arg_opt '-b', '--branch', 'Branch.'
15
+ arg_opt '-d', '--parent-dir', 'Target path\'s parent directory.'
16
+ pos_arg :url
17
+ pos_arg :target_path, optional: true
18
+ end
19
+
20
+ def run
21
+ start_banner
22
+ clean
23
+ clone
24
+ end
25
+
26
+ private
27
+
28
+ def start_banner
29
+ infov 'URL', url
30
+ infov 'Subpath', target_path
31
+ infov 'Branch', branch
32
+ end
33
+
34
+ def clean
35
+ infom 'Cleaning...'
36
+ git.command('subrepo', 'clean', '--all', '--force').system!
37
+ end
38
+
39
+ def clone
40
+ infom 'Cloning...'
41
+ infov 'Clone arguments', clone_args
42
+ git.command(*clone_args).system!
43
+ end
44
+
45
+ delegate :branch, :url, to: :parsed
46
+
47
+ def git_uncached
48
+ ::EacGit::Local.new('.')
49
+ end
50
+
51
+ def clone_args
52
+ ['subrepo'] + branch.if_present([]) { |v| ['--branch', v] } +
53
+ if ::File.exist?(target_path)
54
+ ['init', target_path, '--remote', url]
55
+ else
56
+ ['clone', url, target_path, '--message', clone_message, '--force']
57
+ end
58
+ end
59
+
60
+ def clone_message
61
+ "Subrepo \"#{target_path}\" (#{url})."
62
+ end
63
+
64
+ def repos_name_from_url
65
+ %r{/([^/]+)\z}.if_match(url, false) { |m| m[1].gsub(/\.git\z/, '') }
66
+ end
67
+
68
+ def target_path
69
+ parsed.target_path || target_path_from_parent_dir ||
70
+ fatal_error('No target path specified')
71
+ end
72
+
73
+ def target_path_from_parent_dir
74
+ return nil unless parsed.parent_dir && repos_name_from_url
75
+
76
+ ::File.join(parsed.parent_dir, repos_name_from_url)
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end