avm-tools 0.105.0 → 0.109.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/instances/entry.rb +3 -3
  3. data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +2 -2
  4. data/lib/avm/ruby/rubocop/_configured.rb +2 -2
  5. data/lib/avm/tools/app_src.rb +68 -0
  6. data/lib/avm/tools/runner/app_src/info.rb +26 -2
  7. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +62 -0
  8. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb +11 -41
  9. data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +2 -4
  10. data/lib/avm/tools/runner/app_src/update.rb +2 -2
  11. data/lib/avm/tools/runner/app_src.rb +6 -2
  12. data/lib/avm/tools/runner/config/load_path.rb +10 -5
  13. data/lib/avm/tools/runner/git/deploy.rb +2 -2
  14. data/lib/avm/tools/runner/self/registry.rb +25 -0
  15. data/lib/avm/tools/runner.rb +0 -4
  16. data/lib/avm/tools/version.rb +1 -1
  17. data/template/avm/ruby/gems/generator/static/spec/rubocop_spec.rb +1 -1
  18. data/template/avm/ruby/gems/generator/static/spec/spec_helper.rb +2 -100
  19. data/vendor/avm/avm.gemspec +4 -1
  20. data/{lib → vendor/avm/lib}/avm/data/instance/files_unit.rb +0 -0
  21. data/{lib → vendor/avm/lib}/avm/data/instance/package.rb +0 -0
  22. data/{lib → vendor/avm/lib}/avm/data/instance/unit.rb +0 -0
  23. data/{lib → vendor/avm/lib}/avm/data/instance.rb +0 -0
  24. data/{lib → vendor/avm/lib}/avm/data/package/dump.rb +0 -0
  25. data/{lib → vendor/avm/lib}/avm/data/package/load.rb +0 -0
  26. data/{lib → vendor/avm/lib}/avm/data/package.rb +0 -0
  27. data/{lib → vendor/avm/lib}/avm/data/unit.rb +0 -0
  28. data/vendor/avm/lib/avm/jobs/base.rb +62 -0
  29. data/vendor/avm/lib/avm/jobs/variables_source.rb +22 -0
  30. data/vendor/{avm-apps/lib/avm/apps.rb → avm/lib/avm/jobs.rb} +1 -1
  31. data/{lib → vendor/avm/lib}/avm/path_string.rb +0 -0
  32. data/vendor/avm/lib/avm/registry/base.rb +65 -0
  33. data/vendor/avm/lib/avm/registry.rb +29 -0
  34. data/vendor/avm/lib/avm/rspec/setup.rb +22 -0
  35. data/vendor/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb +11 -0
  36. data/vendor/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +14 -0
  37. data/vendor/avm/lib/avm/rspec.rb +9 -0
  38. data/vendor/avm/lib/avm/scms/base.rb +28 -0
  39. data/vendor/avm/lib/avm/scms/commit.rb +43 -0
  40. data/vendor/avm/lib/avm/source_stereotypes/base.rb +21 -0
  41. data/vendor/avm/lib/avm/sources/base.rb +67 -0
  42. data/vendor/avm/lib/avm/sources/configuration/_locale.rb +16 -0
  43. data/vendor/avm/lib/avm/sources/configuration/_rubocop.rb +24 -0
  44. data/vendor/avm/lib/avm/sources/configuration/_tests.rb +27 -0
  45. data/vendor/avm/lib/avm/sources/configuration.rb +55 -0
  46. data/vendor/avm/lib/avm/sources.rb +9 -0
  47. data/{lib → vendor/avm/lib}/avm/sync.rb +0 -0
  48. data/vendor/avm/lib/avm/version.rb +1 -1
  49. data/vendor/avm/spec/lib/avm/scms/base_spec.rb +7 -0
  50. data/vendor/avm/spec/lib/avm/source_stereotypes/base_spec.rb +7 -0
  51. data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -0
  52. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -2
  53. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  54. data/vendor/{avm-apps → avm-eac_ruby_base1}/Gemfile +0 -0
  55. data/vendor/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +19 -0
  56. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb +7 -0
  57. data/{lib/avm/patches/class.rb → vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches.rb} +0 -0
  58. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/base.rb +25 -0
  59. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/update/sub_update.rb +56 -0
  60. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/update.rb +53 -0
  61. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes.rb +11 -0
  62. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +7 -0
  63. data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb +9 -0
  64. data/vendor/avm-eac_ruby_base1/locale/en.yaml +8 -0
  65. data/vendor/avm-eac_ruby_base1/locale/pt-BR.yaml +8 -0
  66. data/vendor/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_stereotypes/base_spec.rb +7 -0
  67. data/vendor/{avm-apps → avm-eac_ruby_base1}/spec/rubocop_spec.rb +0 -0
  68. data/vendor/{avm-apps → avm-eac_ruby_base1}/spec/spec_helper.rb +0 -0
  69. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +2 -2
  70. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +2 -2
  71. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +2 -2
  72. data/vendor/avm-files/Gemfile +5 -0
  73. data/vendor/avm-files/avm-files.gemspec +21 -0
  74. data/vendor/{avm → avm-files}/lib/avm/files/appendable/file_content.rb +0 -0
  75. data/vendor/{avm → avm-files}/lib/avm/files/appendable/plain_directory.rb +0 -0
  76. data/vendor/{avm → avm-files}/lib/avm/files/appendable/resource_base.rb +0 -0
  77. data/vendor/{avm → avm-files}/lib/avm/files/appendable/tar_output_command.rb +0 -0
  78. data/vendor/{avm → avm-files}/lib/avm/files/appendable/templatized_directory.rb +0 -0
  79. data/vendor/{avm → avm-files}/lib/avm/files/appendable.rb +0 -0
  80. data/vendor/{avm → avm-files}/lib/avm/files/appender.rb +0 -0
  81. data/vendor/{avm → avm-files}/lib/avm/files/deploy.rb +0 -0
  82. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/base.rb +2 -2
  83. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/generic_plain.rb +0 -0
  84. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/html.rb +0 -0
  85. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/javascript.rb +1 -0
  86. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/json.rb +0 -0
  87. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/php.rb +1 -0
  88. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/python.rb +1 -0
  89. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/ruby.rb +0 -0
  90. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/xml.rb +1 -0
  91. data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats.rb +0 -0
  92. data/vendor/{avm → avm-files}/lib/avm/files/formatter/utf8_assert.rb +3 -1
  93. data/vendor/{avm → avm-files}/lib/avm/files/formatter.rb +0 -0
  94. data/vendor/{avm → avm-files}/lib/avm/files/rotate.rb +0 -0
  95. data/vendor/avm-files/lib/avm/files/version.rb +7 -0
  96. data/vendor/avm-files/lib/avm/files.rb +9 -0
  97. data/vendor/avm-files/spec/rubocop_spec.rb +3 -0
  98. data/vendor/avm-files/spec/spec_helper.rb +4 -0
  99. data/vendor/avm-git/Gemfile +5 -0
  100. data/vendor/avm-git/avm-git.gemspec +21 -0
  101. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/commit_info.rb +0 -0
  102. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/base.rb +0 -0
  103. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/last.rb +0 -0
  104. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/manual.rb +0 -0
  105. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/new.rb +0 -0
  106. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/nth.rb +0 -0
  107. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/unique.rb +0 -0
  108. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules.rb +0 -0
  109. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit_path/ruby.rb +0 -0
  110. data/vendor/{avm → avm-git}/lib/avm/git/auto_commit_path.rb +0 -0
  111. data/vendor/{avm → avm-git}/lib/avm/git/commit/class_methods.rb +0 -0
  112. data/vendor/{avm → avm-git}/lib/avm/git/commit/deploy.rb +0 -0
  113. data/vendor/{avm → avm-git}/lib/avm/git/commit/deploy_methods.rb +0 -0
  114. data/vendor/{avm → avm-git}/lib/avm/git/commit/diff_tree_line.rb +0 -0
  115. data/vendor/{avm → avm-git}/lib/avm/git/commit/file.rb +0 -0
  116. data/vendor/{avm → avm-git}/lib/avm/git/commit.rb +0 -0
  117. data/vendor/{avm → avm-git}/lib/avm/git/file_auto_fixup.rb +0 -0
  118. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/commits.rb +0 -0
  119. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/git_subrepos.rb +0 -0
  120. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/local_branch.rb +0 -0
  121. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/local_tag.rb +0 -0
  122. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/push.rb +0 -0
  123. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/remote.rb +0 -0
  124. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/test.rb +2 -2
  125. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/tracker.rb +0 -0
  126. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/validation.rb +0 -0
  127. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/validations.rb +0 -0
  128. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/working_tree.rb +0 -0
  129. data/vendor/{avm → avm-git}/lib/avm/git/issue/complete.rb +0 -0
  130. data/vendor/{avm → avm-git}/lib/avm/git/issue/deliver.rb +0 -0
  131. data/vendor/{avm → avm-git}/lib/avm/git/issue.rb +0 -0
  132. data/vendor/{avm → avm-git}/lib/avm/git/organize/reference_update.rb +0 -0
  133. data/vendor/{avm → avm-git}/lib/avm/git/organize/repository.rb +0 -0
  134. data/vendor/{avm → avm-git}/lib/avm/git/organize.rb +0 -0
  135. data/vendor/{avm → avm-git}/lib/avm/git/revision_test.rb +2 -3
  136. data/vendor/avm-git/lib/avm/git/scms/git/change_tracker.rb +35 -0
  137. data/vendor/avm-git/lib/avm/git/scms/git/commit.rb +55 -0
  138. data/vendor/avm-git/lib/avm/git/scms/git.rb +65 -0
  139. data/vendor/avm-git/lib/avm/git/scms/git_subrepo.rb +41 -0
  140. data/vendor/avm-git/lib/avm/git/scms/provider.rb +19 -0
  141. data/vendor/{avm-apps/lib/avm/apps/jobs.rb → avm-git/lib/avm/git/scms.rb} +2 -2
  142. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/parent.rb +0 -0
  143. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/remote.rb +0 -0
  144. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/show_result.rb +0 -0
  145. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check.rb +0 -0
  146. data/vendor/{avm → avm-git}/lib/avm/git/subrepo_checks.rb +0 -0
  147. data/vendor/{avm-apps/lib/avm/apps → avm-git/lib/avm/git}/version.rb +2 -2
  148. data/vendor/{avm → avm-git}/lib/avm/git.rb +3 -2
  149. data/vendor/{avm → avm-git}/spec/lib/avm/git/auto_commit_path_spec.rb +4 -3
  150. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/deploy_spec.rb +0 -0
  151. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -0
  152. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +0 -0
  153. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +0 -0
  154. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +0 -0
  155. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +0 -0
  156. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +0 -0
  157. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +0 -0
  158. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +0 -0
  159. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +0 -0
  160. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -0
  161. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -0
  162. data/vendor/{avm → avm-git}/spec/lib/avm/git/commit_spec.rb +0 -0
  163. data/vendor/avm-git/spec/lib/avm/git/scms/git_spec.rb +8 -0
  164. data/vendor/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +8 -0
  165. data/vendor/avm-git/spec/rubocop_spec.rb +3 -0
  166. data/vendor/avm-git/spec/spec_helper.rb +4 -0
  167. data/vendor/eac_cli/lib/eac_cli/config.rb +6 -3
  168. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
  169. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
  170. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
  171. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
  172. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  173. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
  174. data/vendor/eac_fs/Gemfile +5 -0
  175. data/vendor/eac_fs/eac_fs.gemspec +20 -0
  176. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb → eac_fs/lib/eac_fs/cache.rb} +7 -2
  177. data/{lib/avm → vendor/eac_fs/lib/eac_fs}/cached_download.rb +4 -4
  178. data/vendor/eac_fs/lib/eac_fs/file_info.rb +29 -0
  179. data/vendor/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +10 -0
  180. data/vendor/eac_fs/lib/eac_fs/patches/module.rb +4 -0
  181. data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +15 -0
  182. data/vendor/eac_fs/lib/eac_fs/patches/object.rb +4 -0
  183. data/vendor/eac_fs/lib/eac_fs/patches/pathname/info.rb +12 -0
  184. data/vendor/eac_fs/lib/eac_fs/patches/pathname.rb +4 -0
  185. data/vendor/{avm/lib/avm/files.rb → eac_fs/lib/eac_fs/patches.rb} +0 -5
  186. data/vendor/eac_fs/lib/eac_fs/version.rb +5 -0
  187. data/vendor/eac_fs/lib/eac_fs.rb +7 -0
  188. 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
  189. data/vendor/eac_fs/spec/rubocop_spec.rb +3 -0
  190. data/vendor/eac_fs/spec/spec_helper.rb +4 -0
  191. data/vendor/eac_git/lib/eac_git/local/commit/archive.rb +1 -1
  192. data/vendor/eac_git/lib/eac_git/local/commit.rb +24 -5
  193. data/vendor/eac_git/lib/eac_git/local/log.rb +17 -0
  194. data/vendor/eac_git/lib/eac_git/local.rb +39 -0
  195. data/vendor/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +11 -0
  196. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  197. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +2 -1
  198. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +4 -4
  199. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +1 -0
  200. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +16 -7
  201. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  202. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -5
  203. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  204. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +7 -0
  205. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
  206. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +9 -0
  207. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +7 -0
  208. data/{lib/avm/patches/class/i18n.rb → vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb} +8 -7
  209. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +11 -0
  210. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  211. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +13 -0
  212. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  213. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +10 -10
  214. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  215. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  216. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
  217. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +25 -0
  218. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +30 -0
  219. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +11 -0
  220. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
  221. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
  222. data/vendor/eac_templates/lib/eac_templates/patches/module/erb_template.rb +9 -0
  223. data/vendor/eac_templates/lib/eac_templates/patches/module.rb +4 -0
  224. data/vendor/eac_templates/lib/eac_templates/patches/object/erb_template.rb +9 -0
  225. data/vendor/eac_templates/lib/eac_templates/patches/object.rb +4 -0
  226. data/vendor/eac_templates/lib/eac_templates/patches.rb +4 -0
  227. data/vendor/eac_templates/lib/eac_templates/version.rb +1 -1
  228. metadata +192 -279
  229. data/lib/avm/app_src.rb +0 -61
  230. data/lib/avm/fs_cache.rb +0 -11
  231. data/lib/avm/patches/i18n.rb +0 -22
  232. data/lib/avm/patches/object/fs_cache.rb +0 -16
  233. data/lib/avm/patches/object/i18n.rb +0 -9
  234. data/lib/avm/projects/stereotypes/git/update/subrepo.rb +0 -85
  235. data/lib/avm/projects/stereotypes/git/update.rb +0 -41
  236. data/lib/avm/projects/stereotypes/ruby_gem/update.rb +0 -66
  237. data/vendor/avm/lib/avm/files/info.rb +0 -24
  238. data/vendor/avm-apps/avm-apps.gemspec +0 -18
  239. data/vendor/avm-apps/lib/avm/apps/config.rb +0 -19
  240. data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +0 -64
  241. data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +0 -24
  242. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +0 -18
  243. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +0 -26
  244. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +0 -29
  245. data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +0 -57
  246. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +0 -12
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/scms/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Git
8
+ module Scms
9
+ class Git < ::Avm::Scms::Base
10
+ require_sub __FILE__
11
+ include ::Comparable
12
+
13
+ COMMIT_DIRTY_DEFAULT_MESSAGE = 'Dirty files.'
14
+
15
+ def <=>(other)
16
+ git_repo <=> other.git_repo
17
+ end
18
+
19
+ # @return [Avm::Git::Scms::Git::Commit,nil]
20
+ def commitize(source)
21
+ if source.is_a?(::Avm::Git::Scms::Git::Commit)
22
+ return source if source.git_repo == self
23
+
24
+ raise 'Not same Git repository'
25
+ end
26
+ git_repo.commitize(source).if_present do |v|
27
+ ::Avm::Git::Scms::Git::Commit.new(self, v)
28
+ end
29
+ end
30
+
31
+ # @return [Avm::Git::Scms::Git::Commit,nil]
32
+ def commit_dirty(message = nil)
33
+ return nil unless git_repo.dirty?
34
+
35
+ git_repo.command('add', '.').execute!
36
+ git_repo.command('commit', '-m',
37
+ message.call_if_proc.if_present(COMMIT_DIRTY_DEFAULT_MESSAGE)).execute!
38
+ commitize(git_repo.head)
39
+ end
40
+
41
+ # @return [Avm::Git::Scms::Git::Commit,nil]
42
+ def commit_if_change(message = nil)
43
+ tracker = ::Avm::Git::Scms::Git::ChangeTracker.new(self, message)
44
+ tracker.start
45
+ yield
46
+ tracker.stop
47
+ end
48
+
49
+ def git_repo
50
+ @git_repo ||= ::EacGit::Local.new(path)
51
+ end
52
+
53
+ # @return [Avm::Git::Scms::Git::Commit]
54
+ def reset_and_commit(commit_to_reset, message)
55
+ git_repo.command('reset', '--soft', commitize(commit_to_reset).git_commit.id).execute!
56
+ commit_dirty(message)
57
+ end
58
+
59
+ def valid?
60
+ path.join('.git').exist?
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/scms/base'
4
+ require 'eac_git/local'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module Git
9
+ module Scms
10
+ class GitSubrepo < ::Avm::Scms::Base
11
+ def commit_if_change(_message)
12
+ nyi
13
+ end
14
+
15
+ def update
16
+ git_subrepo.command('clean').execute!
17
+ git_subrepo.command('pull').execute!
18
+ end
19
+
20
+ # @return [EacGit::Local]
21
+ def git_repo
22
+ @git_repo ||= ::EacGit::Local.find(path)
23
+ end
24
+
25
+ # @return [EacGit::Local::Subrepo]
26
+ def git_subrepo
27
+ @git_subrepo ||= git_repo.subrepo(subpath)
28
+ end
29
+
30
+ # @return [Pathname]
31
+ def subpath
32
+ path.expand_path.relative_path_from(git_repo.root_path.expand_path)
33
+ end
34
+
35
+ def valid?
36
+ path.join('.gitrepo').file?
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/git/scms/git'
4
+ require 'avm/git/scms/git_subrepo'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module Git
9
+ module Scms
10
+ class Provider
11
+ SCMS = [::Avm::Git::Scms::Git, ::Avm::Git::Scms::GitSubrepo].freeze
12
+
13
+ def all
14
+ SCMS
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -3,8 +3,8 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module Avm
6
- module Apps
7
- module Jobs
6
+ module Git
7
+ module Scms
8
8
  require_sub __FILE__
9
9
  end
10
10
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- module Apps
5
- VERSION = '0.4.1'
4
+ module Git
5
+ VERSION = '0.1.0'
6
6
  end
7
7
  end
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub(__FILE__)
3
+ require 'eac_ruby_utils/core_ext'
5
4
 
6
5
  module Avm
7
6
  module Git
7
+ require_sub __FILE__
8
+
8
9
  DEFAULT_REMOTE_NAME = 'origin'
9
10
  end
10
11
  end
@@ -9,9 +9,10 @@ RSpec.describe ::Avm::Git::AutoCommitPath, git: true do
9
9
  {
10
10
  'app/models/mynamespace/the_class.rb' => 'Mynamespace::TheClass',
11
11
  'lib/ruby/lib/cliutils/eac_redmine_base0/activity.rb' => 'Cliutils::EacRedmineBase0::Activity'
12
- }.each do |path, expected_class_name|
13
- context "when path is \"#{path}\"" do
14
- let(:instance) { described_class.new(git, "#{git}/#{path}") }
12
+ }.each do |relative_path, expected_class_name|
13
+ context "when path is \"#{relative_path}\"" do
14
+ let(:path) { git.root_path.join(relative_path) }
15
+ let(:instance) { described_class.new(git, path) }
15
16
 
16
17
  it { expect(instance.class_name).to eq(expected_class_name) }
17
18
  end
@@ -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
@@ -13,7 +13,7 @@ module EacCli
13
13
  repeat? ? previous_value + [new_value] : new_value
14
14
  end
15
15
 
16
- def default_value
16
+ def default_default_value
17
17
  repeat? ? [] : nil
18
18
  end
19
19
  end
@@ -18,7 +18,7 @@ module EacCli
18
18
 
19
19
  enable_listable
20
20
  enable_abstract_methods :build_value, :default_value
21
- lists.add_symbol :option, :optional, :usage, :repeat, :required
21
+ lists.add_symbol :option, :default, :optional, :usage, :repeat, :required
22
22
  common_constructor :short, :long, :description, :options, default: [{}] do
23
23
  raise 'Nor short neither long selector was set' if short.blank? && long.blank?
24
24
 
@@ -27,6 +27,14 @@ module EacCli
27
27
  )
28
28
  end
29
29
 
30
+ def default_value
31
+ default_value? ? options[OPTION_DEFAULT] : default_default_value
32
+ end
33
+
34
+ def default_value?
35
+ options.key?(OPTION_DEFAULT)
36
+ end
37
+
30
38
  def identifier
31
39
  [long, short].each do |v|
32
40
  v.to_s.if_present { |vv| return vv.variableize.to_sym }
@@ -14,6 +14,12 @@ module EacCli
14
14
  end
15
15
 
16
16
  def default_value
17
+ return super unless default_value?
18
+
19
+ raise "Unallowed default value for boolean options (Option: #{self})"
20
+ end
21
+
22
+ def default_default_value
17
23
  repeat? ? 0 : false
18
24
  end
19
25
  end
@@ -36,9 +36,9 @@ module EacCli
36
36
  end
37
37
 
38
38
  def option_definition(option)
39
- self.class.option_usage_full(option) + option.description.if_present('') do |v|
40
- OPTION_DESC_SEP + v
41
- end
39
+ [self.class.option_usage_full(option), option.description,
40
+ option.default_value? ? "[Default: \"#{option.default_value}\"]" : nil]
41
+ .reject(&:blank?).join(OPTION_DESC_SEP)
42
42
  end
43
43
 
44
44
  def section(header, include_header = true)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.22.2'
4
+ VERSION = '0.23.1'
5
5
  end
@@ -13,6 +13,7 @@ RSpec.describe ::EacCli::Runner do
13
13
  bool_opt '-p', '--opt2', 'A boolean option'
14
14
  arg_opt '-q', '--opt4', 'A repeatable argument option.', repeat: true
15
15
  bool_opt '-r', '--opt5', 'A repeatable boolean option', repeat: true
16
+ arg_opt '-s', '--opt6', 'A argument option with default value', default: 'DEFAULT'
16
17
  pos_arg :pos1
17
18
  pos_arg :pos2, repeat: true, optional: true
18
19
  alt do
@@ -28,9 +29,9 @@ RSpec.describe ::EacCli::Runner do
28
29
  let(:parsed_actual) { instance.parsed.to_h.symbolize_keys }
29
30
 
30
31
  context 'when all args are supplied' do
31
- let(:argv) { %w[--opt1 aaa --opt2 bbb ccc ddd] }
32
+ let(:argv) { %w[--opt1 aaa --opt2 bbb ccc ddd --opt6 6] }
32
33
  let(:parsed_expected) do
33
- { opt1: 'aaa', opt2: true, opt3: false, opt4: [], opt5: 0, pos1: 'bbb',
34
+ { opt1: 'aaa', opt2: true, opt3: false, opt4: [], opt5: 0, opt6: '6', pos1: 'bbb',
34
35
  pos2: %w[ccc ddd] }
35
36
  end
36
37
 
@@ -65,7 +66,7 @@ RSpec.describe ::EacCli::Runner do
65
66
  context 'when only required args are supplied' do
66
67
  let(:argv) { %w[bbb] }
67
68
  let(:parsed_expected) do
68
- { opt1: nil, opt2: false, opt3: false, opt4: [], opt5: 0, pos1: 'bbb',
69
+ { opt1: nil, opt2: false, opt3: false, opt4: [], opt5: 0, opt6: 'DEFAULT', pos1: 'bbb',
69
70
  pos2: [] }
70
71
  end
71
72
 
@@ -87,7 +88,7 @@ RSpec.describe ::EacCli::Runner do
87
88
  context 'when alternative args are supplied' do
88
89
  let(:argv) { %w[--opt3] }
89
90
  let(:parsed_expected) do
90
- { opt1: nil, opt2: false, opt3: true, opt4: [], opt5: 0, pos1: nil,
91
+ { opt1: nil, opt2: false, opt3: true, opt4: [], opt5: 0, opt6: 'DEFAULT', pos1: nil,
91
92
  pos2: [] }
92
93
  end
93
94
 
@@ -98,7 +99,7 @@ RSpec.describe ::EacCli::Runner do
98
99
  context 'when repeated options are supplied' do
99
100
  let(:argv) { %w[--opt5 -rrr --opt4=A -q B --opt4 C AAA] }
100
101
  let(:parsed_expected) do
101
- { opt1: nil, opt2: false, opt3: false, opt4: %w[A B C], opt5: 4, pos1: 'AAA',
102
+ { opt1: nil, opt2: false, opt3: false, opt4: %w[A B C], opt5: 4, opt6: 'DEFAULT', pos1: 'AAA',
102
103
  pos2: [] }
103
104
  end
104
105
 
@@ -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 'eac_fs/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'eac_fs'
9
+ s.version = EacFs::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 'content-type'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.70'
17
+ s.add_dependency 'ruby-filemagic'
18
+
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
20
+ end
@@ -1,7 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module EacRubyUtils
4
- class FilesystemCache
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'fileutils'
5
+
6
+ module EacFs
7
+ class Cache
8
+ enable_context
9
+
5
10
  CONTENT_FILE_NAME = '__content__'
6
11
 
7
12
  attr_reader :path
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/fs_cache'
4
- require 'eac_ruby_utils/core_ext'
3
+ require 'eac_fs/patches'
4
+ require 'eac_ruby_utils/fs/temp'
5
5
 
6
6
  module Avm
7
7
  class CachedDownload
@@ -9,7 +9,7 @@ module Avm
9
9
 
10
10
  def initialize(url, parent_fs_cache = nil)
11
11
  @url = url
12
- @fs_cache = (parent_fs_cache || ::Avm.fs_cache).child(url.parameterize)
12
+ @fs_cache = (parent_fs_cache || fs_cache).child(url.parameterize)
13
13
  end
14
14
 
15
15
  def assert
@@ -25,7 +25,7 @@ module Avm
25
25
  end
26
26
 
27
27
  def path
28
- @path ||= fs_cache.content_path.to_pathname
28
+ fs_cache.content_path.to_pathname
29
29
  end
30
30
 
31
31
  private
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'content-type'
5
+ require 'filemagic'
6
+
7
+ module EacFs
8
+ class FileInfo
9
+ UNKNOWN_CONTENT_TYPE_STRING = 'application/octet-stream'
10
+ UNKNOWN_CONTENT_TYPE = ::ContentType.parse(UNKNOWN_CONTENT_TYPE_STRING)
11
+
12
+ enable_simple_cache
13
+ attr_reader :magic_string
14
+
15
+ def initialize(path)
16
+ @magic_string = ::FileMagic.new(FileMagic::MAGIC_MIME).file(path.to_pathname.to_path)
17
+ end
18
+
19
+ delegate :charset, :mime_type, :subtype, :type, to: :content_type
20
+
21
+ private
22
+
23
+ def content_type_uncached
24
+ ::ContentType.parse(magic_string)
25
+ rescue ::Parslet::ParseFailed
26
+ UNKNOWN_CONTENT_TYPE
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_fs/cache'
4
+
5
+ class Module
6
+ # @return [EacFs::Cache]
7
+ def fs_cache
8
+ ::EacFs::Cache.context.current.child('fs_cache', *name.split('::'))
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+ ::EacRubyUtils.require_sub(__FILE__)
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_fs/patches/module/fs_cache'
4
+
5
+ class Object
6
+ # @return [EacFs::Cache]
7
+ def fs_cache
8
+ self.class.fs_cache.child(fs_cache_object_id)
9
+ end
10
+
11
+ # @return [String]
12
+ def fs_cache_object_id
13
+ raise 'Abstract method hit'
14
+ end
15
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+ ::EacRubyUtils.require_sub(__FILE__)
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_fs/file_info'
4
+ require 'pathname'
5
+
6
+ class Pathname
7
+ # Shortcut for `EacFs::FileInfo.new(self)`.
8
+ # @return [EacFs::FileInfo]
9
+ def info
10
+ ::EacFs::FileInfo.new(self)
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+ ::EacRubyUtils.require_sub(__FILE__)
@@ -2,8 +2,3 @@
2
2
 
3
3
  require 'eac_ruby_utils/require_sub'
4
4
  ::EacRubyUtils.require_sub(__FILE__)
5
-
6
- module Avm
7
- module Files
8
- end
9
- end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacFs
4
+ VERSION = '0.5.0'
5
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacFs
6
+ require_sub __FILE__
7
+ end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/core_ext/object/blank'
4
- require 'eac_ruby_utils/filesystem_cache'
4
+ require 'eac_fs/cache'
5
5
 
6
- RSpec.describe ::EacRubyUtils::FilesystemCache do
6
+ RSpec.describe ::EacFs::Cache do
7
7
  let(:tmpdir) { ::Dir.mktmpdir }
8
8
  let(:instance) { described_class.new(tmpdir, 'instance') }
9
9
 
@@ -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__))
@@ -9,7 +9,7 @@ module EacGit
9
9
  # @return [EacRubyUtils::Envs::Command]
10
10
  def archive_to_dir(path)
11
11
  path = path.to_pathname
12
- repo.command('archive', '--format=tar', hash).pipe(
12
+ repo.command('archive', '--format=tar', id).pipe(
13
13
  ::EacGit::Executables.tar.command('-xC', path)
14
14
  )
15
15
  end