avm-tools 0.119.0 → 0.120.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/projects/stereotypes/ruby_gem/local_project_mixin.rb +3 -3
  3. data/lib/avm/tools/app_src.rb +1 -5
  4. data/lib/avm/tools/runner/app_src/ruby.rb +0 -1
  5. data/lib/avm/tools/version.rb +1 -1
  6. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb +2 -2
  7. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  8. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb +3 -3
  9. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  10. metadata +6 -232
  11. data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +0 -29
  12. data/lib/avm/patches/eac_ruby_gems_utils.rb +0 -4
  13. data/sub/avm/Gemfile +0 -5
  14. data/sub/avm/avm.gemspec +0 -26
  15. data/sub/avm/lib/avm/data/instance/files_unit.rb +0 -40
  16. data/sub/avm/lib/avm/data/instance/package.rb +0 -18
  17. data/sub/avm/lib/avm/data/instance/unit.rb +0 -17
  18. data/sub/avm/lib/avm/data/instance.rb +0 -11
  19. data/sub/avm/lib/avm/data/package/dump.rb +0 -119
  20. data/sub/avm/lib/avm/data/package/load.rb +0 -48
  21. data/sub/avm/lib/avm/data/package.rb +0 -42
  22. data/sub/avm/lib/avm/data/rotate.rb +0 -107
  23. data/sub/avm/lib/avm/data/unit.rb +0 -94
  24. data/sub/avm/lib/avm/docker/container.rb +0 -50
  25. data/sub/avm/lib/avm/docker/image.rb +0 -71
  26. data/sub/avm/lib/avm/docker/runner.rb +0 -125
  27. data/sub/avm/lib/avm/docker.rb +0 -9
  28. data/sub/avm/lib/avm/executables.rb +0 -24
  29. data/sub/avm/lib/avm/instances/application.rb +0 -29
  30. data/sub/avm/lib/avm/instances/base/auto_values/access.rb +0 -40
  31. data/sub/avm/lib/avm/instances/base/auto_values/admin.rb +0 -19
  32. data/sub/avm/lib/avm/instances/base/auto_values/data.rb +0 -26
  33. data/sub/avm/lib/avm/instances/base/auto_values/database.rb +0 -76
  34. data/sub/avm/lib/avm/instances/base/auto_values/filesystem.rb +0 -43
  35. data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +0 -34
  36. data/sub/avm/lib/avm/instances/base/auto_values/ruby.rb +0 -15
  37. data/sub/avm/lib/avm/instances/base/auto_values/source.rb +0 -15
  38. data/sub/avm/lib/avm/instances/base/auto_values/system.rb +0 -23
  39. data/sub/avm/lib/avm/instances/base/auto_values/web.rb +0 -46
  40. data/sub/avm/lib/avm/instances/base/auto_values.rb +0 -21
  41. data/sub/avm/lib/avm/instances/base/dockerizable.rb +0 -45
  42. data/sub/avm/lib/avm/instances/base/entry_keys.rb +0 -22
  43. data/sub/avm/lib/avm/instances/base.rb +0 -64
  44. data/sub/avm/lib/avm/instances/docker_image.rb +0 -15
  45. data/sub/avm/lib/avm/instances/entries.rb +0 -43
  46. data/sub/avm/lib/avm/instances/entry.rb +0 -60
  47. data/sub/avm/lib/avm/instances/entry_keys.rb +0 -60
  48. data/sub/avm/lib/avm/instances/runner.rb +0 -39
  49. data/sub/avm/lib/avm/instances.rb +0 -8
  50. data/sub/avm/lib/avm/jobs/base.rb +0 -63
  51. data/sub/avm/lib/avm/jobs/variables_source.rb +0 -22
  52. data/sub/avm/lib/avm/jobs.rb +0 -9
  53. data/sub/avm/lib/avm/launcher/errors/base.rb +0 -10
  54. data/sub/avm/lib/avm/launcher/errors/non_project.rb +0 -15
  55. data/sub/avm/lib/avm/launcher/paths/real.rb +0 -44
  56. data/sub/avm/lib/avm/launcher/publish/check_result.rb +0 -67
  57. data/sub/avm/lib/avm/path_string.rb +0 -27
  58. data/sub/avm/lib/avm/registry/base.rb +0 -67
  59. data/sub/avm/lib/avm/registry.rb +0 -29
  60. data/sub/avm/lib/avm/result.rb +0 -86
  61. data/sub/avm/lib/avm/rspec/setup.rb +0 -22
  62. data/sub/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb +0 -11
  63. data/sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +0 -14
  64. data/sub/avm/lib/avm/rspec.rb +0 -9
  65. data/sub/avm/lib/avm/runners/base.rb +0 -27
  66. data/sub/avm/lib/avm/scms/base.rb +0 -46
  67. data/sub/avm/lib/avm/scms/commit.rb +0 -43
  68. data/sub/avm/lib/avm/scms/inflector.rb +0 -22
  69. data/sub/avm/lib/avm/self/docker_image.rb +0 -14
  70. data/sub/avm/lib/avm/self/instance/entry_keys.rb +0 -12
  71. data/sub/avm/lib/avm/self/instance.rb +0 -31
  72. data/sub/avm/lib/avm/sources/base/configuration.rb +0 -45
  73. data/sub/avm/lib/avm/sources/base/instance.rb +0 -28
  74. data/sub/avm/lib/avm/sources/base/parent.rb +0 -31
  75. data/sub/avm/lib/avm/sources/base/subs.rb +0 -55
  76. data/sub/avm/lib/avm/sources/base/subs_paths.rb +0 -32
  77. data/sub/avm/lib/avm/sources/base/testing.rb +0 -21
  78. data/sub/avm/lib/avm/sources/base.rb +0 -54
  79. data/sub/avm/lib/avm/sources/configuration/locale.rb +0 -18
  80. data/sub/avm/lib/avm/sources/configuration/rubocop.rb +0 -26
  81. data/sub/avm/lib/avm/sources/configuration/tests.rb +0 -29
  82. data/sub/avm/lib/avm/sources/configuration.rb +0 -59
  83. data/sub/avm/lib/avm/sources/tester.rb +0 -24
  84. data/sub/avm/lib/avm/sources/tests/builder.rb +0 -83
  85. data/sub/avm/lib/avm/sources/tests/performer.rb +0 -35
  86. data/sub/avm/lib/avm/sources/tests/result.rb +0 -15
  87. data/sub/avm/lib/avm/sources/tests/single.rb +0 -56
  88. data/sub/avm/lib/avm/sources/tests.rb +0 -11
  89. data/sub/avm/lib/avm/sources.rb +0 -9
  90. data/sub/avm/lib/avm/sync.rb +0 -94
  91. data/sub/avm/lib/avm/version.rb +0 -5
  92. data/sub/avm/lib/avm/version_number.rb +0 -45
  93. data/sub/avm/lib/avm.rb +0 -7
  94. data/sub/avm/spec/lib/avm/scms/base_spec.rb +0 -7
  95. data/sub/avm/spec/lib/avm/sources/base_spec.rb +0 -7
  96. data/sub/avm/spec/rubocop_spec.rb +0 -3
  97. data/sub/avm/spec/spec_helper.rb +0 -4
  98. data/sub/avm-eac_rails_base1/Gemfile +0 -5
  99. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +0 -21
  100. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/apache_host.rb +0 -17
  101. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instance.rb +0 -24
  102. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb +0 -26
  103. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb +0 -26
  104. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb +0 -43
  105. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb +0 -26
  106. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +0 -18
  107. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb +0 -32
  108. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +0 -46
  109. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb +0 -17
  110. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner.rb +0 -12
  111. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/bundle.rb +0 -27
  112. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb +0 -47
  113. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb +0 -27
  114. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb +0 -70
  115. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb +0 -29
  116. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb +0 -57
  117. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +0 -7
  118. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1.rb +0 -9
  119. data/sub/avm-eac_rails_base1/spec/rubocop_spec.rb +0 -3
  120. data/sub/avm-eac_rails_base1/spec/spec_helper.rb +0 -4
  121. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler.service +0 -12
  122. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh +0 -6
  123. data/sub/avm-eac_ruby_base1/Gemfile +0 -5
  124. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +0 -22
  125. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/add_or_replace_gem_line.rb +0 -56
  126. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/dependency.rb +0 -19
  127. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile.rb +0 -34
  128. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/depends_on.rb +0 -25
  129. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/gem_conflict.rb +0 -44
  130. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/in_gemfile.rb +0 -17
  131. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_buffer.rb +0 -73
  132. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_factory.rb +0 -31
  133. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base.rb +0 -19
  134. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/version_requirement.rb +0 -26
  135. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser.rb +0 -25
  136. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler.rb +0 -11
  137. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb +0 -31
  138. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb +0 -17
  139. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +0 -41
  140. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb +0 -55
  141. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundle_command.rb +0 -39
  142. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +0 -39
  143. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb +0 -23
  144. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +0 -55
  145. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb +0 -76
  146. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler.rb +0 -19
  147. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners.rb +0 -13
  148. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb +0 -38
  149. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +0 -56
  150. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb +0 -52
  151. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources.rb +0 -11
  152. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +0 -7
  153. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb +0 -9
  154. data/sub/avm-eac_ruby_base1/locale/en.yml +0 -8
  155. data/sub/avm-eac_ruby_base1/locale/pt-BR.yml +0 -8
  156. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec.rb +0 -7
  157. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.source.out +0 -192
  158. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.target.yaml +0 -300
  159. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.source.out +0 -245
  160. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.target.yaml +0 -355
  161. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base_spec.rb +0 -7
  162. data/sub/avm-eac_ruby_base1/spec/rubocop_spec.rb +0 -3
  163. data/sub/avm-eac_ruby_base1/spec/spec_helper.rb +0 -4
  164. data/sub/eac_ruby_base0/Gemfile +0 -5
  165. data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +0 -21
  166. data/sub/eac_ruby_base0/lib/eac_ruby_base0/application.rb +0 -87
  167. data/sub/eac_ruby_base0/lib/eac_ruby_base0/application_xdg.rb +0 -34
  168. data/sub/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +0 -5
  169. data/sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb +0 -31
  170. data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb +0 -10
  171. data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb +0 -4
  172. data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb +0 -5
  173. data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb +0 -5
  174. data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches.rb +0 -4
  175. data/sub/eac_ruby_base0/lib/eac_ruby_base0/rspec/setup.rb +0 -14
  176. data/sub/eac_ruby_base0/lib/eac_ruby_base0/rspec.rb +0 -9
  177. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +0 -92
  178. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb +0 -42
  179. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +0 -52
  180. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/input.rb +0 -36
  181. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/output.rb +0 -58
  182. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb +0 -9
  183. data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +0 -5
  184. data/sub/eac_ruby_base0/lib/eac_ruby_base0.rb +0 -7
  185. data/sub/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/confirmation_spec.rb +0 -42
  186. data/sub/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/output_spec.rb +0 -81
  187. data/sub/eac_ruby_base0/spec/rubocop_spec.rb +0 -3
  188. data/sub/eac_ruby_base0/spec/spec_helper.rb +0 -4
  189. data/sub/eac_ruby_gems_utils/Gemfile +0 -5
  190. data/sub/eac_ruby_gems_utils/LICENCE +0 -16
  191. data/sub/eac_ruby_gems_utils/README.rdoc +0 -3
  192. data/sub/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +0 -31
  193. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb +0 -33
  194. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +0 -41
  195. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem.rb +0 -97
  196. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -57
  197. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/minitest.rb +0 -25
  198. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/decorated_gem.rb +0 -48
  199. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/result.rb +0 -25
  200. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple.rb +0 -84
  201. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/rspec.rb +0 -21
  202. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests.rb +0 -9
  203. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +0 -5
  204. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils.rb +0 -7
  205. data/sub/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +0 -3
  206. data/sub/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec.rb +0 -14
  207. data/sub/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec_files/a_version_file.rb +0 -7
  208. data/sub/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem_spec.rb +0 -20
  209. data/sub/eac_ruby_gems_utils/spec/spec_helper.rb +0 -4
  210. data/sub/eac_ruby_gems_utils/spec/support/mygem/Gemfile +0 -5
  211. data/sub/eac_ruby_gems_utils/spec/support/mygem/Gemfile.lock +0 -19
  212. data/sub/eac_ruby_gems_utils/spec/support/mygem/Rakefile +0 -14
  213. data/sub/eac_ruby_gems_utils/spec/support/mygem/exe/myrunner +0 -5
  214. data/sub/eac_ruby_gems_utils/spec/support/mygem/lib/mygem/version.rb +0 -5
  215. data/sub/eac_ruby_gems_utils/spec/support/mygem/lib/mygem.rb +0 -5
  216. data/sub/eac_ruby_gems_utils/spec/support/mygem/mygem.gemspec +0 -16
@@ -1,43 +0,0 @@
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
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module Scms
5
- class Inflector
6
- class << self
7
- def default_instance
8
- @default_instance ||= new
9
- end
10
- end
11
-
12
- ISSUE_POINTER_NAME_PREFIX = 'issue_'
13
- POINTER_NAME_TO_ISSUE_PATTERN = /\A#{Regexp.quote(ISSUE_POINTER_NAME_PREFIX)}(\d+)\z/.freeze
14
- POINTER_NAME_TO_ISSUE_PARSER = POINTER_NAME_TO_ISSUE_PATTERN.to_parser { |m| m[1] }
15
-
16
- # @return [String, nil]
17
- def pointer_name_to_issue_id(pointer_name)
18
- POINTER_NAME_TO_ISSUE_PARSER.parse(pointer_name)
19
- end
20
- end
21
- end
22
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'avm/docker/image'
5
-
6
- module Avm
7
- module Self
8
- class DockerImage < ::Avm::Docker::Image
9
- def stereotype_tag
10
- nil
11
- end
12
- end
13
- end
14
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module Self
5
- class Instance < ::Avm::Instances::Base
6
- module EntryKeys
7
- DATA_DEFAULT_PATH = 'data.default_path'
8
- DOCKER_REGISTRY_NAME = 'docker.registry.name'
9
- end
10
- end
11
- end
12
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/instances/base'
4
- require 'avm/self/docker_image'
5
- require 'avm/self/instance/entry_keys'
6
-
7
- module Avm
8
- module Self
9
- class Instance < ::Avm::Instances::Base
10
- DEFAULT_INSTANCE_ID = 'avm_self'
11
-
12
- class << self
13
- def default
14
- @default ||= by_id(DEFAULT_INSTANCE_ID)
15
- end
16
- end
17
-
18
- def docker_image_class
19
- ::Avm::Self::DockerImage
20
- end
21
-
22
- def docker_registry
23
- read_entry(::Avm::Self::Instance::EntryKeys::DOCKER_REGISTRY_NAME)
24
- end
25
-
26
- def docker_run_arguments
27
- ['-e', "LOCAL_USER_ID=#{::Process.uid}"]
28
- end
29
- end
30
- end
31
- end
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_config/yaml_file_node'
4
- require 'eac_ruby_utils/core_ext'
5
- require 'eac_ruby_utils/yaml'
6
- require 'shellwords'
7
-
8
- module Avm
9
- module Sources
10
- class Base
11
- module Configuration
12
- # @return [Array<String>, nil]
13
- def read_configuration_as_shell_words(key)
14
- configuration.entry(key).value.if_present do |v|
15
- v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v.to_s)
16
- end
17
- end
18
-
19
- private
20
-
21
- # @return [EacConfig::YamlFileNode]
22
- def configuration_uncached
23
- ::Avm::Sources::Configuration::FILENAMES.each do |filename|
24
- configuration_with_filename(filename, true)
25
- end
26
- configuration_with_filename(::Avm::Sources::Configuration::FILENAMES.first, false)
27
- end
28
-
29
- # @return [EacConfig::YamlFileNode, nil]
30
- def configuration_with_filename(filename, needs_exist)
31
- file_path = path.join(filename)
32
- return ::EacConfig::YamlFileNode.new(file_path) if !needs_exist || file_path.exist?
33
-
34
- nil
35
- end
36
-
37
- # @return [Avm::Sources::Configuration]
38
- def old_configuration_uncached
39
- ::Avm::Sources::Configuration.find_in_path(path) ||
40
- ::Avm::Sources::Configuration.temp_instance
41
- end
42
- end
43
- end
44
- end
45
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/instances/application'
4
- require 'avm/instances/base'
5
-
6
- module Avm
7
- module Sources
8
- class Base
9
- module Instance
10
- DEFAULT_INSTANCE_SUFFIX = 'dev'
11
-
12
- def instance_suffix
13
- DEFAULT_INSTANCE_SUFFIX
14
- end
15
-
16
- private
17
-
18
- def application_uncached
19
- ::Avm::Instances::Application.new(path.basename)
20
- end
21
-
22
- def instance_uncached
23
- ::Avm::Instances::Base.new(application, DEFAULT_INSTANCE_SUFFIX)
24
- end
25
- end
26
- end
27
- end
28
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Sources
7
- class Base
8
- module Parent
9
- # @return [Avm::Sources::Base]
10
- def parent
11
- parent_by_option || parent_by_search
12
- end
13
-
14
- # @return [Avm::Sources::Base]
15
- def parent_by_option
16
- options[OPTION_PARENT]
17
- end
18
-
19
- # @return [Avm::Sources::Base]
20
- def parent_by_search
21
- parent_path = path.parent
22
- until parent_path.root?
23
- ::Avm::Registry.sources.detect_optional(parent_path).if_present { |v| return v }
24
- parent_path = parent_path.parent
25
- end
26
- nil
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,55 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/sources/base/subs_paths'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module Sources
8
- class Base
9
- module Subs
10
- CONFIGURATION_SUBS_EXCLUDE_PATHS_KEY = 'subs.exclude_path'
11
- CONFIGURATION_SUBS_INCLUDE_PATHS_KEY = 'subs.include_path'
12
- SUBS_EXCLUDE_PATHS_DEFAULT = [].freeze
13
- SUBS_INCLUDE_PATHS_DEFAULT = ['sub/*'].freeze
14
-
15
- # @return [Enumerable<Avm::Sources::Base>]
16
- def subs
17
- subs_paths_to_search
18
- .map { |sub_path| ::Avm::Registry.sources.detect_optional(sub_path, parent: self) }
19
- .reject(&:blank?)
20
- .sort_by { |sub| [sub.path] }
21
- end
22
-
23
- def subs_paths_to_search
24
- subs_include_paths.flat_map do |subs_include_path|
25
- ::Pathname.glob(path.join(subs_include_path)).reject do |sub_path|
26
- subs_exclude_paths.any? do |subs_exclude_path|
27
- sub_path.fnmatch?(path.join(subs_exclude_path).to_path)
28
- end
29
- end
30
- end
31
- end
32
-
33
- %i[include exclude].each do |type|
34
- %i[path paths configured_paths default_paths].each do |method_suffix|
35
- obj_method_name = "subs_#{type}_path_obj"
36
-
37
- define_method "subs_#{type}_#{method_suffix}" do
38
- send(obj_method_name).send(method_suffix)
39
- end
40
-
41
- define_method "#{obj_method_name}_uncached" do
42
- ::Avm::Sources::Base::SubsPaths.new(
43
- self,
44
- self.class.const_get("CONFIGURATION_SUBS_#{type}_PATHS_KEY".upcase),
45
- self.class.const_get("SUBS_#{type}_PATHS_DEFAULT".upcase)
46
- )
47
- end
48
-
49
- private "#{obj_method_name}_uncached" # rubocop:disable Style/AccessModifierDeclarations
50
- end
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Sources
7
- class Base
8
- class SubsPaths
9
- SUBS_PATH_SEPARATOR = ':'
10
-
11
- common_constructor :source, :configuration_key, :default_paths
12
-
13
- # @return [String]
14
- def path
15
- paths.join(SUBS_PATH_SEPARATOR)
16
- end
17
-
18
- # @return [Array<String>]
19
- def paths
20
- configured_paths || default_paths
21
- end
22
-
23
- # @return [Array<String>]
24
- def configured_paths
25
- source.configuration.entry(configuration_key).value.if_present do |v|
26
- v.split(SUBS_PATH_SEPARATOR)
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Sources
7
- class Base
8
- module Testing
9
- # @return [Avm::Sources::Tester]
10
- def tester
11
- tester_class.new(self)
12
- end
13
-
14
- # @return [Class<Avm::Sources::Tester>
15
- def tester_class
16
- Avm::Sources::Tester
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,54 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/registry'
4
- require 'eac_git'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module Sources
9
- class Base
10
- require_sub __FILE__, include_modules: true
11
- compare_by :path
12
- enable_abstract_methods
13
- enable_simple_cache
14
- enable_listable
15
- lists.add_symbol :option, :parent
16
- common_constructor :path, :options, default: [{}] do
17
- self.path = path.to_pathname.expand_path
18
- self.options = ::Avm::Sources::Base.lists.option.hash_keys_validate!(options)
19
- end
20
-
21
- abstract_methods :update, :valid?
22
-
23
- delegate :locale, to: :old_configuration
24
-
25
- # @return [EacRubyUtils::Envs::LocalEnv]
26
- def env
27
- ::EacRubyUtils::Envs::LocalEnv.new
28
- end
29
-
30
- # @return [Hash<String, Class>]
31
- def extra_available_subcommands
32
- {}
33
- end
34
-
35
- # @return [Pathname]
36
- def relative_path
37
- return path if parent.blank?
38
-
39
- path.relative_path_from(parent.path)
40
- end
41
-
42
- def to_s
43
- "#{self.class}[#{path}]"
44
- end
45
-
46
- private
47
-
48
- # @return [Avm::Scms::Base]
49
- def scm_uncached
50
- ::Avm::Registry.scms.detect(path)
51
- end
52
- end
53
- end
54
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/patches/eac_ruby_gems_utils/gem'
4
- require 'i18n'
5
-
6
- module Avm
7
- module Sources
8
- class Configuration < ::EacConfig::OldConfigs
9
- module Locale
10
- LOCALE_KEY = :locale
11
-
12
- def locale
13
- read_entry(LOCALE_KEY) || ::I18n.default_locale
14
- end
15
- end
16
- end
17
- end
18
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module Sources
5
- class Configuration < ::EacConfig::OldConfigs
6
- module Rubocop
7
- RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
8
- RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
9
-
10
- def rubocop_command
11
- read_command(RUBOCOP_COMMAND_KEY)
12
- end
13
-
14
- def rubocop_gemfile
15
- gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
16
- return nil if gemfile_path.blank?
17
-
18
- gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
19
- return gemfile_path if gemfile_path.file?
20
-
21
- raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/patches/eac_ruby_gems_utils/gem'
4
-
5
- module Avm
6
- module Sources
7
- class Configuration < ::EacConfig::OldConfigs
8
- module Tests
9
- BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
10
- TEST_COMMAND_KEY = 'test.command'
11
-
12
- def any_test_command
13
- bundle_test_command || test_command
14
- end
15
-
16
- def test_command
17
- read_command(TEST_COMMAND_KEY)
18
- end
19
-
20
- def bundle_test_command
21
- read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
22
- args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
23
- ::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
24
- end
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,59 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_config/old_configs'
4
- require 'eac_ruby_utils/core_ext'
5
- require 'yaml'
6
-
7
- module Avm
8
- module Sources
9
- class Configuration < ::EacConfig::OldConfigs
10
- require_sub __FILE__, include_modules: true
11
-
12
- FILENAMES = %w[.avm.yml .avm.yaml].freeze
13
-
14
- class << self
15
- def find_by_path(path)
16
- path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname)
17
- internal_find_path(path.expand_path)
18
- end
19
-
20
- def find_in_path(path)
21
- absolute_pathname = path.to_pathname.expand_path
22
- if absolute_pathname.directory?
23
- FILENAMES.each do |filename|
24
- file = absolute_pathname.join(filename)
25
- return new(file) if file.exist?
26
- end
27
- end
28
- nil
29
- end
30
-
31
- def temp_instance
32
- new(::Tempfile.new(['.avm', '.yaml']))
33
- end
34
-
35
- private
36
-
37
- def internal_find_path(absolute_pathname)
38
- r = find_in_path(absolute_pathname)
39
- return r if r.present?
40
-
41
- internal_find_path(absolute_pathname.dirname) unless absolute_pathname.root?
42
- end
43
- end
44
-
45
- def initialize(path)
46
- super(nil, storage_path: path)
47
- end
48
-
49
- # Utility to read a configuration as a [EacRubyUtils::Envs::Command].
50
- # @return [EacRubyUtils::Envs::Command]
51
- def read_command(key)
52
- read_entry(key).if_present do |v|
53
- args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
54
- ::EacRubyUtils::Envs.local.command(args).chdir(::File.dirname(storage_path))
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Sources
7
- class Tester
8
- enable_abstract_methods
9
- common_constructor :source
10
-
11
- abstract_methods :result, :logs
12
-
13
- # @return [EacFs::Logs]
14
- def logs
15
- raise_abstract_method __method__
16
- end
17
-
18
- # @return [Avm::Sources::Tests::Result]
19
- def result
20
- raise_abstract_method __method__
21
- end
22
- end
23
- end
24
- end
@@ -1,83 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/sources/tests/performer'
4
- require 'avm/sources/tests/single'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module Sources
9
- module Tests
10
- class Builder
11
- require_sub __FILE__
12
- enable_immutable
13
-
14
- immutable_accessor :include_main, :include_subs, type: :boolean
15
- immutable_accessor :include_id, type: :array
16
- common_constructor :main_source
17
-
18
- def immutable_constructor_args
19
- [main_source]
20
- end
21
-
22
- # @return [Avm::Sources::Tests::Performer]
23
- def performer
24
- ::Avm::Sources::Tests::Performer.new(self)
25
- end
26
-
27
- def selected_units
28
- (select_units_from_subs + select_units_from_main + select_units_from_ids).sort.uniq
29
- end
30
-
31
- private
32
-
33
- # @return [Array<Avm::Sources::Tests::Single>]
34
- def available_units
35
- @available_units ||= ([main_source] + main_source.subs)
36
- .map { |a_source| create_unit(a_source) }
37
- end
38
-
39
- def available_units_from_main
40
- create_units([main_source])
41
- end
42
-
43
- def available_units_from_subs
44
- create_units(main_source.subs)
45
- end
46
-
47
- # @return [Avm::Sources::Tests::Single]
48
- def create_unit(source)
49
- ::Avm::Sources::Tests::Single.new(self, source)
50
- end
51
-
52
- # @return [Array<Avm::Sources::Tests::Single>]
53
- def create_units(sources)
54
- sources.map { |a_source| create_unit(a_source) }
55
- end
56
-
57
- # @return [Avm::Sources::Tests::Single]
58
- def create_unit_by_id(source_id)
59
- r = available_units.find { |unit| unit.id == source_id }
60
- return r if r
61
-
62
- raise ::ArgumentError, "Source not found with ID=#{source_id}" \
63
- "(Available: #{available_units.map(&:id).join(', ')})"
64
- end
65
-
66
- # @return [Array<Avm::Sources::Tests::Single>]
67
- def select_units_from_ids
68
- include_ids.map { |source_id| create_unit_by_id(source_id) }
69
- end
70
-
71
- # @return [Array<Avm::Sources::Tests::Single>]
72
- def select_units_from_main
73
- include_main? ? available_units_from_main : []
74
- end
75
-
76
- # @return [Array<Avm::Sources::Tests::Single>]
77
- def select_units_from_subs
78
- include_subs? ? available_units_from_subs : []
79
- end
80
- end
81
- end
82
- end
83
- end
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/sources/tests/result'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module Sources
8
- module Tests
9
- class Performer
10
- enable_simple_cache
11
-
12
- common_constructor(:owner)
13
-
14
- def non_failed_units
15
- units.reject(&:failed?)
16
- end
17
-
18
- def failed_units
19
- units.select(&:failed?)
20
- end
21
-
22
- # @return [Boolean]
23
- def successful?
24
- failed_units.none?
25
- end
26
-
27
- protected
28
-
29
- def units_uncached
30
- owner.selected_units
31
- end
32
- end
33
- end
34
- end
35
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_cli/enum'
4
-
5
- module Avm
6
- module Sources
7
- module Tests
8
- class Result < ::EacCli::Enum
9
- enum :failed, :red
10
- enum :nonexistent, :white
11
- enum :sucessful, :green
12
- end
13
- end
14
- end
15
- end