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,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/registry'
4
+ require 'avm/git/scms/git'
5
+
6
+ ::RSpec.describe ::Avm::Git::Scms::Git do
7
+ include_examples 'in_avm_registry', 'scms'
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/registry'
4
+ require 'avm/git/scms/git_subrepo'
5
+
6
+ ::RSpec.describe ::Avm::Git::Scms::GitSubrepo do
7
+ include_examples 'in_avm_registry', 'scms'
8
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -3,16 +3,19 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module EacCli
6
- class Config
6
+ class Config < ::SimpleDelegator
7
7
  require_sub __FILE__
8
- attr_reader :sub
9
8
 
10
9
  def initialize(sub_node)
11
- @sub = sub_node
10
+ super(sub_node)
12
11
  end
13
12
 
14
13
  def entry(path, options = {})
15
14
  ::EacCli::Config::Entry.new(self, path, options)
16
15
  end
16
+
17
+ def sub
18
+ __getobj__
19
+ end
17
20
  end
18
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.23.0'
4
+ VERSION = '0.23.1'
5
5
  end
@@ -5,6 +5,13 @@ require 'eac_fs/patches/module/fs_cache'
5
5
  class Object
6
6
  # @return [EacFs::Cache]
7
7
  def fs_cache
8
- self.class.fs_cache
8
+ oid = fs_cache_object_id
9
+ oid = [oid.to_s] unless oid.is_a?(::Enumerable)
10
+ oid.inject(self.class.fs_cache) { |a, e| a.child(e.to_s) }
11
+ end
12
+
13
+ # @return [String, Array<String>]
14
+ def fs_cache_object_id
15
+ raise 'Abstract method hit'
9
16
  end
10
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacFs
4
- VERSION = '0.4.0'
4
+ VERSION = '0.6.0'
5
5
  end
@@ -7,17 +7,23 @@ module EacGit
7
7
  class Commit
8
8
  require_sub __FILE__, include_modules: true
9
9
  enable_simple_cache
10
+ include ::Comparable
10
11
 
11
12
  FIELDS = {
12
13
  author_name: '%an', author_email: '%ae', author_date: '%ai',
13
14
  subject: '%s',
14
15
  author_all: '%an <%ae>, %ai',
15
16
  commiter_name: '%cn', commiter_email: '%ce', commiter_date: '%ci',
16
- commiter_all: '%cn <%ce>, %ci'
17
+ commiter_all: '%cn <%ce>, %ci',
18
+ raw_body: '%B'
17
19
  }.freeze
18
20
 
19
21
  common_constructor :repo, :id
20
22
 
23
+ def <=>(other)
24
+ [repo, id] <=> [other.repo, other.id]
25
+ end
26
+
21
27
  def format(format)
22
28
  repo.command('--no-pager', 'log', '-1', "--pretty=format:#{format}", id).execute!.strip
23
29
  end
@@ -36,8 +42,21 @@ module EacGit
36
42
  changed_files.inject(0) { |a, e| a + e.dst_size }
37
43
  end
38
44
 
45
+ # @return [EacGit::Local::Commit, nil]
46
+ def parent
47
+ ps = parents
48
+ raise "#{self} has more than one parent" if ps.count > 2
49
+
50
+ ps.empty? ? nil : ps.first
51
+ end
52
+
53
+ # @return [Array<EacGit::Local::Commit>]
54
+ def parents
55
+ format('%P').each_line.map { |line| repo.commitize(line) }
56
+ end
57
+
39
58
  def root_child?
40
- format('%P').blank?
59
+ parents.empty?
41
60
  end
42
61
 
43
62
  private
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_git/remote'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module EacGit
7
+ class Local
8
+ module Log
9
+ def log(until_commit = nil, from_commit = nil)
10
+ until_commit, from_commit = [until_commit, from_commit].map { |c| commitize(c) }
11
+ from_commit ||= head
12
+ command('log', '--format=%H', "#{until_commit.id}..#{from_commit.id}")
13
+ .execute!.each_line.map { |line| commitize(line.strip) }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -7,17 +7,43 @@ module EacGit
7
7
  # A Git repository in local filesystem.
8
8
  class Local
9
9
  require_sub __FILE__, include_modules: true
10
+ include ::Comparable
10
11
 
11
12
  HEAD_REFERENCE = 'HEAD'
12
13
 
14
+ class << self
15
+ def find(path)
16
+ path = path.to_pathname.expand_path
17
+ if path.join('.git').exist?
18
+ new(path)
19
+ elsif path.to_path != '/'
20
+ find(path.parent)
21
+ end
22
+ end
23
+ end
24
+
13
25
  common_constructor :root_path do
14
26
  self.root_path = root_path.to_pathname
15
27
  end
16
28
 
29
+ def <=>(other)
30
+ root_path <=> other.root_path
31
+ end
32
+
17
33
  def commit(ref, required = false)
18
34
  rev_parse(ref, required).if_present { |v| ::EacGit::Local::Commit.new(self, v) }
19
35
  end
20
36
 
37
+ def commitize(source)
38
+ if source.is_a?(::EacGit::Local::Commit)
39
+ return source if source.repo == self
40
+
41
+ source = source.id
42
+ end
43
+
44
+ source.to_s.strip.if_present(nil) { |v| ::EacGit::Local::Commit.new(self, v) }
45
+ end
46
+
21
47
  def descendant?(descendant, ancestor)
22
48
  base = merge_base(descendant, ancestor)
23
49
  return false if base.blank?
@@ -3,6 +3,7 @@
3
3
  require 'eac_git/local'
4
4
  require 'eac_ruby_utils/envs'
5
5
  require 'fileutils'
6
+ require 'securerandom'
6
7
  require 'tmpdir'
7
8
 
8
9
  module EacGit
@@ -29,6 +30,16 @@ module EacGit
29
30
  def file(*subpath)
30
31
  StubbedGitRepositoryFile.new(self, subpath)
31
32
  end
33
+
34
+ # @return [EacGit::Local::Commit
35
+ def random_commit
36
+ content = ::SecureRandom.hex
37
+ file = "#{content}.txt"
38
+ file(file).write(content)
39
+ command('add', file).execute!
40
+ command('commit', '-m', "Random commit: #{file}.").execute!
41
+ head
42
+ end
32
43
  end
33
44
 
34
45
  class StubbedGitRepositoryFile
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.0'
5
5
  end
@@ -43,8 +43,8 @@ module EacRubyBase0
43
43
  delegate "#{item}_xdg_env", "#{item}_dir", to: :app_xdg
44
44
  end
45
45
 
46
- def fs_cache
47
- @fs_cache ||= ::EacFs::Cache.new(
46
+ def self_fs_cache
47
+ @self_fs_cache ||= ::EacFs::Cache.new(
48
48
  cache_dir.join(::EacFs::Cache.name.parameterize)
49
49
  )
50
50
  end
@@ -40,7 +40,7 @@ module EacRubyBase0
40
40
  def on_context
41
41
  ::EacRubyUtils::Speaker.context.on(build_speaker) do
42
42
  ::EacConfig::Node.context.on(runner_context.call(:application).build_config) do
43
- ::EacFs::Cache.context.on(application.fs_cache) do
43
+ ::EacFs::Cache.context.on(application.self_fs_cache) do
44
44
  yield
45
45
  end
46
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.files = Dir['{lib}/**/*', 'Gemfile']
23
23
  s.test_files = Dir['{spec}/**/*', '.rspec']
24
24
 
25
- s.add_dependency 'bundler', '~> 2.2', '>= 2.2.17'
25
+ s.add_dependency 'bundler', '~> 2.2', '>= 2.2.25'
26
26
  s.add_dependency 'eac_ruby_utils', '~> 0.70'
27
27
 
28
28
  # Tests
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyGemsUtils
4
- VERSION = '0.9.6'
4
+ VERSION = '0.9.7'
5
5
  end
@@ -16,4 +16,4 @@ DEPENDENCIES
16
16
  mygem!
17
17
 
18
18
  BUNDLED WITH
19
- 1.17.3
19
+ 2.2.25
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/patches/class/self_included_modules'
3
4
  require 'eac_ruby_utils/patches/module/common_concern'
4
5
 
5
6
  module EacRubyUtils
@@ -27,6 +28,12 @@ module EacRubyUtils
27
28
  module AbstractMethods
28
29
  common_concern
29
30
 
31
+ class << self
32
+ def abstract?(a_class)
33
+ a_class.self_included_modules.include?(::EacRubyUtils::AbstractMethods)
34
+ end
35
+ end
36
+
30
37
  module ClassMethods
31
38
  def abstract_methods(*methods_names)
32
39
  methods_names.each do |method_name|
@@ -57,6 +57,10 @@ module EacRubyUtils
57
57
  gemspec.name.gsub('-', '/') + '/' + registry.module_suffix.underscore
58
58
  end
59
59
 
60
+ def to_s
61
+ "#{self.class.name}[#{gemspec.name}]"
62
+ end
63
+
60
64
  private
61
65
 
62
66
  def dependencies_uncached
@@ -21,7 +21,7 @@ module EacRubyUtils
21
21
 
22
22
  # @return [Array<EacRubyUtils::GemsRegistry::Gem>]
23
23
  def registered
24
- @registered ||= all_gems.select(&:found?)
24
+ @registered ||= all_gems.select(&:found?).sort
25
25
  end
26
26
 
27
27
  private
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/abstract_methods'
4
+
5
+ class Class
6
+ def abstract?
7
+ ::EacRubyUtils::AbstractMethods.abstract?(self)
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Class
4
+ def self_included_modules
5
+ ancestors.take_while { |a| a != superclass }.select { |ancestor| ancestor.instance_of?(Module) }
6
+ end
7
+ end
@@ -1,21 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/patches/i18n'
3
+ require 'active_support/core_ext/string/inflections'
4
+ require 'i18n'
4
5
 
5
- class Class
6
+ class Module
6
7
  TRANSLATE_LOCALE_KEY = :__locale
7
8
 
8
- def translate(entry_suffix, values = {})
9
+ def i18n_translate(entry_suffix, values = {})
9
10
  on_i18n_locale(values.delete(TRANSLATE_LOCALE_KEY)) do
10
- ::I18n.translate(translate_entry_full(entry_suffix), values)
11
+ ::I18n.translate(i18n_translate_entry_full(entry_suffix), values)
11
12
  end
12
13
  end
13
14
 
14
- def translate_entry_full(entry_suffix)
15
- "#{translate_entry_self_prefix}.#{entry_suffix}"
15
+ def i18n_translate_entry_full(entry_suffix)
16
+ "#{i18n_translate_entry_self_prefix}.#{entry_suffix}"
16
17
  end
17
18
 
18
- def translate_entry_self_prefix
19
+ def i18n_translate_entry_self_prefix
19
20
  name.underscore.gsub('/', '.')
20
21
  end
21
22
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/compact'
4
+
5
+ class Object
6
+ # If +self+ is a Proc, return the value of +.call+. If not, return +self+.
7
+ # @return [Object]
8
+ def call_if_proc
9
+ is_a?(::Proc) ? call : self
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/patches/module/i18n_translate'
4
+
5
+ class Object
6
+ def i18n_translate(entry_suffix, values = {})
7
+ self.class.i18n_translate(entry_suffix, values)
8
+ end
9
+
10
+ def on_i18n_locale(locale)
11
+ self.class.on_i18n_locale(locale)
12
+ end
13
+ end
@@ -8,7 +8,7 @@ module EacRubyUtils
8
8
  extend ::EacRubyUtils::AbstractMethods
9
9
 
10
10
  def error(_string)
11
- raise_abstract_method(__FILE__)
11
+ raise_abstract_method(__method__)
12
12
  end
13
13
 
14
14
  def fatal_error(string)
@@ -18,39 +18,39 @@ module EacRubyUtils
18
18
 
19
19
  # @see EacRubyUtils::Speaker::Sender.input
20
20
  def input(_question, _options = {})
21
- raise_abstract_method(__FILE__)
21
+ raise_abstract_method(__method__)
22
22
  end
23
23
 
24
24
  def info(_string)
25
- raise_abstract_method(__FILE__)
25
+ raise_abstract_method(__method__)
26
26
  end
27
27
 
28
28
  def infom(_string)
29
- raise_abstract_method(__FILE__)
29
+ raise_abstract_method(__method__)
30
30
  end
31
31
 
32
32
  def infov(*_args)
33
- raise_abstract_method(__FILE__)
33
+ raise_abstract_method(__method__)
34
34
  end
35
35
 
36
36
  def out(_string = '')
37
- raise_abstract_method(__FILE__)
37
+ raise_abstract_method(__method__)
38
38
  end
39
39
 
40
40
  def puts(_string = '')
41
- raise_abstract_method(__FILE__)
41
+ raise_abstract_method(__method__)
42
42
  end
43
43
 
44
44
  def success(_string)
45
- raise_abstract_method(__FILE__)
45
+ raise_abstract_method(__method__)
46
46
  end
47
47
 
48
48
  def title(_string)
49
- raise_abstract_method(__FILE__)
49
+ raise_abstract_method(__method__)
50
50
  end
51
51
 
52
52
  def warn(_string)
53
- raise_abstract_method(__FILE__)
53
+ raise_abstract_method(__method__)
54
54
  end
55
55
  end
56
56
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.76.0'
4
+ VERSION = '0.77.1'
5
5
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/patches/class/abstract'
4
+
5
+ RSpec.describe ::Class do
6
+ let(:abstract_class) do
7
+ described_class.new do
8
+ enable_abstract_methods
9
+ end
10
+ end
11
+
12
+ let(:concrect_class) do
13
+ described_class.new(abstract_class)
14
+ end
15
+
16
+ describe '#abstract' do
17
+ it do
18
+ expect(abstract_class).to be_abstract
19
+ end
20
+
21
+ it do
22
+ expect(concrect_class).not_to be_abstract
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/patches/class/self_included_modules'
4
+
5
+ RSpec.describe ::Class do
6
+ let(:includeable_module) do
7
+ ::Module.new
8
+ end
9
+
10
+ let(:parent_class) do
11
+ module_to_include = includeable_module
12
+ described_class.new do
13
+ include module_to_include
14
+ end
15
+ end
16
+
17
+ let(:child_class) do
18
+ described_class.new(parent_class)
19
+ end
20
+
21
+ describe '#self_included_modules' do
22
+ it do
23
+ expect(parent_class.self_included_modules).to include(includeable_module)
24
+ end
25
+
26
+ it do
27
+ expect(child_class.self_included_modules).not_to include(includeable_module)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/patches/object/call_if_proc'
4
+
5
+ RSpec.describe ::Object do
6
+ describe '#call_if_proc' do
7
+ it { expect(nil.call_if_proc).to eq(nil) }
8
+ it { expect('a string'.call_if_proc).to eq('a string') }
9
+ it { expect(-> { 'a returned value' }.call_if_proc).to eq('a returned value') }
10
+ end
11
+ end