eac_tools 0.79.0 → 0.81.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +40 -31
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/lib/avm/application_scms/base.rb +17 -6
  5. data/sub/avm/lib/avm/applications/base/auto_local_source_path.rb +24 -0
  6. data/sub/avm/lib/avm/applications/base/local_source.rb +1 -1
  7. data/sub/avm/lib/avm/applications/base/scm.rb +2 -2
  8. data/sub/avm/lib/avm/registry/application_scms.rb +2 -2
  9. data/sub/avm/lib/avm/version.rb +1 -1
  10. data/sub/avm/spec/lib/avm/applications/base/entries_spec.rb +4 -2
  11. data/sub/avm/spec/lib/avm/applications/base/entries_spec_files/config.yml +1 -0
  12. data/sub/avm-eac_github_base0/Gemfile +2 -2
  13. data/sub/avm-eac_github_base0/avm-eac_github_base0.gemspec +3 -2
  14. data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/entity.rb +1 -1
  15. data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/application_scms/base.rb +30 -2
  16. data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/version.rb +1 -1
  17. data/sub/avm-eac_github_base0/spec/lib/avm/eac_github_base0/application_scms/base_spec.rb +40 -0
  18. data/sub/avm-eac_github_base0/spec/rubocop_spec.rb +1 -1
  19. data/sub/avm-eac_github_base0/spec/spec_helper.rb +1 -1
  20. data/sub/avm-eac_gitlab_base0/Gemfile +8 -0
  21. data/sub/avm-eac_gitlab_base0/avm-eac_gitlab_base0.gemspec +20 -0
  22. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/base_entity.rb +72 -0
  23. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/file.rb +33 -0
  24. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/group.rb +49 -0
  25. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/member.rb +25 -0
  26. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/node.rb +20 -0
  27. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/nodes_set.rb +118 -0
  28. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/project.rb +65 -0
  29. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api/root.rb +30 -0
  30. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/api.rb +43 -0
  31. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/application_scms/base.rb +13 -0
  32. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/application_scms.rb +11 -0
  33. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/instances/base.rb +18 -0
  34. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0/version.rb +7 -0
  35. data/sub/avm-eac_gitlab_base0/lib/avm/eac_gitlab_base0.rb +9 -0
  36. data/sub/avm-eac_gitlab_base0/spec/lib/avm/eac_gitlab_base0/application_scms/base_spec.rb +7 -0
  37. data/sub/avm-eac_gitlab_base0/spec/rubocop_spec.rb +3 -0
  38. data/sub/avm-eac_gitlab_base0/spec/spec_helper.rb +4 -0
  39. data/sub/avm-eac_rails_base0/Gemfile +2 -2
  40. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +4 -3
  41. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/deploy.rb +2 -2
  42. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  43. data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_host_spec.rb +3 -3
  44. data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_path_spec.rb +4 -4
  45. data/sub/avm-eac_rails_base0/spec/rubocop_spec.rb +1 -1
  46. data/sub/avm-eac_rails_base0/spec/spec_helper.rb +2 -2
  47. data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/application.rb +1 -1
  48. data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/puma.rb +4 -4
  49. data/sub/avm-eac_rails_base1/Gemfile +2 -2
  50. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +5 -4
  51. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +5 -0
  52. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/deploy.rb +23 -0
  53. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler/systemd_unit.rb +1 -1
  54. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb +2 -2
  55. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  56. data/sub/avm-eac_rails_base1/spec/rubocop_spec.rb +1 -1
  57. data/sub/avm-eac_rails_base1/spec/spec_helper.rb +1 -1
  58. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
  59. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +2 -2
  60. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  61. data/sub/avm-eac_ruby_base1/Gemfile +2 -2
  62. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +3 -2
  63. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/build.rb +2 -2
  64. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +1 -1
  65. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +2 -1
  66. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec.rb +1 -1
  67. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/options.rb +3 -3
  68. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base.rb +2 -2
  69. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +9 -0
  70. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/namespace_replacer.rb +1 -1
  71. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb +3 -4
  72. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb +1 -1
  73. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple/decorated_gem.rb +2 -2
  74. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update_dependency_requirements.rb +1 -1
  75. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  76. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec.rb +1 -1
  77. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec.rb +1 -1
  78. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/Gemfile.target +0 -2
  79. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/ruby_code.rb.target +0 -2
  80. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/build_spec.rb +9 -9
  81. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/specification_spec.rb +3 -3
  82. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish_spec.rb +2 -2
  83. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base_spec.rb +3 -3
  84. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/preferred_version_requirements_spec.rb +1 -1
  85. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec.rb +3 -3
  86. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb +9 -9
  87. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec.rb +1 -1
  88. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/dashed-mygem.gemspec +1 -0
  89. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/mygem.gemspec +1 -0
  90. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec.rb +8 -2
  91. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/mygem.gemspec +1 -0
  92. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base_spec.rb +2 -2
  93. data/sub/avm-eac_ruby_base1/spec/rubocop_spec.rb +1 -1
  94. data/sub/avm-eac_ruby_base1/spec/spec_helper.rb +2 -2
  95. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/gemspec.template +1 -0
  96. data/sub/avm-git/Gemfile +2 -2
  97. data/sub/avm-git/avm-git.gemspec +3 -4
  98. data/sub/avm-git/lib/avm/git/application_scms/base/assert_main_at.rb +49 -0
  99. data/sub/avm-git/lib/avm/git/application_scms/base.rb +21 -0
  100. data/sub/avm-git/lib/avm/git/application_scms.rb +11 -0
  101. data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +2 -2
  102. data/sub/avm-git/lib/avm/git/issue/complete/push.rb +2 -2
  103. data/sub/avm-git/lib/avm/git/issue.rb +1 -1
  104. data/sub/avm-git/lib/avm/git/launcher/base/dirty_files.rb +4 -4
  105. data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +1 -1
  106. data/sub/avm-git/lib/avm/git/launcher/base.rb +1 -0
  107. data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +1 -2
  108. data/sub/avm-git/lib/avm/git/launcher/remote.rb +2 -2
  109. data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +3 -2
  110. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +2 -2
  111. data/sub/avm-git/lib/avm/git/organize/repository.rb +1 -1
  112. data/sub/avm-git/lib/avm/git/revision_test.rb +2 -2
  113. data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +1 -0
  114. data/sub/avm-git/lib/avm/git/scms/git/commit.rb +1 -1
  115. data/sub/avm-git/lib/avm/git/scms/git/interval.rb +1 -1
  116. data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +1 -1
  117. data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +1 -1
  118. data/sub/avm-git/lib/avm/git/subrepo_checks.rb +1 -0
  119. data/sub/avm-git/lib/avm/git/version.rb +1 -1
  120. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec.rb +2 -2
  121. data/sub/avm-git/spec/lib/avm/git/commit_spec.rb +4 -4
  122. data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +10 -10
  123. data/sub/avm-git/spec/lib/avm/git/scms/git/commit/deploy_spec.rb +11 -11
  124. data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +1 -1
  125. data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +1 -1
  126. data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +3 -3
  127. data/sub/avm-git/spec/rubocop_spec.rb +1 -1
  128. data/sub/avm-git/spec/spec_helper.rb +1 -1
  129. data/sub/avm-tools/avm-tools.gemspec +3 -3
  130. data/sub/avm-tools/lib/avm/tools/runner/application/info.rb +2 -1
  131. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  132. metadata +43 -49
  133. data/sub/avm-eac_github_base0/spec/avm/eac_github_base0/application_scms/base_spec.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90311d99a8fde34e9e085138cecf3eb3eaec19cd6db5df22b900ca73a058a568
4
- data.tar.gz: '082caa63292c671845f74e8a913054ad212894aa117ddc7d3f7cd2ff65885bdb'
3
+ metadata.gz: 0d2e685c6164fa7bbf8b6c8aff6f6b893482bb469306379210cc7d54d8ea3f05
4
+ data.tar.gz: acedb29f75ec68d89fe776ea05976050519ec549f9f328f4de56835109c32710
5
5
  SHA512:
6
- metadata.gz: 392a2ae0e2f9688a644ae606bd2b6e8c82e06a2aa0e9f30138972866f15f29dd045533b5ebd59303b2613ce43bebdfc3903535727a5e2f2b48c410c5a6b04168
7
- data.tar.gz: 99306a1b0f26497d5bebb657c766c912acc347be451a23eea152c0e73f9f5b9e1fe31c39dc1eed32faebbeebf1df39f6cf47d86759b26c902222b217c1c5743c
6
+ metadata.gz: eb5a6a90e7655ac953173526517d7de438f76f25d8f11f9ecc0a64d013d260311cb8779595a773416e22dd3fc6fbf01f0002eefbcaf7eaf0df874c38e140b186
7
+ data.tar.gz: 45a9f8b13ac0a309fe00568f4ee4911a84eb9d8a9caaac14c3412c02f489d8802ce82362e2c4fd9e742e260d2bf5cfc56e61e05010f833e8bb327a1d7b87aee3
data/Gemfile.lock CHANGED
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.79.0)
5
- avm (~> 0.81)
4
+ eac_tools (0.81.0)
5
+ avm (~> 0.82)
6
6
  avm-eac_asciidoctor_base0 (~> 0.19)
7
7
  avm-eac_generic_base0 (~> 0.12, >= 0.12.1)
8
- avm-eac_github_base0 (~> 0.2)
8
+ avm-eac_github_base0 (~> 0.3)
9
9
  avm-eac_latex_base0 (~> 0.3, >= 0.3.1)
10
10
  avm-eac_php_base0 (~> 0.4, >= 0.4.2)
11
11
  avm-eac_postgresql_base0 (~> 0.5, >= 0.5.2)
12
12
  avm-eac_python_base0 (~> 0.2, >= 0.2.1)
13
- avm-eac_rails_base0 (~> 0.10, >= 0.10.3)
14
- avm-eac_rails_base1 (~> 0.9, >= 0.9.3)
15
- avm-eac_redmine_base0 (~> 0.21, >= 0.21.2)
13
+ avm-eac_rails_base0 (~> 0.11)
14
+ avm-eac_rails_base1 (~> 0.10)
15
+ avm-eac_redmine_base0 (~> 0.22)
16
16
  avm-eac_redmine_plugin_base0 (~> 0.4)
17
- avm-eac_ruby_base1 (~> 0.32, >= 0.32.1)
17
+ avm-eac_ruby_base1 (~> 0.33)
18
18
  avm-eac_webapp_base0 (~> 0.18, >= 0.18.2)
19
19
  avm-eac_wordpress_base0 (~> 0.3, >= 0.3.1)
20
- avm-git (~> 0.13, >= 0.13.4)
21
- avm-tools (~> 0.157)
20
+ avm-git (~> 0.14)
21
+ avm-tools (~> 0.158)
22
22
  eac_ruby_utils (~> 0.119, >= 0.119.2)
23
23
 
24
24
  PATH
@@ -41,11 +41,19 @@ PATH
41
41
  PATH
42
42
  remote: sub/avm-eac_github_base0
43
43
  specs:
44
- avm-eac_github_base0 (0.2.0)
45
- avm (~> 0.81)
44
+ avm-eac_github_base0 (0.3.0)
45
+ avm (~> 0.82)
46
+ avm-git (~> 0.14)
46
47
  eac_rest (~> 0.10)
47
48
  eac_ruby_utils (~> 0.119, >= 0.119.2)
48
49
 
50
+ PATH
51
+ remote: sub/avm-eac_gitlab_base0
52
+ specs:
53
+ avm-eac_gitlab_base0 (0.4.0)
54
+ avm-eac_github_base0 (~> 0.3)
55
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
56
+
49
57
  PATH
50
58
  remote: sub/avm-eac_latex_base0
51
59
  specs:
@@ -79,26 +87,26 @@ PATH
79
87
  PATH
80
88
  remote: sub/avm-eac_rails_base0
81
89
  specs:
82
- avm-eac_rails_base0 (0.10.3)
83
- avm-eac_rails_base1 (~> 0.9, >= 0.9.2)
84
- eac_ruby_utils (~> 0.119, >= 0.119.1)
90
+ avm-eac_rails_base0 (0.11.0)
91
+ avm-eac_rails_base1 (~> 0.10)
92
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
85
93
 
86
94
  PATH
87
95
  remote: sub/avm-eac_rails_base1
88
96
  specs:
89
- avm-eac_rails_base1 (0.9.3)
90
- avm (~> 0.79)
91
- avm-eac_ruby_base1 (~> 0.31, >= 0.31.1)
97
+ avm-eac_rails_base1 (0.10.0)
98
+ avm (~> 0.81)
99
+ avm-eac_ruby_base1 (~> 0.33)
92
100
  avm-eac_webapp_base0 (~> 0.18, >= 0.18.2)
93
- eac_ruby_utils (~> 0.119, >= 0.119.1)
101
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
94
102
 
95
103
  PATH
96
104
  remote: sub/avm-eac_redmine_base0
97
105
  specs:
98
- avm-eac_redmine_base0 (0.21.2)
106
+ avm-eac_redmine_base0 (0.22.0)
99
107
  avm (~> 0.81)
100
108
  avm-eac_generic_base0 (~> 0.12, >= 0.12.1)
101
- avm-eac_rails_base1 (~> 0.9, >= 0.9.3)
109
+ avm-eac_rails_base1 (~> 0.10)
102
110
  avm-eac_ubuntu_base0 (~> 0.5)
103
111
  curb (~> 0.9, >= 0.9.11)
104
112
  eac_fs (~> 0.16)
@@ -115,9 +123,9 @@ PATH
115
123
  PATH
116
124
  remote: sub/avm-eac_ruby_base1
117
125
  specs:
118
- avm-eac_ruby_base1 (0.32.1)
126
+ avm-eac_ruby_base1 (0.33.0)
119
127
  aranha-parsers (~> 0.21)
120
- avm (~> 0.80)
128
+ avm (~> 0.81)
121
129
  avm-eac_generic_base0 (~> 0.12, >= 0.12.1)
122
130
  eac_envs-http (~> 0.4, >= 0.4.1)
123
131
  eac_ruby_utils (~> 0.119, >= 0.119.2)
@@ -162,23 +170,23 @@ PATH
162
170
  PATH
163
171
  remote: sub/avm-git
164
172
  specs:
165
- avm-git (0.13.4)
166
- avm (~> 0.79)
173
+ avm-git (0.14.0)
174
+ avm (~> 0.82)
167
175
  avm-files (~> 0.6, >= 0.6.2)
168
176
  eac_git (~> 0.14, >= 0.14.1)
169
- eac_ruby_utils (~> 0.119, >= 0.119.1)
177
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
170
178
  git (~> 1.18)
171
179
 
172
180
  PATH
173
181
  remote: sub/avm-tools
174
182
  specs:
175
- avm-tools (0.157.0)
183
+ avm-tools (0.158.0)
176
184
  aranha-parsers (~> 0.21)
177
- avm (~> 0.81)
178
- avm-eac_ruby_base1 (~> 0.32, >= 0.32.1)
185
+ avm (~> 0.82)
186
+ avm-eac_ruby_base1 (~> 0.33)
179
187
  avm-eac_ubuntu_base0 (~> 0.5)
180
188
  avm-files (~> 0.6, >= 0.6.2)
181
- avm-git (~> 0.13, >= 0.13.4)
189
+ avm-git (~> 0.14)
182
190
  clipboard (~> 1.3, >= 1.3.6)
183
191
  curb (~> 0.9, >= 0.9.11)
184
192
  eac_git (~> 0.14, >= 0.14.1)
@@ -190,7 +198,7 @@ PATH
190
198
  PATH
191
199
  remote: sub/avm
192
200
  specs:
193
- avm (0.81.0)
201
+ avm (0.82.0)
194
202
  aranha-parsers (~> 0.21)
195
203
  eac_cli (~> 0.38)
196
204
  eac_config (~> 0.14, >= 0.14.1)
@@ -332,7 +340,7 @@ GEM
332
340
  racc
333
341
  parslet (2.0.0)
334
342
  public_suffix (5.0.3)
335
- racc (1.7.1)
343
+ racc (1.7.3)
336
344
  rack (3.0.8)
337
345
  rainbow (3.1.1)
338
346
  rchardet (1.8.0)
@@ -394,6 +402,7 @@ DEPENDENCIES
394
402
  avm-eac_asciidoctor_base0!
395
403
  avm-eac_generic_base0!
396
404
  avm-eac_github_base0!
405
+ avm-eac_gitlab_base0!
397
406
  avm-eac_latex_base0!
398
407
  avm-eac_php_base0!
399
408
  avm-eac_postgresql_base0!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.79.0'
4
+ VERSION = '0.81.0'
5
5
  end
@@ -5,6 +5,8 @@ require 'eac_ruby_utils/core_ext'
5
5
  module Avm
6
6
  module ApplicationScms
7
7
  class Base
8
+ acts_as_abstract
9
+
8
10
  class << self
9
11
  # @return [String]
10
12
  def type_name
@@ -12,16 +14,25 @@ module Avm
12
14
  end
13
15
  end
14
16
 
15
- # !method initialize(url)
16
- # @param url [Addressable::URI]
17
- common_constructor :url do
18
- self.url = url.to_uri
19
- end
17
+ # !method initialize(application)
18
+ # @param application [Avm::Application::Base]
19
+ common_constructor :application
20
20
  delegate :type_name, to: :class
21
21
 
22
+ # @param path [Pathname]
23
+ # @return [Pathname]
24
+ def assert_main_at(path) # rubocop:disable Lint/UnusedMethodArgument
25
+ raise_abstract_method __method__
26
+ end
27
+
22
28
  # @return [String]
23
29
  def to_s
24
- "#{type_name}[#{url}]"
30
+ "#{type_name}[#{to_s_type_specific}]"
31
+ end
32
+
33
+ # @return [String]
34
+ def to_s_type_specific
35
+ ''
25
36
  end
26
37
  end
27
38
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_fs/core_ext'
4
+
5
+ module Avm
6
+ module Applications
7
+ class Base
8
+ class AutoLocalSourcePath
9
+ acts_as_instance_method
10
+ common_constructor :application
11
+
12
+ # @return [Pathname]
13
+ def result
14
+ application.scm.assert_main_at(fs_cache.path.to_pathname)
15
+ end
16
+
17
+ # @return [String]
18
+ def fs_object_id
19
+ application.id.to_s.parameterize
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -10,7 +10,7 @@ module Avm
10
10
  module LocalSource
11
11
  # @return [Pathname]
12
12
  def local_source_path
13
- local_source_path_entry.value!.to_pathname
13
+ (local_source_path_entry.value || auto_local_source_path).to_pathname
14
14
  end
15
15
 
16
16
  # @return [EacConfig::Entry]
@@ -8,12 +8,12 @@ module Avm
8
8
  class Base
9
9
  module Scm
10
10
  common_concern do
11
- uri_components_entries_values 'scm', %w[repos_path type]
11
+ uri_components_entries_values 'scm', %w[repos_path ssh_username type]
12
12
  end
13
13
 
14
14
  # @return [Avm::ApplicationScms::Base]
15
15
  def scm
16
- @scm ||= ::Avm::Registry.application_scms.detect(scm_type, scm_url)
16
+ @scm ||= ::Avm::Registry.application_scms.detect(self)
17
17
  end
18
18
 
19
19
  # @param value [String]
@@ -6,9 +6,9 @@ module Avm
6
6
  module Registry
7
7
  class ApplicationScms < ::Avm::Registry::FromGems
8
8
  def class_detect(klass, detect_args)
9
- return nil unless klass.type_name == detect_args[0]
9
+ return nil unless klass.type_name == detect_args.fetch(0).scm_type
10
10
 
11
- klass.new(*detect_args[1..-1])
11
+ klass.new(*detect_args)
12
12
  end
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.81.0'
4
+ VERSION = '0.82.0'
5
5
  end
@@ -10,7 +10,8 @@ RSpec.describe ::Avm::Applications::Base do
10
10
  'scm.id' => 'app1',
11
11
  'scm.type' => 'ScmX',
12
12
  'scm.url' => 'http://nowhere.net/anypath',
13
- 'scm.repos_path' => 'mygroup/app0'
13
+ 'scm.repos_path' => 'mygroup/app0',
14
+ 'scm.ssh_username' => 'myuser'
14
15
  },
15
16
  'app1' => {
16
17
  'name' => nil,
@@ -18,7 +19,8 @@ RSpec.describe ::Avm::Applications::Base do
18
19
  'scm.id' => nil,
19
20
  'scm.type' => 'ScmX',
20
21
  'scm.url' => 'http://nowhere.net/anypath',
21
- 'scm.repos_path' => 'mygroup'
22
+ 'scm.repos_path' => 'mygroup',
23
+ 'scm.ssh_username' => 'myuser'
22
24
  }
23
25
  }
24
26
 
@@ -9,3 +9,4 @@ app1:
9
9
  url: http://nowhere.net/anypath
10
10
  type: ScmX
11
11
  repos_path: mygroup
12
+ ssh_username: myuser
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
- eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
7
+ local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if File.exist?(local_gemfile)
@@ -13,9 +13,10 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib}/**/*']
14
14
  s.required_ruby_version = '>= 2.7'
15
15
 
16
- s.add_dependency 'avm', '~> 0.81'
16
+ s.add_dependency 'avm', '~> 0.82'
17
+ s.add_dependency 'avm-git', '~> 0.14'
17
18
  s.add_dependency 'eac_rest', '~> 0.10'
18
19
  s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.2'
19
20
 
20
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.8', '>= 0.8.2'
21
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.9'
21
22
  end
@@ -13,7 +13,7 @@ module Avm
13
13
  while url_suffix.present?
14
14
  response = api.request_json(url_suffix).response
15
15
  r += response.body_data_or_raise
16
- .map { |child_data| child_entity(entity_class, child_data) }
16
+ .map { |child_data| child_entity(entity_class, child_data) }
17
17
  url_suffix = response.link('next')
18
18
  end
19
19
  r
@@ -1,12 +1,40 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/application_scms/base'
3
+ require 'avm/git/application_scms/base'
4
4
  require 'eac_ruby_utils/core_ext'
5
5
 
6
6
  module Avm
7
7
  module EacGithubBase0
8
8
  module ApplicationScms
9
- class Base < ::Avm::ApplicationScms::Base
9
+ class Base < ::Avm::Git::ApplicationScms::Base
10
+ REPOSITORY_URL_SUFFIX = '.git'
11
+
12
+ # @return [Addressable::URI]
13
+ def git_https_url
14
+ r = web_url.dup
15
+ r.path = "#{r.path}#{REPOSITORY_URL_SUFFIX}"
16
+ r
17
+ end
18
+
19
+ # @return [Addressable::URI]
20
+ def git_ssh_url
21
+ ::Addressable::URI.new(
22
+ scheme: 'ssh',
23
+ user: application.scm_ssh_username,
24
+ host: web_url.host,
25
+ path: "#{application.scm_repos_path}#{REPOSITORY_URL_SUFFIX}"
26
+ )
27
+ end
28
+
29
+ # @return [String]
30
+ def to_s_type_specific
31
+ web_url.to_s
32
+ end
33
+
34
+ # @return [Addressable::URI]
35
+ def web_url
36
+ application.scm_url.to_uri + application.scm_repos_path.to_s
37
+ end
10
38
  end
11
39
  end
12
40
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacGithubBase0
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_github_base0/application_scms/base'
4
+
5
+ RSpec.describe Avm::EacGithubBase0::ApplicationScms::Base do
6
+ let(:stub_application) do
7
+ {
8
+ scm_url: 'https://github.com'.to_uri,
9
+ scm_repos_path: 'esquilo-azul/eac_tools'.to_pathname,
10
+ scm_ssh_username: 'git'
11
+ }.to_struct
12
+ end
13
+ let(:instance) { described_class.new(stub_application) }
14
+
15
+ include_examples 'in_avm_registry', 'application_scms'
16
+
17
+ describe '#git_https_url' do
18
+ it do
19
+ expect(instance.git_https_url).to(
20
+ eq(Addressable::URI.parse('https://github.com/esquilo-azul/eac_tools.git'))
21
+ )
22
+ end
23
+ end
24
+
25
+ describe '#git_ssh_url' do
26
+ it do
27
+ expect(instance.git_ssh_url).to(
28
+ eq(Addressable::URI.parse('ssh://git@github.com/esquilo-azul/eac_tools.git'))
29
+ )
30
+ end
31
+ end
32
+
33
+ describe '#web_url' do
34
+ it do
35
+ expect(instance.web_url).to(
36
+ eq(Addressable::URI.parse('https://github.com/esquilo-azul/eac_tools'))
37
+ )
38
+ end
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::EacRubyUtils::Rspec.default_setup.describe_rubocop
3
+ EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/rspec/default_setup'
4
- ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
4
+ EacRubyUtils::Rspec.default_setup_create(File.expand_path('..', __dir__))
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if File.exist?(local_gemfile)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ require 'avm/eac_gitlab_base0/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'avm-eac_gitlab_base0'
9
+ s.version = Avm::EacGitlabBase0::VERSION
10
+ s.authors = ['Put here the authors']
11
+ s.summary = 'Put here de description.'
12
+
13
+ s.files = Dir['{lib}/**/*']
14
+ s.required_ruby_version = '>= 2.7'
15
+
16
+ s.add_dependency 'avm-eac_github_base0', '~> 0.3'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.2'
18
+
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.9'
20
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_rest/api'
4
+ require 'eac_rest/entity'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacGitlabBase0
9
+ class Api < ::EacRest::Api
10
+ class BaseEntity < ::EacRest::Entity
11
+ enable_simple_cache
12
+
13
+ def delete(url_suffix)
14
+ api.request(url_suffix).verb(:delete).response.body_data
15
+ end
16
+
17
+ def encode_id(id)
18
+ return id if id.is_a?(::Integer)
19
+
20
+ ::CGI.escape(id.to_s)
21
+ end
22
+
23
+ def fetch_entity(suffix, klass, not_found_message = nil)
24
+ validate_response_data(
25
+ dump_response(api.request_json(suffix).response),
26
+ not_found_message
27
+ ).if_present { |v| klass.new(api, v) }
28
+ end
29
+
30
+ def fetch_entities(suffix, klass)
31
+ r = []
32
+ request = api.request_json(suffix)
33
+ while request
34
+ response = request.response
35
+ r += validate_response_data(response).map { |rr| klass.new(api, rr) }
36
+ request = response.link('next').if_present do |v|
37
+ api.request_json(v)
38
+ end
39
+ end
40
+ r
41
+ end
42
+
43
+ def dump_response(response)
44
+ basename = response.url.to_s.variableize[0..99]
45
+ { data: response.body_data, headers: response.headers, links: response.links }
46
+ .each { |part, value| dump_debug("#{basename}_#{part}", value) }
47
+ response
48
+ end
49
+
50
+ def dump_debug(basename, data)
51
+ file = ::Pathname.new('/tmp').join('gitlab_temp', "#{basename}.yaml")
52
+ file.parent.mkpath
53
+ ::EacRubyUtils::Yaml.dump_file(file, data)
54
+ end
55
+
56
+ def validate_response_data(response, not_found_message = nil)
57
+ if response.body_data.is_a?(::Hash)
58
+ response.body_data['error'].if_present do |v|
59
+ raise "URL: #{response.url}, Data: #{v}"
60
+ end
61
+
62
+ response.body_data['message'].if_present do |v|
63
+ return nil if v == not_found_message
64
+ end
65
+ end
66
+
67
+ response.body_data
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_gitlab_base0/api/base_entity'
4
+ require 'eac_rest/api'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacGitlabBase0
9
+ class Api < ::EacRest::Api
10
+ class File < ::Avm::EacGitlabBase0::Api::BaseEntity
11
+ FIELDS = %w[file_name file_path size encoding content_sha256 ref blob_id commit_id
12
+ last_commit_id].freeze
13
+
14
+ FIELDS.each do |field|
15
+ define_method field do
16
+ data.fetch(field)
17
+ end
18
+ end
19
+
20
+ def content
21
+ case encoding
22
+ when 'base64' then ::Base64.decode64(encoded_content)
23
+ else nyi("Unmapped encoding: #{encoding}")
24
+ end
25
+ end
26
+
27
+ def encoded_content
28
+ data.fetch('content')
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_gitlab_base0/api/node'
4
+ require 'avm/eac_gitlab_base0/api/project'
5
+ require 'eac_rest/api'
6
+ require 'eac_ruby_utils/core_ext'
7
+
8
+ module Avm
9
+ module EacGitlabBase0
10
+ class Api < ::EacRest::Api
11
+ class Group < ::Avm::EacGitlabBase0::Api::Node
12
+ FIELDS = %w[id web_url name path description visibility share_with_group_lock
13
+ require_two_factor_authentication two_factor_grace_period project_creation_level
14
+ auto_devops_enabled subgroup_creation_level emails_disabled lfs_enabled
15
+ avatar_url request_access_enabled full_name full_path parent_id].freeze
16
+
17
+ FIELDS.each do |field|
18
+ define_method field do
19
+ data.fetch(field)
20
+ end
21
+ end
22
+
23
+ def api_prefix
24
+ "/groups/#{encode_id(id)}"
25
+ end
26
+
27
+ def to_s
28
+ full_path
29
+ end
30
+
31
+ private
32
+
33
+ def members_uncached
34
+ fetch_entities(
35
+ "#{api_prefix}/members",
36
+ ::Avm::EacGitlabBase0::Api::Member
37
+ )
38
+ end
39
+
40
+ def projects_uncached
41
+ fetch_entities(
42
+ "#{api_prefix}/projects?order_by=path&sort=asc&per_page=9999",
43
+ ::Avm::EacGitlabBase0::Api::Project
44
+ )
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_gitlab_base0/api/base_entity'
4
+ require 'eac_rest/api'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacGitlabBase0
9
+ class Api < ::EacRest::Api
10
+ class Member < ::Avm::EacGitlabBase0::Api::BaseEntity
11
+ FIELDS = %w[id name username state avatar_url web_url access_level expires_at].freeze
12
+
13
+ FIELDS.each do |field|
14
+ define_method field do
15
+ data.fetch(field)
16
+ end
17
+ end
18
+
19
+ def to_s
20
+ [name, username, state, access_level].join(' / ')
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end