avm-tools 0.107.0 → 0.110.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +2 -2
  3. data/lib/avm/projects/stereotypes/ruby_gem/version_bump.rb +2 -2
  4. data/lib/avm/ruby/rubocop/_configured.rb +2 -2
  5. data/lib/avm/tools/app_src.rb +5 -5
  6. data/lib/avm/tools/runner/app_src/info.rb +12 -2
  7. data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +2 -2
  8. data/lib/avm/tools/runner/app_src/update.rb +2 -2
  9. data/lib/avm/tools/runner/app_src.rb +4 -0
  10. data/lib/avm/tools/runner/config/load_path.rb +8 -3
  11. data/lib/avm/tools/runner/files/rotate.rb +2 -2
  12. data/lib/avm/tools/runner/self/registry.rb +25 -0
  13. data/lib/avm/tools/runner.rb +3 -2
  14. data/lib/avm/tools/version.rb +1 -1
  15. data/template/avm/ruby/gems/generator/static/spec/rubocop_spec.rb +1 -1
  16. data/template/avm/ruby/gems/generator/static/spec/spec_helper.rb +2 -100
  17. data/vendor/avm/avm.gemspec +2 -1
  18. data/{lib → vendor/avm/lib}/avm/data/instance/files_unit.rb +0 -0
  19. data/{lib → vendor/avm/lib}/avm/data/instance/package.rb +0 -0
  20. data/{lib → vendor/avm/lib}/avm/data/instance/unit.rb +0 -0
  21. data/{lib → vendor/avm/lib}/avm/data/instance.rb +0 -0
  22. data/{lib → vendor/avm/lib}/avm/data/package/dump.rb +3 -3
  23. data/{lib → vendor/avm/lib}/avm/data/package/load.rb +0 -0
  24. data/{lib → vendor/avm/lib}/avm/data/package.rb +0 -0
  25. data/vendor/avm/lib/avm/{files → data}/rotate.rb +1 -1
  26. data/{lib → vendor/avm/lib}/avm/data/unit.rb +0 -0
  27. data/vendor/avm/lib/avm/docker/runner.rb +8 -0
  28. data/{lib → vendor/avm/lib}/avm/instances/application.rb +0 -0
  29. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/access.rb +0 -0
  30. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/admin.rb +0 -0
  31. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/data.rb +0 -0
  32. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/database.rb +0 -0
  33. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/filesystem.rb +0 -0
  34. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/mailer.rb +0 -0
  35. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/ruby.rb +0 -0
  36. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/source.rb +0 -0
  37. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/system.rb +0 -0
  38. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values/web.rb +0 -0
  39. data/{lib → vendor/avm/lib}/avm/instances/base/auto_values.rb +0 -0
  40. data/{lib → vendor/avm/lib}/avm/instances/base/dockerizable.rb +0 -0
  41. data/{lib → vendor/avm/lib}/avm/instances/base/entry_keys.rb +0 -0
  42. data/{lib → vendor/avm/lib}/avm/instances/base.rb +0 -0
  43. data/{lib → vendor/avm/lib}/avm/instances/entries.rb +0 -0
  44. data/{lib → vendor/avm/lib}/avm/instances/entry.rb +0 -0
  45. data/{lib → vendor/avm/lib}/avm/instances/entry_keys.rb +0 -0
  46. data/{lib → vendor/avm/lib}/avm/instances/runner.rb +0 -0
  47. data/{lib → vendor/avm/lib}/avm/instances.rb +0 -0
  48. data/vendor/avm/lib/avm/jobs/base.rb +1 -0
  49. data/{lib → vendor/avm/lib}/avm/path_string.rb +0 -0
  50. data/vendor/avm/lib/avm/registry/base.rb +65 -0
  51. data/vendor/avm/lib/avm/registry.rb +29 -0
  52. data/vendor/avm/lib/avm/rspec/setup.rb +22 -0
  53. data/vendor/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb +11 -0
  54. data/vendor/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +14 -0
  55. data/vendor/avm/lib/avm/{app_src.rb → rspec.rb} +1 -1
  56. data/vendor/avm/lib/avm/runners/base.rb +31 -0
  57. data/vendor/avm/lib/avm/scms/base.rb +28 -0
  58. data/vendor/avm/lib/avm/scms/commit.rb +43 -0
  59. data/{lib → vendor/avm/lib}/avm/self/docker_image.rb +0 -0
  60. data/{lib → vendor/avm/lib}/avm/self/instance/entry_keys.rb +0 -0
  61. data/{lib → vendor/avm/lib}/avm/self/instance.rb +0 -0
  62. data/vendor/avm/lib/avm/source_stereotypes/base.rb +21 -0
  63. data/vendor/avm/lib/avm/{app_src → sources}/base.rb +25 -3
  64. data/vendor/avm/lib/avm/{app_src → sources}/configuration/_locale.rb +1 -1
  65. data/vendor/avm/lib/avm/{app_src → sources}/configuration/_rubocop.rb +1 -1
  66. data/vendor/avm/lib/avm/{app_src → sources}/configuration/_tests.rb +1 -1
  67. data/vendor/avm/lib/avm/{app_src → sources}/configuration.rb +1 -1
  68. data/vendor/avm/lib/avm/sources.rb +9 -0
  69. data/{lib → vendor/avm/lib}/avm/sync.rb +0 -0
  70. data/vendor/avm/lib/avm/version.rb +1 -1
  71. data/vendor/avm/spec/lib/avm/scms/base_spec.rb +7 -0
  72. data/vendor/avm/spec/lib/avm/source_stereotypes/base_spec.rb +7 -0
  73. data/vendor/{avm-apps → avm-eac_ruby_base1}/Gemfile +0 -0
  74. data/vendor/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +19 -0
  75. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb +7 -0
  76. data/{lib/avm/patches/class.rb → vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches.rb} +0 -0
  77. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/base.rb +25 -0
  78. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/update/sub_update.rb +56 -0
  79. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/update.rb +53 -0
  80. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes.rb +11 -0
  81. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +7 -0
  82. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb +9 -0
  83. data/vendor/avm-eac_ruby_base1/locale/en.yaml +8 -0
  84. data/vendor/avm-eac_ruby_base1/locale/pt-BR.yaml +8 -0
  85. data/vendor/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_stereotypes/base_spec.rb +7 -0
  86. data/vendor/{avm-apps → avm-eac_ruby_base1}/spec/rubocop_spec.rb +0 -0
  87. data/vendor/{avm-apps → avm-eac_ruby_base1}/spec/spec_helper.rb +0 -0
  88. data/vendor/avm-eac_ubuntu_base0/Gemfile +5 -0
  89. data/vendor/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec +20 -0
  90. data/{lib → vendor/avm-eac_ubuntu_base0/lib}/avm/eac_ubuntu_base0/apache/resource.rb +0 -0
  91. data/{lib → vendor/avm-eac_ubuntu_base0/lib}/avm/eac_ubuntu_base0/apache.rb +0 -0
  92. data/{lib → vendor/avm-eac_ubuntu_base0/lib}/avm/eac_ubuntu_base0/docker_image.rb +2 -1
  93. data/vendor/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances/base.rb +16 -0
  94. data/vendor/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances.rb +11 -0
  95. data/vendor/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/patches/object/template.rb +7 -0
  96. data/vendor/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base/docker.rb +19 -0
  97. data/vendor/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base.rb +24 -0
  98. data/vendor/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb +7 -0
  99. data/{lib → vendor/avm-eac_ubuntu_base0/lib}/avm/eac_ubuntu_base0.rb +2 -2
  100. data/vendor/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/docker_image_spec.rb +16 -0
  101. data/vendor/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base_spec.rb +7 -0
  102. data/vendor/avm-eac_ubuntu_base0/spec/rubocop_spec.rb +3 -0
  103. data/vendor/avm-eac_ubuntu_base0/spec/spec_helper.rb +4 -0
  104. data/{template → vendor/avm-eac_ubuntu_base0/template}/avm/eac_ubuntu_base0/docker_image/Dockerfile +0 -0
  105. data/vendor/avm-files/Gemfile +5 -0
  106. data/vendor/avm-files/avm-files.gemspec +21 -0
  107. data/vendor/{avm → avm-files}/lib/avm/files/appendable/file_content.rb +0 -0
  108. data/vendor/{avm → avm-files}/lib/avm/files/appendable/plain_directory.rb +0 -0
  109. data/vendor/{avm → avm-files}/lib/avm/files/appendable/resource_base.rb +0 -0
  110. data/vendor/{avm → avm-files}/lib/avm/files/appendable/tar_output_command.rb +0 -0
  111. data/vendor/{avm → avm-files}/lib/avm/files/appendable/templatized_directory.rb +0 -0
  112. data/vendor/{avm → avm-files}/lib/avm/files/appendable.rb +0 -0
  113. data/vendor/{avm → avm-files}/lib/avm/files/appender.rb +0 -0
  114. data/vendor/{avm → avm-files}/lib/avm/files/deploy.rb +0 -0
  115. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/base.rb +0 -0
  116. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/generic_plain.rb +0 -0
  117. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/html.rb +0 -0
  118. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/javascript.rb +0 -0
  119. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/json.rb +0 -0
  120. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/php.rb +0 -0
  121. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/python.rb +0 -0
  122. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/ruby.rb +0 -0
  123. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/xml.rb +0 -0
  124. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats.rb +0 -0
  125. data/vendor/{avm → avm-files}/lib/avm/files/formatter/utf8_assert.rb +0 -0
  126. data/vendor/{avm → avm-files}/lib/avm/files/formatter.rb +0 -0
  127. data/vendor/avm-files/lib/avm/files/version.rb +7 -0
  128. data/vendor/{avm-apps/lib/avm/apps.rb → avm-files/lib/avm/files.rb} +1 -1
  129. data/vendor/avm-files/spec/rubocop_spec.rb +3 -0
  130. data/vendor/avm-files/spec/spec_helper.rb +4 -0
  131. data/vendor/avm-git/Gemfile +5 -0
  132. data/vendor/avm-git/avm-git.gemspec +21 -0
  133. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/commit_info.rb +0 -0
  134. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/base.rb +0 -0
  135. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/last.rb +0 -0
  136. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/manual.rb +0 -0
  137. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/new.rb +0 -0
  138. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/nth.rb +0 -0
  139. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/unique.rb +0 -0
  140. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules.rb +0 -0
  141. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit_path/ruby.rb +0 -0
  142. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit_path.rb +0 -0
  143. data/vendor/{avm → avm-git}/lib/avm/git/commit/class_methods.rb +0 -0
  144. data/vendor/{avm → avm-git}/lib/avm/git/commit/deploy.rb +0 -0
  145. data/vendor/{avm → avm-git}/lib/avm/git/commit/deploy_methods.rb +0 -0
  146. data/vendor/{avm → avm-git}/lib/avm/git/commit/diff_tree_line.rb +0 -0
  147. data/vendor/{avm → avm-git}/lib/avm/git/commit/file.rb +0 -0
  148. data/vendor/{avm → avm-git}/lib/avm/git/commit.rb +0 -0
  149. data/vendor/{avm → avm-git}/lib/avm/git/file_auto_fixup.rb +0 -0
  150. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/commits.rb +0 -0
  151. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/git_subrepos.rb +0 -0
  152. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/local_branch.rb +0 -0
  153. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/local_tag.rb +0 -0
  154. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/push.rb +0 -0
  155. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/remote.rb +0 -0
  156. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/test.rb +2 -2
  157. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/tracker.rb +0 -0
  158. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/validation.rb +0 -0
  159. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/validations.rb +0 -0
  160. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/working_tree.rb +0 -0
  161. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete.rb +0 -0
  162. data/vendor/{avm → avm-git}/lib/avm/git/issue/deliver.rb +0 -0
  163. data/vendor/{avm → avm-git}/lib/avm/git/issue.rb +0 -0
  164. data/vendor/{avm → avm-git}/lib/avm/git/organize/reference_update.rb +0 -0
  165. data/vendor/{avm → avm-git}/lib/avm/git/organize/repository.rb +0 -0
  166. data/vendor/{avm → avm-git}/lib/avm/git/organize.rb +0 -0
  167. data/vendor/{avm → avm-git}/lib/avm/git/revision_test.rb +0 -0
  168. data/vendor/avm-git/lib/avm/git/scms/git/change_tracker.rb +35 -0
  169. data/vendor/avm-git/lib/avm/git/scms/git/commit.rb +55 -0
  170. data/vendor/avm-git/lib/avm/git/scms/git.rb +65 -0
  171. data/vendor/avm-git/lib/avm/git/scms/git_subrepo.rb +41 -0
  172. data/vendor/avm-git/lib/avm/git/scms/provider.rb +19 -0
  173. data/vendor/avm-git/lib/avm/git/scms.rb +11 -0
  174. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/parent.rb +0 -0
  175. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/remote.rb +0 -0
  176. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/show_result.rb +0 -0
  177. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check.rb +0 -0
  178. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_checks.rb +0 -0
  179. data/vendor/{avm-apps/lib/avm/apps → avm-git/lib/avm/git}/version.rb +2 -2
  180. data/vendor/{avm → avm-git}/lib/avm/git.rb +3 -2
  181. data/vendor/{avm → avm-git}/spec/lib/avm/git/auto_commit_path_spec.rb +0 -0
  182. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/deploy_spec.rb +0 -0
  183. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -0
  184. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +0 -0
  185. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +0 -0
  186. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +0 -0
  187. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +0 -0
  188. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +0 -0
  189. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +0 -0
  190. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +0 -0
  191. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +0 -0
  192. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -0
  193. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -0
  194. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit_spec.rb +0 -0
  195. data/vendor/avm-git/spec/lib/avm/git/scms/git_spec.rb +8 -0
  196. data/vendor/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +8 -0
  197. data/vendor/avm-git/spec/rubocop_spec.rb +3 -0
  198. data/vendor/avm-git/spec/spec_helper.rb +4 -0
  199. data/vendor/eac_cli/lib/eac_cli/config.rb +6 -3
  200. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  201. data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +8 -1
  202. data/vendor/eac_fs/lib/eac_fs/version.rb +1 -1
  203. data/vendor/eac_git/lib/eac_git/local/commit.rb +21 -2
  204. data/vendor/eac_git/lib/eac_git/local/log.rb +17 -0
  205. data/vendor/eac_git/lib/eac_git/local.rb +26 -0
  206. data/vendor/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +11 -0
  207. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  208. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +2 -2
  209. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +1 -1
  210. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  211. data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +1 -1
  212. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  213. data/vendor/eac_ruby_gems_utils/spec/support/mygem/Gemfile.lock +1 -1
  214. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +7 -0
  215. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +4 -0
  216. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +1 -1
  217. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +9 -0
  218. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +7 -0
  219. data/{lib/avm/patches/class/i18n.rb → vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb} +8 -7
  220. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +11 -0
  221. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +13 -0
  222. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +10 -10
  223. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  224. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +25 -0
  225. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +30 -0
  226. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +11 -0
  227. metadata +266 -136
  228. data/lib/avm/patches/object/fs_cache.rb +0 -16
  229. data/lib/avm/patches/object/i18n.rb +0 -9
  230. data/lib/avm/projects/stereotypes/git/update/subrepo.rb +0 -85
  231. data/lib/avm/projects/stereotypes/git/update.rb +0 -41
  232. data/lib/avm/projects/stereotypes/ruby_gem/update.rb +0 -66
  233. data/vendor/avm/lib/avm/files.rb +0 -9
  234. data/vendor/avm-apps/avm-apps.gemspec +0 -18
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/registry'
4
+
5
+ ::RSpec.shared_examples 'in_avm_registry' do |registry_method|
6
+ let(:avm_registry) { ::Avm::Registry.send(registry_method) }
7
+
8
+ it 'is in the avm registry' do
9
+ expect(avm_registry.registered_modules).to include(described_class)
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/registry'
4
+
5
+ ::RSpec.shared_examples 'not_in_avm_registry' do |registry_method = nil|
6
+ registry_method.if_present(::Avm::Registry.registries) { |v| [::Avm::Registry.send(v)] }
7
+ .each do |registry|
8
+ context "when registry is #{registry}" do
9
+ it 'is not in the avm registry' do
10
+ expect(registry.registered_modules).not_to include(described_class)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -3,7 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module Avm
6
- module AppSrc
6
+ module Rspec
7
7
  require_sub __FILE__
8
8
  end
9
9
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+
5
+ module Avm
6
+ module Runners
7
+ class Base
8
+ enable_abstract_methods
9
+
10
+ class << self
11
+ def command_argument
12
+ stereotype_name.underscore.dasherize
13
+ end
14
+
15
+ def stereotype_name
16
+ name.split('::')[-3]
17
+ end
18
+ end
19
+
20
+ delegate :command_argument, :stereotype_name, to: :class
21
+
22
+ runner_with :help, :subcommands do
23
+ subcommands
24
+ end
25
+
26
+ def to_s
27
+ stereotype_name
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Scms
7
+ class Base
8
+ enable_abstract_methods
9
+ abstract_methods :update, :valid?
10
+ common_constructor :path do
11
+ self.path = path.to_pathname
12
+ end
13
+
14
+ # @return [Avm::Scms::Commit,NilClass]
15
+ def commit_if_change(_message = nil)
16
+ raise_abstract_method __method__
17
+ end
18
+
19
+ def name
20
+ self.class.name.demodulize
21
+ end
22
+
23
+ def to_s
24
+ name
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Scms
7
+ class Commit
8
+ enable_abstract_methods
9
+
10
+ # @return [Array<Pathname>]
11
+ def changed_files
12
+ raise_abstract_method __method__
13
+ end
14
+
15
+ # @param other [Avm::Scms::Commit]
16
+ # @return [Avm::Scms::Commit]
17
+ def merge_with(_other)
18
+ raise_abstract_method __method__
19
+ end
20
+
21
+ # @return [Array<Pathname>]
22
+ def no_scm_changed_files
23
+ changed_files.reject { |path| scm_file?(path) }
24
+ end
25
+
26
+ # @param new_message [String]
27
+ def reword(_new_message)
28
+ raise_abstract_method __method__
29
+ end
30
+
31
+ # @return [Array<Pathname>]
32
+ def scm_changed_files
33
+ changed_files.select { |path| scm_file?(path) }
34
+ end
35
+
36
+ # @param path [Pathname]
37
+ # @return [TrueClass,FalseClass]
38
+ def scm_file?(_path)
39
+ raise_abstract_method __method__
40
+ end
41
+ end
42
+ end
43
+ end
File without changes
File without changes
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module SourceStereotypes
7
+ class Base
8
+ enable_abstract_methods
9
+ abstract_methods :valid?
10
+ common_constructor :source
11
+
12
+ def name
13
+ self.class.name
14
+ end
15
+
16
+ def to_s
17
+ name
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,11 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/registry'
3
4
  require 'eac_git'
4
5
  require 'eac_ruby_utils/core_ext'
5
6
 
6
7
  module Avm
7
- module AppSrc
8
+ module Sources
8
9
  class Base
10
+ require_sub __FILE__
9
11
  enable_simple_cache
10
12
  enable_listable
11
13
  lists.add_symbol :option, :parent
@@ -14,9 +16,10 @@ module Avm
14
16
  self.options = self.class.lists.option.hash_keys_validate!(options)
15
17
  end
16
18
 
19
+ delegate :locale, to: :configuration
17
20
  delegate :to_s, to: :path
18
21
 
19
- # @return [Avm::AppSrc::Base]
22
+ # @return [Avm::Sources::Base]
20
23
  def parent
21
24
  options[OPTION_PARENT]
22
25
  end
@@ -28,18 +31,37 @@ module Avm
28
31
  path.relative_path_from(parent.path)
29
32
  end
30
33
 
31
- # @return [Enumerable<Avm::AppSrc::Base>]
34
+ # @return [Enumerable<Avm::Sources::Base>]
32
35
  def subs
33
36
  git_repo.subrepos
34
37
  .map { |subrepo| self.class.new(subrepo.subpath.expand_path(path), parent: self) }
35
38
  end
36
39
 
40
+ def update
41
+ stereotype.update_source(self)
42
+ end
43
+
37
44
  private
38
45
 
46
+ # @return [Avm::Sources::Configuration]
47
+ def configuration_uncached
48
+ ::Avm::Sources::Configuration.find_in_path(path) || ::Avm::Sources::Configuration.new
49
+ end
50
+
39
51
  # @return [EacGit::Local]
40
52
  def git_repo_uncached
41
53
  ::EacGit::Local.new(path)
42
54
  end
55
+
56
+ # @return [Avm::Scms::Base]
57
+ def scm_uncached
58
+ ::Avm::Registry.scms.detect(path)
59
+ end
60
+
61
+ # @return [Avm::SourceStereotypes::Base]
62
+ def stereotype_uncached
63
+ ::Avm::Registry.source_stereotypes.detect(self)
64
+ end
43
65
  end
44
66
  end
45
67
  end
@@ -4,7 +4,7 @@ require 'avm/patches/eac_ruby_gems_utils/gem'
4
4
  require 'i18n'
5
5
 
6
6
  module Avm
7
- module AppSrc
7
+ module Sources
8
8
  class Configuration < ::EacConfig::OldConfigs
9
9
  LOCALE_KEY = :locale
10
10
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- module AppSrc
4
+ module Sources
5
5
  class Configuration < ::EacConfig::OldConfigs
6
6
  RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
7
7
  RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
@@ -3,7 +3,7 @@
3
3
  require 'avm/patches/eac_ruby_gems_utils/gem'
4
4
 
5
5
  module Avm
6
- module AppSrc
6
+ module Sources
7
7
  class Configuration < ::EacConfig::OldConfigs
8
8
  BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
9
9
  TEST_COMMAND_KEY = 'test.command'
@@ -5,7 +5,7 @@ require 'eac_ruby_utils/core_ext'
5
5
  require 'yaml'
6
6
 
7
7
  module Avm
8
- module AppSrc
8
+ module Sources
9
9
  class Configuration < ::EacConfig::OldConfigs
10
10
  require_sub __FILE__
11
11
 
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Sources
7
+ require_sub __FILE__
8
+ end
9
+ end
File without changes
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.4.0'
4
+ VERSION = '0.7.0'
5
5
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/scms/base'
4
+
5
+ ::RSpec.describe ::Avm::Scms::Base do
6
+ include_examples 'not_in_avm_registry'
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/source_stereotypes/base'
4
+
5
+ ::RSpec.describe ::Avm::SourceStereotypes::Base do
6
+ include_examples 'not_in_avm_registry'
7
+ end
File without changes
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ require 'avm/eac_ruby_base1/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'avm-eac_ruby_base1'
9
+ s.version = Avm::EacRubyBase1::VERSION
10
+ s.authors = ['Put here the authors']
11
+ s.summary = 'Put here de description.'
12
+
13
+ s.files = Dir['{lib}/**/*']
14
+
15
+ s.add_dependency 'avm', '~> 0.6'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.76'
17
+
18
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
19
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'i18n'
5
+
6
+ ::I18n.load_path += __dir__.to_pathname.expand_path.parent_n(4).join('locale').glob('*.yaml')
7
+ .map(&:to_path)
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/source_stereotypes/base'
4
+ require 'avm/eac_ruby_base1/source_stereotypes/update'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacRubyBase1
9
+ module SourceStereotypes
10
+ class Base < ::Avm::SourceStereotypes::Base
11
+ def gemfile_path
12
+ source.path.join('Gemfile')
13
+ end
14
+
15
+ def valid?
16
+ gemfile_path.exist? || gemspec_file.exist?
17
+ end
18
+
19
+ def update_source(source)
20
+ ::Avm::EacRubyBase1::SourceStereotypes::Update.new(source)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module EacRubyBase1
5
+ module SourceStereotypes
6
+ class Update
7
+ class SubUpdate
8
+ enable_simple_cache
9
+ enable_speaker
10
+ common_constructor :source_update, :sub do
11
+ perform
12
+ end
13
+ delegate :source, to: :source_update
14
+
15
+ protected
16
+
17
+ def on_scm_updated(commit)
18
+ if commit.no_scm_changed_files.any?
19
+ commit = commit.reword(no_scm_update_commit_message)
20
+ source.scm.commit_if_change { source_update.bundle_update }
21
+ .if_present { |v| v.merge_with(commit) }
22
+ else
23
+ commit.reword(scm_update_commit_message)
24
+ end
25
+ end
26
+
27
+ def perform
28
+ update_scm.if_present { |commit| on_scm_updated(commit) }
29
+ end
30
+
31
+ def ruby_gem_uncached
32
+ ::EacRubyGemsUtils::Gem.new(sub.path)
33
+ end
34
+
35
+ def no_scm_update_commit_message
36
+ source_update.i18n_translate(__method__, __locale: source.locale,
37
+ name: ruby_gem.name,
38
+ version: ruby_gem.version)
39
+ end
40
+
41
+ def scm_update_commit_message
42
+ source_update.i18n_translate(__method__, __locale: source.locale)
43
+ end
44
+
45
+ # @return [Avm::Scms::Commit]
46
+ def update_scm
47
+ infom "Updating \"#{sub}\"..."
48
+ source.scm.commit_if_change do
49
+ sub.scm.update
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ruby_base1/patches/i18n'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRubyBase1
8
+ module SourceStereotypes
9
+ class Update
10
+ require_sub __FILE__
11
+ enable_simple_cache
12
+ enable_speaker
13
+ common_constructor :source do
14
+ perform
15
+ end
16
+
17
+ def bundle_update
18
+ infom 'Running "bundle update"...'
19
+ ruby_gem.bundle('update').execute!
20
+ infom 'Running "bundle install"...'
21
+ ruby_gem.bundle('install').execute!
22
+ end
23
+
24
+ protected
25
+
26
+ def perform
27
+ update_gemfile_lock
28
+ update_subs
29
+ end
30
+
31
+ def update_gemfile_lock
32
+ source.scm.commit_if_change(-> { update_gemfile_lock_commit_message }) do
33
+ bundle_update
34
+ end
35
+ end
36
+
37
+ def update_gemfile_lock_commit_message
38
+ i18n_translate(__method__, __locale: source.locale)
39
+ end
40
+
41
+ def update_subs
42
+ source.subs.each do |sub|
43
+ ::Avm::EacRubyBase1::SourceStereotypes::Update::SubUpdate.new(self, sub)
44
+ end
45
+ end
46
+
47
+ def ruby_gem_uncached
48
+ ::EacRubyGemsUtils::Gem.new(source.path)
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module SourceStereotypes
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module EacRubyBase1
5
+ VERSION = '0.1.0'
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ require_sub __FILE__
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ en:
2
+ avm:
3
+ eac_ruby_base1:
4
+ source_stereotypes:
5
+ update:
6
+ no_scm_update_commit_message: "Gem \"%{name}\" (Local): update to '%{version}'."
7
+ scm_update_commit_message: '**/.gitrepo: fix/update.'
8
+ update_gemfile_lock_commit_message: 'All gems: update.'
@@ -0,0 +1,8 @@
1
+ pt-BR:
2
+ avm:
3
+ eac_ruby_base1:
4
+ source_stereotypes:
5
+ update:
6
+ no_scm_update_commit_message: "Gem \"%{name}\" (Local): atualiza para '%{version}'."
7
+ scm_update_commit_message: '**/.gitrepo: conserta/atualiza.'
8
+ update_gemfile_lock_commit_message: 'Todas as gems: atualiza.'
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ruby_base1/source_stereotypes/base'
4
+
5
+ ::RSpec.describe ::Avm::EacRubyBase1::SourceStereotypes::Base do
6
+ include_examples 'in_avm_registry', 'source_stereotypes'
7
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ require 'avm/eac_ubuntu_base0/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'avm-eac_ubuntu_base0'
9
+ s.version = Avm::EacUbuntuBase0::VERSION
10
+ s.authors = ['Put here the authors']
11
+ s.summary = 'Put here de description.'
12
+
13
+ s.files = Dir['{lib,template}/**/*']
14
+
15
+ s.add_dependency 'avm', '~> 0.7'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.77', '>= 0.77.1'
17
+ s.add_dependency 'eac_templates', '~> 0.2'
18
+
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
20
+ end
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/core_ext'
4
3
  require 'avm/docker/image'
4
+ require 'avm/eac_ubuntu_base0/patches/object/template'
5
+ require 'eac_ruby_utils/core_ext'
5
6
 
6
7
  module Avm
7
8
  module EacUbuntuBase0
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ubuntu_base0/docker_image'
4
+ require 'avm/instances/base'
5
+
6
+ module Avm
7
+ module EacUbuntuBase0
8
+ module Instances
9
+ class Base < ::Avm::Instances::Base
10
+ def docker_image_class
11
+ ::Avm::EacUbuntuBase0::DockerImage
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacUbuntuBase0
7
+ module Instances
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'eac_templates/patches/object/template'
5
+
6
+ ::EacTemplates::Searcher.default.included_paths <<
7
+ __dir__.to_pathname.expand_path.parent_n(5).join('template')
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/docker/runner'
4
+ require 'avm/runners/base'
5
+ require 'eac_ruby_utils/struct'
6
+
7
+ module Avm
8
+ module EacUbuntuBase0
9
+ module Runners
10
+ class Base < ::Avm::Runners::Base
11
+ class Docker < ::Avm::Docker::Runner
12
+ def use_default_registry?
13
+ true
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end