avm-tools 0.103.1 → 0.107.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/instances/entry.rb +3 -3
  3. data/lib/avm/launcher/context/instance_collector.rb +46 -0
  4. data/lib/avm/launcher/instances/runner_helper.rb +21 -15
  5. data/lib/avm/launcher/paths/logical.rb +5 -0
  6. data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +2 -2
  7. data/lib/avm/ruby/rubocop/_configured.rb +2 -2
  8. data/lib/avm/tools/app_src.rb +68 -0
  9. data/lib/avm/tools/runner/app_src/info.rb +16 -2
  10. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +62 -0
  11. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb +11 -41
  12. data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +2 -4
  13. data/lib/avm/tools/runner/app_src.rb +2 -2
  14. data/lib/avm/tools/runner/config/load_path.rb +2 -2
  15. data/lib/avm/tools/runner/git/deploy.rb +2 -2
  16. data/lib/avm/tools/runner/launcher/instances.rb +7 -5
  17. data/lib/avm/tools/runner/launcher/projects.rb +2 -4
  18. data/lib/avm/tools/runner/launcher/publish.rb +2 -6
  19. data/lib/avm/tools/runner.rb +1 -1
  20. data/lib/avm/tools/version.rb +1 -1
  21. data/vendor/avm/avm.gemspec +6 -0
  22. data/vendor/avm/lib/avm/app_src/base.rb +45 -0
  23. data/vendor/avm/lib/avm/app_src/configuration/_locale.rb +16 -0
  24. data/vendor/avm/lib/avm/app_src/configuration/_rubocop.rb +24 -0
  25. data/vendor/avm/lib/avm/app_src/configuration/_tests.rb +27 -0
  26. data/vendor/avm/lib/avm/app_src/configuration.rb +55 -0
  27. data/{lib/avm/eac_asciidoctor_base0.rb → vendor/avm/lib/avm/app_src.rb} +1 -1
  28. data/{lib → vendor/avm/lib}/avm/executables.rb +1 -1
  29. data/{lib → vendor/avm/lib}/avm/files/appendable/file_content.rb +0 -0
  30. data/{lib → vendor/avm/lib}/avm/files/appendable/plain_directory.rb +0 -0
  31. data/{lib → vendor/avm/lib}/avm/files/appendable/resource_base.rb +0 -0
  32. data/{lib → vendor/avm/lib}/avm/files/appendable/tar_output_command.rb +0 -0
  33. data/{lib → vendor/avm/lib}/avm/files/appendable/templatized_directory.rb +1 -0
  34. data/{lib → vendor/avm/lib}/avm/files/appendable.rb +0 -0
  35. data/{lib → vendor/avm/lib}/avm/files/appender.rb +0 -0
  36. data/{lib → vendor/avm/lib}/avm/files/deploy.rb +0 -1
  37. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/base.rb +2 -2
  38. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/generic_plain.rb +0 -0
  39. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/html.rb +0 -0
  40. data/vendor/avm/lib/avm/files/formatter/formats/javascript.rb +24 -0
  41. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/json.rb +0 -0
  42. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/php.rb +1 -0
  43. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/python.rb +1 -0
  44. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/ruby.rb +0 -0
  45. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/xml.rb +1 -0
  46. data/{lib → vendor/avm/lib}/avm/files/formatter/formats.rb +0 -0
  47. data/{lib → vendor/avm/lib}/avm/files/formatter/utf8_assert.rb +3 -1
  48. data/{lib → vendor/avm/lib}/avm/files/formatter.rb +1 -1
  49. data/{lib → vendor/avm/lib}/avm/files/rotate.rb +0 -0
  50. data/{lib → vendor/avm/lib}/avm/files.rb +0 -0
  51. data/{lib → vendor/avm/lib}/avm/git/auto_commit/commit_info.rb +0 -0
  52. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/base.rb +0 -0
  53. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/last.rb +0 -0
  54. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/manual.rb +0 -0
  55. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/new.rb +0 -0
  56. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/nth.rb +0 -0
  57. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/unique.rb +0 -0
  58. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules.rb +0 -0
  59. data/{lib → vendor/avm/lib}/avm/git/auto_commit_path/ruby.rb +0 -0
  60. data/{lib → vendor/avm/lib}/avm/git/auto_commit_path.rb +1 -1
  61. data/{lib → vendor/avm/lib}/avm/git/commit/class_methods.rb +0 -0
  62. data/{lib → vendor/avm/lib}/avm/git/commit/deploy.rb +0 -1
  63. data/{lib → vendor/avm/lib}/avm/git/commit/deploy_methods.rb +0 -0
  64. data/{lib → vendor/avm/lib}/avm/git/commit/diff_tree_line.rb +0 -0
  65. data/{lib → vendor/avm/lib}/avm/git/commit/file.rb +2 -2
  66. data/{lib → vendor/avm/lib}/avm/git/commit.rb +3 -2
  67. data/{lib → vendor/avm/lib}/avm/git/file_auto_fixup.rb +0 -0
  68. data/{lib → vendor/avm/lib}/avm/git/issue/complete/commits.rb +0 -0
  69. data/{lib → vendor/avm/lib}/avm/git/issue/complete/git_subrepos.rb +0 -0
  70. data/{lib → vendor/avm/lib}/avm/git/issue/complete/local_branch.rb +0 -0
  71. data/{lib → vendor/avm/lib}/avm/git/issue/complete/local_tag.rb +0 -0
  72. data/{lib → vendor/avm/lib}/avm/git/issue/complete/push.rb +0 -0
  73. data/{lib → vendor/avm/lib}/avm/git/issue/complete/remote.rb +0 -0
  74. data/{lib → vendor/avm/lib}/avm/git/issue/complete/test.rb +2 -2
  75. data/{lib → vendor/avm/lib}/avm/git/issue/complete/tracker.rb +0 -0
  76. data/{lib → vendor/avm/lib}/avm/git/issue/complete/validation.rb +0 -0
  77. data/{lib → vendor/avm/lib}/avm/git/issue/complete/validations.rb +0 -0
  78. data/{lib → vendor/avm/lib}/avm/git/issue/complete/working_tree.rb +0 -0
  79. data/{lib → vendor/avm/lib}/avm/git/issue/complete.rb +0 -0
  80. data/{lib → vendor/avm/lib}/avm/git/issue/deliver.rb +0 -0
  81. data/{lib → vendor/avm/lib}/avm/git/issue.rb +0 -0
  82. data/{lib → vendor/avm/lib}/avm/git/organize/reference_update.rb +0 -0
  83. data/{lib → vendor/avm/lib}/avm/git/organize/repository.rb +0 -0
  84. data/{lib → vendor/avm/lib}/avm/git/organize.rb +0 -0
  85. data/{lib → vendor/avm/lib}/avm/git/revision_test.rb +2 -3
  86. data/{lib → vendor/avm/lib}/avm/git/subrepo_check/parent.rb +0 -0
  87. data/{lib → vendor/avm/lib}/avm/git/subrepo_check/remote.rb +0 -0
  88. data/{lib → vendor/avm/lib}/avm/git/subrepo_check/show_result.rb +0 -1
  89. data/{lib → vendor/avm/lib}/avm/git/subrepo_check.rb +0 -1
  90. data/{lib → vendor/avm/lib}/avm/git/subrepo_checks.rb +1 -1
  91. data/{lib → vendor/avm/lib}/avm/git.rb +0 -0
  92. data/vendor/avm/lib/avm/jobs/base.rb +62 -0
  93. data/vendor/avm/lib/avm/jobs/variables_source.rb +22 -0
  94. data/vendor/{avm-apps/lib/avm/apps → avm/lib/avm}/jobs.rb +2 -4
  95. data/{lib → vendor/avm/lib}/avm/result.rb +0 -0
  96. data/vendor/avm/lib/avm/version.rb +1 -1
  97. data/vendor/avm/spec/lib/avm/git/auto_commit_path_spec.rb +21 -0
  98. data/vendor/avm/spec/lib/avm/git/commit/deploy_spec.rb +93 -0
  99. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec.rb +13 -0
  100. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +1 -0
  101. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
  102. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +1 -0
  103. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
  104. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +1 -0
  105. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
  106. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +2 -0
  107. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
  108. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
  109. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
  110. data/vendor/avm/spec/lib/avm/git/commit_spec.rb +56 -0
  111. data/vendor/avm/spec/rubocop_spec.rb +1 -1
  112. data/vendor/avm/spec/spec_helper.rb +2 -100
  113. data/vendor/avm-apps/avm-apps.gemspec +1 -1
  114. data/vendor/avm-apps/lib/avm/apps/version.rb +1 -1
  115. data/vendor/avm-apps/spec/rubocop_spec.rb +1 -1
  116. data/vendor/avm-apps/spec/spec_helper.rb +2 -101
  117. data/vendor/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -0
  118. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/apache_host.rb +0 -0
  119. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/apache_path.rb +0 -0
  120. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/deploy.rb +0 -0
  121. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/instance.rb +0 -0
  122. data/vendor/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  123. data/vendor/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb +1 -1
  124. data/vendor/avm-eac_asciidoctor_base0/spec/spec_helper.rb +2 -100
  125. data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  126. data/vendor/avm-eac_rails_base1/spec/rubocop_spec.rb +1 -1
  127. data/vendor/avm-eac_rails_base1/spec/spec_helper.rb +2 -100
  128. data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -1
  129. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -2
  130. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  131. data/vendor/avm-eac_redmine_base0/spec/rubocop_spec.rb +1 -1
  132. data/vendor/avm-eac_redmine_base0/spec/spec_helper.rb +2 -100
  133. data/vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template +1 -0
  134. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +2 -2
  135. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +2 -2
  136. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +2 -2
  137. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  138. data/vendor/avm-eac_webapp_base0/spec/rubocop_spec.rb +1 -1
  139. data/vendor/avm-eac_webapp_base0/spec/spec_helper.rb +2 -100
  140. data/vendor/eac_cli/eac_cli.gemspec +3 -3
  141. data/vendor/eac_cli/lib/eac_cli/config/entry.rb +0 -2
  142. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
  143. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
  144. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
  145. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
  146. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  147. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
  148. data/vendor/eac_cli/spec/rubocop_spec.rb +1 -1
  149. data/vendor/eac_cli/spec/spec_helper.rb +2 -101
  150. data/vendor/eac_config/eac_config.gemspec +2 -2
  151. data/vendor/eac_config/lib/eac_config/version.rb +1 -1
  152. data/vendor/eac_config/spec/rubocop_spec.rb +1 -1
  153. data/vendor/eac_config/spec/spec_helper.rb +2 -15
  154. data/vendor/eac_docker/eac_docker.gemspec +2 -2
  155. data/vendor/eac_docker/lib/eac_docker/container.rb +7 -3
  156. data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +4 -0
  157. data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
  158. data/vendor/eac_docker/lib/eac_docker/rspec.rb +2 -10
  159. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  160. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -1
  161. data/vendor/eac_docker/spec/spec_helper.rb +2 -104
  162. data/vendor/eac_fs/Gemfile +5 -0
  163. data/vendor/eac_fs/eac_fs.gemspec +20 -0
  164. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb → eac_fs/lib/eac_fs/cache.rb} +7 -2
  165. data/{lib/avm → vendor/eac_fs/lib/eac_fs}/cached_download.rb +4 -4
  166. data/vendor/eac_fs/lib/eac_fs/file_info.rb +29 -0
  167. data/vendor/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +10 -0
  168. data/vendor/eac_fs/lib/eac_fs/patches/module.rb +4 -0
  169. data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +10 -0
  170. data/vendor/eac_fs/lib/eac_fs/patches/object.rb +4 -0
  171. data/vendor/eac_fs/lib/eac_fs/patches/pathname/info.rb +12 -0
  172. data/vendor/eac_fs/lib/eac_fs/patches/pathname.rb +4 -0
  173. data/vendor/eac_fs/lib/eac_fs/patches.rb +4 -0
  174. data/vendor/eac_fs/lib/eac_fs/version.rb +5 -0
  175. data/vendor/eac_fs/lib/eac_fs.rb +7 -0
  176. data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/filesystem_cache_spec.rb → eac_fs/spec/lib/eac_fs/cache_spec.rb} +2 -2
  177. data/vendor/eac_fs/spec/rubocop_spec.rb +3 -0
  178. data/vendor/eac_fs/spec/spec_helper.rb +4 -0
  179. data/vendor/eac_git/eac_git.gemspec +3 -3
  180. data/vendor/eac_git/lib/eac_git/local/commit/archive.rb +1 -1
  181. data/vendor/eac_git/lib/eac_git/local/commit.rb +3 -3
  182. data/vendor/eac_git/lib/eac_git/local.rb +13 -0
  183. data/vendor/eac_git/lib/eac_git/rspec/setup.rb +23 -0
  184. data/vendor/eac_git/lib/eac_git/rspec.rb +1 -14
  185. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  186. data/vendor/eac_git/spec/rubocop_spec.rb +1 -1
  187. data/vendor/eac_git/spec/spec_helper.rb +2 -104
  188. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +5 -4
  189. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +3 -3
  190. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +1 -0
  191. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +16 -7
  192. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  193. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -1
  194. data/vendor/eac_ruby_base0/spec/spec_helper.rb +2 -101
  195. data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +2 -2
  196. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -5
  197. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  198. data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +1 -1
  199. data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +2 -101
  200. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  201. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
  202. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +15 -3
  203. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +75 -0
  204. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
  205. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  206. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  207. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  208. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
  209. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  210. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
  211. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  212. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  213. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  214. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
  215. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
  216. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
  217. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  218. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -1
  219. data/vendor/eac_ruby_utils/spec/spec_helper.rb +6 -6
  220. data/vendor/eac_templates/lib/eac_templates/patches/module/erb_template.rb +9 -0
  221. data/vendor/eac_templates/lib/eac_templates/patches/module.rb +4 -0
  222. data/vendor/eac_templates/lib/eac_templates/patches/object/erb_template.rb +9 -0
  223. data/vendor/eac_templates/lib/eac_templates/patches/object.rb +4 -0
  224. data/vendor/eac_templates/lib/eac_templates/patches.rb +4 -0
  225. data/vendor/eac_templates/lib/eac_templates/version.rb +1 -1
  226. data/vendor/eac_templates/spec/rubocop_spec.rb +1 -1
  227. data/vendor/eac_templates/spec/spec_helper.rb +2 -100
  228. metadata +146 -250
  229. data/lib/avm/app_src.rb +0 -61
  230. data/lib/avm/files/info.rb +0 -24
  231. data/lib/avm/fs_cache.rb +0 -11
  232. data/vendor/avm-apps/lib/avm/apps/config.rb +0 -19
  233. data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +0 -64
  234. data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +0 -24
  235. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +0 -18
  236. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +0 -26
  237. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +0 -29
  238. data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +0 -57
  239. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +0 -12
  240. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
  241. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bee250c84ba8f56a38c3e10bc301116cab8098d23cf7f75a5027a7ae43b66d80
4
- data.tar.gz: db17fbed340f859c761618bb94f6d83baa59b6e4c6d15fd7d053589d875175d3
3
+ metadata.gz: 982669127ef20f0cf64fa12fbe0d087c0479b0e8575d7bb2c6047abac2ec81d3
4
+ data.tar.gz: d4d659206696045d925dbba86c5d4fa69e184dbbdc58001e3453344ef68ef9ef
5
5
  SHA512:
6
- metadata.gz: 7088176c3a9109762de09fbd347836bc9f86fb856f1fc4703c7f7f91e5309b596935466231dd8bb316285ae613a29f611bc992d8ae43cc03f8daf308bce0740c
7
- data.tar.gz: ff79f6f21852b281262254df6d3f0eccab89129f972b83e8b9e524edfee9e32484afe0cbf46f502284c0df6d3fe5c8cc57c3a342c9331e0b7be0c468fbf0738d
6
+ metadata.gz: 436eb2a8f5957c9ffcb130851bb2dee4ab070cfd610a25356e8030766b6190a2a096b7a25250ab33801036f01e79e5c50bfc8024c2b6172f721f1868811251ea
7
+ data.tar.gz: 57711beda558d8e28ba2f98fd9ccbe4be8372e32093e1e45591ad7b5bb89cc9014946720b5430eaf66ef5ce4e583d96e3b3e556be39ce2670df577ee11d681cb
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/apps/config'
3
+ require 'eac_config/node'
4
4
  require 'eac_ruby_utils/core_ext'
5
5
 
6
6
  module Avm
@@ -31,7 +31,7 @@ module Avm
31
31
  end
32
32
 
33
33
  def read(extra_options = {})
34
- ::Avm::Apps::Config.current.entry(full_path, options.merge(extra_options)).value
34
+ ::EacConfig::Node.context.current.entry(full_path, options.merge(extra_options)).value
35
35
  end
36
36
 
37
37
  def suffix_as_array
@@ -47,7 +47,7 @@ module Avm
47
47
  end
48
48
 
49
49
  def write(value)
50
- ::Avm::Apps::Config.current.entry(full_path).value = value
50
+ ::EacConfig::Node.context.current.entry(full_path).value = value
51
51
  end
52
52
  end
53
53
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Launcher
7
+ class Context
8
+ class InstanceCollector
9
+ common_constructor :context
10
+
11
+ def add_all
12
+ instances_set.merge(context.instances)
13
+ self
14
+ end
15
+
16
+ def add_path(path)
17
+ instances_set.merge(instances_on_path(path))
18
+ self
19
+ end
20
+
21
+ def add_pending
22
+ instances_set.merge(context.pending_instances)
23
+ self
24
+ end
25
+
26
+ def instances
27
+ instances_set.sort
28
+ end
29
+
30
+ private
31
+
32
+ def instance_match?(instance, instance_name)
33
+ ::File.fnmatch?(instance_name, instance.name)
34
+ end
35
+
36
+ def instances_on_path(path)
37
+ context.instances.select { |instance| instance_match?(instance, path) }
38
+ end
39
+
40
+ def instances_set
41
+ @instances_set ||= ::Set.new
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -1,31 +1,33 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/launcher/context'
3
4
  require 'avm/tools/core_ext'
5
+ require 'avm/launcher/context/instance_collector'
4
6
 
5
7
  module Avm
6
8
  module Launcher
7
9
  module Instances
8
- class RunnerHelper
9
- def context
10
- @context ||= ::Avm::Launcher::Context.current
11
- end
10
+ module RunnerHelper
11
+ common_concern do
12
+ runner_definition do
13
+ bool_opt '--all', 'Select all instances.'
14
+ bool_opt '--pending', 'Select pending instances.'
15
+ bool_opt '--recache', 'Rewrite instances cache.'
16
+ end
12
17
 
13
- def find_instances(instance_name)
14
- context.instances.select { |instance| instance_match?(instance, instance_name) }
18
+ set_callback :run, :before, :setup_cache
15
19
  end
16
20
 
17
- def instance_match?(instance, instance_name)
18
- ::File.fnmatch?(instance_name, instance.name)
21
+ def context
22
+ @context ||= ::Avm::Launcher::Context.current
19
23
  end
20
24
 
21
25
  def instances
22
- if parsed.all?
23
- context.instances
24
- elsif parsed.pending?
25
- context.pending_instances
26
- else
27
- parsed.instance_path.flat_map { |p| find_instances(p) }
28
- end
26
+ collector = ::Avm::Launcher::Context::InstanceCollector.new(context)
27
+ collector.add_all if parsed.all?
28
+ collector.add_pending if parsed.pending?
29
+ parsed.instance_path.flat_map { |p| collector.add_path(p) }
30
+ collector.instances
29
31
  end
30
32
 
31
33
  def instance_stereotypes(instance)
@@ -35,6 +37,10 @@ module Avm
35
37
  def instance_label(instance)
36
38
  "#{instance.name} [#{instance_stereotypes(instance)}]"
37
39
  end
40
+
41
+ def setup_cache
42
+ ::Avm::Launcher::Context.current.recache = parsed.recache?
43
+ end
38
44
  end
39
45
  end
40
46
  end
@@ -7,6 +7,7 @@ module Avm
7
7
  module Launcher
8
8
  module Paths
9
9
  class Logical
10
+ include ::Comparable
10
11
  include ::EacRubyUtils::SimpleCache
11
12
 
12
13
  class << self
@@ -25,6 +26,10 @@ module Avm
25
26
  @logical = logical
26
27
  end
27
28
 
29
+ def <=>(other)
30
+ [logical, real] <=> [other.logical, other.real]
31
+ end
32
+
28
33
  def to_s
29
34
  logical
30
35
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/apps/sources/configuration'
3
+ require 'avm/app_src/configuration'
4
4
  require 'eac_ruby_gems_utils/gem'
5
5
  require 'eac_ruby_utils/core_ext'
6
6
 
@@ -13,7 +13,7 @@ module Avm
13
13
  private
14
14
 
15
15
  def configuration_uncached
16
- ::Avm::Apps::Sources::Configuration.find_in_path(root)
16
+ ::Avm::AppSrc::Configuration.find_in_path(root)
17
17
  end
18
18
 
19
19
  def gemfile_path_uncached
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/apps/sources/configuration'
3
+ require 'avm/app_src/configuration'
4
4
 
5
5
  module Avm
6
6
  module Ruby
@@ -22,7 +22,7 @@ module Avm
22
22
  private
23
23
 
24
24
  def configuration_uncached
25
- ::Avm::Apps::Sources::Configuration.find_by_path(base_path)
25
+ ::Avm::AppSrc::Configuration.find_by_path(base_path)
26
26
  end
27
27
  end
28
28
  end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/app_src/base'
4
+ require 'avm/app_src/configuration'
5
+ require 'avm/launcher/paths/real'
6
+ require 'avm/projects/stereotype/job_comparator'
7
+ require 'eac_ruby_utils/core_ext'
8
+ require 'avm/projects/stereotypes'
9
+ require 'i18n'
10
+
11
+ module Avm
12
+ module Tools
13
+ class AppSrc
14
+ enable_simple_cache
15
+ common_constructor :path do
16
+ self.path = path.to_pathname
17
+ source_stereotypes_mixins
18
+ end
19
+
20
+ delegate :to_s, to: :path
21
+
22
+ def locale
23
+ configuration.if_present(&:locale) || ::I18n.default_locale
24
+ end
25
+
26
+ # Backward compatibility with [Avm::Launcher::Paths::Logical].
27
+ # @return [Avm::Launcher::Paths::Real].
28
+ def real
29
+ ::Avm::Launcher::Paths::Real.new(path.to_path)
30
+ end
31
+
32
+ def run_job(job, job_args = [])
33
+ stereotypes_jobs(job, job_args).each(&:run)
34
+ end
35
+
36
+ private
37
+
38
+ def avm_instance_uncached
39
+ ::Avm::AppSrc::Base.new(path)
40
+ end
41
+
42
+ # @return [Avm::Apps::Sources::Configuration]
43
+ def configuration_uncached
44
+ ::Avm::AppSrc::Configuration.find_in_path(path)
45
+ end
46
+
47
+ def stereotypes_jobs(job, job_args)
48
+ job_class_method = "#{job}_class"
49
+ r = []
50
+ stereotypes.each do |stereotype|
51
+ r << stereotype.send(job_class_method).new(self, *job_args) if
52
+ stereotype.send(job_class_method).present?
53
+ end
54
+ r.sort { |a, b| ::Avm::Projects::Stereotype::JobComparator.new(a, b).result }
55
+ end
56
+
57
+ def stereotypes_uncached
58
+ ::Avm::Projects::Stereotypes.list.select { |s| s.match?(self) }
59
+ end
60
+
61
+ def source_stereotypes_mixins
62
+ stereotypes.each do |s|
63
+ s.local_project_mixin_module.if_present { |v| singleton_class.include(v) }
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -12,8 +12,22 @@ module Avm
12
12
  end
13
13
 
14
14
  def run
15
- infov 'Path', runner_context.call(:instance).path
16
- infov 'Stereotypes', runner_context.call(:instance).stereotypes.map(&:label).join(', ')
15
+ infov 'Path', instance.path
16
+ infov 'Stereotypes', instance.stereotypes.map(&:label).join(', ')
17
+ show_subs
18
+ end
19
+
20
+ private
21
+
22
+ def show_subs
23
+ infov 'Sub applications', instance.avm_instance.subs.count
24
+ instance.avm_instance.subs.each do |subapp|
25
+ infov ' * ', subapp.relative_path
26
+ end
27
+ end
28
+
29
+ def instance
30
+ runner_context.call(:instance)
17
31
  end
18
32
  end
19
33
  end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_base0/core_ext'
4
+
5
+ module Avm
6
+ module Tools
7
+ class Runner
8
+ class AppSrc
9
+ class Ruby
10
+ class Bundler
11
+ class GemfileLock
12
+ module Git
13
+ private
14
+
15
+ def git_continue
16
+ return unless check_capability(__method__, :git_repo, :continue)
17
+
18
+ infom "Adding \"#{gemfile_lock}\"..."
19
+ instance.git_repo.command('add', gemfile_lock).execute!
20
+ if rebase_conflict?
21
+ git_continue_run('rebase')
22
+ elsif cherry_conflict?
23
+ git_continue_run('cherry-pick')
24
+ else
25
+ raise 'Unknown how to continue'
26
+ end
27
+ end
28
+
29
+ def git_continue_run(command)
30
+ infom "\"#{command}\" --continue..."
31
+ cmd = instance.git_repo.command(command, '--continue')
32
+ .envvar('GIT_EDITOR', 'true')
33
+ return unless !cmd.system && !conflict?
34
+
35
+ fatal_error "\"#{cmd}\" failed and there is no conflict"
36
+ end
37
+
38
+ def git_reset_checkout
39
+ return unless check_capability(__method__, :git_repo, nil)
40
+
41
+ git_reset_gemfile_lock
42
+ git_checkout_gemfile_lock
43
+ end
44
+
45
+ def git_checkout_gemfile_lock
46
+ infom 'Checkouting...'
47
+ instance.git_repo.command('checkout', '--', gemfile_lock).system!
48
+ end
49
+
50
+ def git_reset_gemfile_lock
51
+ infom 'Reseting...'
52
+ instance.git_repo.command('reset', gemfile_lock).system! if
53
+ ::File.exist?(gemfile_lock)
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -9,18 +9,21 @@ module Avm
9
9
  class Ruby
10
10
  class Bundler
11
11
  class GemfileLock
12
+ require_sub __FILE__, include_modules: true
12
13
  runner_with :help do
13
14
  desc 'Manipulage a "Gemfile.lock" file.'
14
15
  bool_opt '-c', '--continue', 'Continue Git rebase/cherry-pick.'
15
16
  bool_opt '-i', '--install', 'Run "bundle install".'
16
17
  bool_opt '-u', '--update', 'Run "bundle update".'
17
18
  bool_opt '-r', '--recursive', 'Run until Git rebase/cherry-pick is finished.'
18
- bool_opt '-a', '--all', 'Same as "-ciru".'
19
+ bool_opt '-a', '--all', 'Same as "-cirud".'
20
+ bool_opt '-d', '--delete', 'Delete Gemfile.lock'
19
21
  end
20
22
 
21
23
  def run
22
24
  loop do
23
25
  git_reset_checkout
26
+ delete_gemfile_lock
24
27
  bundle_update
25
28
  bundle_install
26
29
  git_continue
@@ -34,17 +37,14 @@ module Avm
34
37
  !option_or_all?(:recursive) || !conflict?
35
38
  end
36
39
 
37
- def rebasing?
38
- instance.git_repo.root_path.join('.git', 'rebase-merge').exist?
39
- end
40
+ def delete_gemfile_lock
41
+ return unless check_capability(__method__, nil, :delete)
40
42
 
41
- def git_reset_checkout
42
- return unless check_capability(__method__, :git_repo, nil)
43
+ ::FileUtils.rm_f(gemfile_lock)
44
+ end
43
45
 
44
- infom 'Reseting...'
45
- instance.git_repo.command('reset', gemfile_lock).system!
46
- infom 'Checkouting...'
47
- instance.git_repo.command('checkout', '--', gemfile_lock).system!
46
+ def rebasing?
47
+ instance.git_repo.root_path.join('.git', 'rebase-merge').exist?
48
48
  end
49
49
 
50
50
  def bundle_install
@@ -61,44 +61,14 @@ module Avm
61
61
  bundle_run('update')
62
62
  end
63
63
 
64
- def git_continue
65
- return unless check_capability(__method__, :git_repo, :continue)
66
-
67
- infom "Adding \"#{gemfile_lock}\"..."
68
- instance.git_repo.command('add', gemfile_lock).execute!
69
- if rebase_conflict?
70
- git_continue_run('rebase')
71
- elsif cherry_conflict?
72
- git_continue_run('cherry-pick')
73
- else
74
- raise 'Unknown how to continue'
75
- end
76
- end
77
-
78
- def git_continue_run(command)
79
- infom "\"#{command}\" --continue..."
80
- cmd = instance.git_repo.command(command, '--continue').envvar('GIT_EDITOR', 'true')
81
- return unless !cmd.system && !conflict?
82
-
83
- fatal_error "\"#{cmd}\" failed and there is no conflict"
84
- end
85
-
86
64
  def gemfile_lock
87
65
  'Gemfile.lock'
88
66
  end
89
67
 
90
- def git_uncached
91
- ::EacGit::Local.new(git_path)
92
- end
93
-
94
68
  def bundle_run(*args)
95
69
  instance.ruby_gem.bundle(*args).system!
96
70
  end
97
71
 
98
- def git_path
99
- '.'
100
- end
101
-
102
72
  def conflict?
103
73
  rebase_conflict? || cherry_conflict?
104
74
  end
@@ -121,7 +91,7 @@ module Avm
121
91
 
122
92
  def check_capability(caller, capability, option)
123
93
  return false unless option.blank? || option_or_all?(option)
124
- return true if instance.respond_to?(capability)
94
+ return true if capability.if_present(true) { |v| instance.respond_to?(v) }
125
95
 
126
96
  warn "Cannot run #{caller}: instance has no capability \"#{capability}\""
127
97
  false
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/fs_cache'
4
3
  require 'avm/ruby/bundler/incompatible_parser'
5
4
  require 'eac_ruby_base0/core_ext'
6
5
 
@@ -36,9 +35,8 @@ module Avm
36
35
  fs_cache.content_path
37
36
  end
38
37
 
39
- def fs_cache_uncached
40
- ::Avm.fs_cache.child(self.class.name.variableize)
41
- .child(instance.path.to_s.variableize)
38
+ def fs_cache
39
+ super.child(instance.path.to_s.variableize)
42
40
  end
43
41
 
44
42
  def gem_title(gem_in_conflict)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/app_src'
3
+ require 'avm/tools/app_src'
4
4
  require 'eac_cli/core_ext'
5
5
 
6
6
  module Avm
@@ -22,7 +22,7 @@ module Avm
22
22
  private
23
23
 
24
24
  def instance_uncached
25
- ::Avm::AppSrc.new(instance_path)
25
+ ::Avm::Tools::AppSrc.new(instance_path)
26
26
  end
27
27
 
28
28
  def instance_path_uncached
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/apps/config'
4
3
  require 'avm/self'
5
4
  require 'avm/tools/core_ext'
5
+ require 'eac_config/node'
6
6
 
7
7
  module Avm
8
8
  module Tools
@@ -23,7 +23,7 @@ module Avm
23
23
 
24
24
  # @return [[EacCli::Config]]
25
25
  def config_node
26
- ::Avm::Apps::Config.current
26
+ ::EacConfig::Node.context.current
27
27
  end
28
28
 
29
29
  def run_add
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/apps/config'
4
3
  require 'avm/launcher/git/base'
5
4
  require 'avm/git/commit'
5
+ require 'eac_config/node'
6
6
 
7
7
  module Avm
8
8
  module Tools
@@ -91,7 +91,7 @@ module Avm
91
91
  end
92
92
 
93
93
  def variables_source
94
- instance || ::Avm::Apps::Config.current
94
+ instance || ::EacConfig::Node.context.current
95
95
  end
96
96
 
97
97
  def instance_uncached
@@ -6,16 +6,14 @@ module Avm
6
6
  module Tools
7
7
  class Runner
8
8
  class Launcher
9
- class Instances < ::Avm::Launcher::Instances::RunnerHelper
10
- runner_with :help do
9
+ class Instances
10
+ runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
11
11
  desc 'Mostra informações sobre instâncias.'
12
- bool_opt '--recache', 'Rewrite instances cache.'
13
- bool_opt '--all', 'Get all instances.'
12
+ bool_opt '-e', '--extra', 'Show instances\' extra data.'
14
13
  pos_arg :instance_path, repeat: true, optional: true
15
14
  end
16
15
 
17
16
  def run
18
- ::Avm::Launcher::Context.current.recache = parsed.recache?
19
17
  instances.each { |i| show_instance(i) }
20
18
  end
21
19
 
@@ -23,6 +21,10 @@ module Avm
23
21
 
24
22
  def show_instance(instance)
25
23
  puts instance_label(instance)
24
+ show_instance_extra(instance) if parsed.extra?
25
+ end
26
+
27
+ def show_instance_extra(instance)
26
28
  infov(' * Parent', (instance.parent ? instance_label(instance.parent) : '-'))
27
29
  infov(' * Git current revision', instance.options.git_current_revision)
28
30
  infov(' * Git publish remote', instance.options.git_publish_remote)
@@ -7,15 +7,13 @@ module Avm
7
7
  module Tools
8
8
  class Runner
9
9
  class Launcher
10
- class Projects < ::Avm::Launcher::Instances::RunnerHelper
11
- runner_with :help do
10
+ class Projects
11
+ runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
12
12
  desc 'Shows available projects.'
13
- bool_opt '--recache', 'Rewrite instances cache.'
14
13
  bool_opt '-i', '--instances', 'Show instances.'
15
14
  end
16
15
 
17
16
  def run
18
- ::Avm::Launcher::Context.current.recache = parsed.recache?
19
17
  ::Avm::Launcher::Context.current.projects.each do |p|
20
18
  show_project(p)
21
19
  end
@@ -6,21 +6,17 @@ module Avm
6
6
  module Tools
7
7
  class Runner
8
8
  class Launcher
9
- class Publish < ::Avm::Launcher::Instances::RunnerHelper
10
- runner_with :help do
9
+ class Publish
10
+ runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
11
11
  desc 'Publica projetos ou instâncias.'
12
- bool_opt '--all', 'Get all instances.'
13
12
  bool_opt '-d', '--dry-run', '"Dry run" publishing.'
14
13
  bool_opt '--new', 'Publish projects not published before.'
15
- bool_opt '--pending', 'Publish only pending.'
16
- bool_opt '--recache', 'Rewrite instances cache.'
17
14
  bool_opt '--run', 'Confirm publishing.'
18
15
  arg_opt '-s', '--stereotype', 'Publish only for stereotype <stereotype>.'
19
16
  pos_arg :instance_path, repeat: true, optional: true
20
17
  end
21
18
 
22
19
  def run
23
- ::Avm::Launcher::Context.current.recache = parsed.recache?
24
20
  build_publish_options
25
21
  instances.each do |i|
26
22
  next unless i.options.publishable?
@@ -19,7 +19,7 @@ module Avm
19
19
  end
20
20
 
21
21
  def run
22
- ::Avm::Apps::Config.context.on(::Avm::Self.build_config) { super }
22
+ ::EacConfig::Node.context.on(::Avm::Self.build_config) { super }
23
23
  end
24
24
  end
25
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.103.1'
5
+ VERSION = '0.107.0'
6
6
  end
7
7
  end
@@ -13,7 +13,13 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
15
  s.add_dependency 'eac_docker', '~> 0.3'
16
+ s.add_dependency 'eac_git', '~> 0.6'
16
17
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
18
+ s.add_dependency 'eac_templates', '~> 0.1', '>= 0.1.1'
19
+ s.add_dependency 'filesize', '~> 0.2'
20
+ s.add_dependency 'htmlbeautifier', '~> 1.3', '>= 1.3.1'
21
+ s.add_dependency 'minitar', '~> 0.9'
17
22
 
23
+ s.add_development_dependency 'aranha-parsers', '~> 0.7', '>= 0.7.2'
18
24
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
19
25
  end