eac_tools 0.33.0 → 0.35.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +30 -24
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +1 -1
- data/sub/{avm-tools → avm}/lib/avm/launcher/context/instance_collector.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/context/instance_discovery.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/context/instance_manager/cached_instance.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/context/instance_manager/cached_instances.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/context/instance_manager.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/context/settings.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/context.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/instances/base/cache.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/instances/base.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/instances/error.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/instances/runner_helper.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/instances/settings.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/paths/logical.rb +0 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/publish/base.rb +2 -5
- data/sub/avm/lib/avm/registry.rb +0 -2
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb +21 -4
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock/git.rb +60 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock.rb +89 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +2 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-git/Gemfile +8 -0
- data/sub/avm-git/avm-git.gemspec +22 -0
- data/sub/avm-git/lib/avm/git/auto_commit/commit_info.rb +23 -0
- data/sub/avm-git/lib/avm/git/auto_commit/rules/base.rb +39 -0
- data/sub/avm-git/lib/avm/git/auto_commit/rules/last.rb +19 -0
- data/sub/avm-git/lib/avm/git/auto_commit/rules/manual.rb +45 -0
- data/sub/avm-git/lib/avm/git/auto_commit/rules/new.rb +24 -0
- data/sub/avm-git/lib/avm/git/auto_commit/rules/nth.rb +31 -0
- data/sub/avm-git/lib/avm/git/auto_commit/rules/unique.rb +21 -0
- data/sub/avm-git/lib/avm/git/auto_commit/rules.rb +31 -0
- data/sub/avm-git/lib/avm/git/auto_commit_path/ruby.rb +20 -0
- data/sub/avm-git/lib/avm/git/auto_commit_path.rb +28 -0
- data/sub/avm-git/lib/avm/git/commit/class_methods.rb +31 -0
- data/sub/avm-git/lib/avm/git/commit/deploy.rb +38 -0
- data/sub/avm-git/lib/avm/git/commit/deploy_methods.rb +19 -0
- data/sub/avm-git/lib/avm/git/commit/diff_tree_line.rb +32 -0
- data/sub/avm-git/lib/avm/git/commit/file.rb +46 -0
- data/sub/avm-git/lib/avm/git/commit.rb +59 -0
- data/sub/avm-git/lib/avm/git/file_auto_fixup.rb +83 -0
- data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +42 -0
- data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +23 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +61 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +39 -0
- data/sub/avm-git/lib/avm/git/issue/complete/push.rb +60 -0
- data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +33 -0
- data/sub/avm-git/lib/avm/git/issue/complete/test.rb +40 -0
- data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +28 -0
- data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +39 -0
- data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +53 -0
- data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +19 -0
- data/sub/avm-git/lib/avm/git/issue/complete.rb +66 -0
- data/sub/avm-git/lib/avm/git/issue/deliver.rb +56 -0
- data/sub/avm-git/lib/avm/git/issue.rb +11 -0
- data/sub/avm-git/lib/avm/git/organize/reference_update.rb +34 -0
- data/sub/avm-git/lib/avm/git/organize/repository.rb +76 -0
- data/sub/avm-git/lib/avm/git/organize.rb +11 -0
- data/sub/avm-git/lib/avm/git/revision_test.rb +105 -0
- data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +35 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit.rb +55 -0
- data/sub/avm-git/lib/avm/git/scms/git.rb +73 -0
- data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +39 -0
- data/sub/avm-git/lib/avm/git/scms/provider.rb +19 -0
- data/sub/avm-git/lib/avm/git/scms.rb +11 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +51 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +89 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +32 -0
- data/sub/avm-git/lib/avm/git/subrepo_check.rb +38 -0
- data/sub/avm-git/lib/avm/git/subrepo_checks.rb +59 -0
- data/sub/{avm-tools/lib/avm/launcher → avm-git/lib/avm/git}/vendor/github.rb +1 -1
- data/sub/avm-git/lib/avm/git/vendor.rb +11 -0
- data/sub/avm-git/lib/avm/git/version.rb +7 -0
- data/sub/avm-git/lib/avm/git.rb +11 -0
- data/sub/avm-git/spec/lib/avm/git/auto_commit_path_spec.rb +21 -0
- data/sub/avm-git/spec/lib/avm/git/commit/deploy_spec.rb +93 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec.rb +13 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +1 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +1 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +1 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +2 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
- data/sub/avm-git/spec/lib/avm/git/commit_spec.rb +56 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +8 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +8 -0
- data/sub/{avm-tools/spec/lib/avm/launcher → avm-git/spec/lib/avm/git}/vendor/github_spec.rb +4 -4
- data/sub/avm-git/spec/rubocop_spec.rb +3 -0
- data/sub/avm-git/spec/spec_helper.rb +4 -0
- data/sub/avm-tools/avm-tools.gemspec +3 -3
- data/sub/avm-tools/lib/avm/launcher/git/warp_base.rb +2 -2
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subrepo/warp.rb +2 -2
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/eac_docker/eac_docker.gemspec +2 -2
- data/sub/eac_docker/lib/eac_docker/images/templatized.rb +7 -1
- data/sub/eac_docker/lib/eac_docker/version.rb +1 -1
- metadata +101 -29
- data/sub/avm-tools/lib/avm/launcher/vendor.rb +0 -3
- data/sub/avm-tools/lib/avm/tools/runner/source/ruby/bundler/gemfile_lock/git.rb +0 -62
- data/sub/avm-tools/lib/avm/tools/runner/source/ruby/bundler/gemfile_lock.rb +0 -105
- data/sub/avm-tools/lib/avm/tools/runner/source/ruby/bundler.rb +0 -21
- data/sub/avm-tools/lib/avm/tools/runner/source/ruby.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e7be8c10a31eca92c292ca5a2aff340237809512a2477c04b9212b9a246264d
|
4
|
+
data.tar.gz: 7de8fb83e7fbc7583c0577e5de1a561952b17d1b2768951e6706f645933966bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71a2a76a1b55a74f18f7aa18db4b25c269c8ffff5e397669ff0d8782fe21db1269e2b571dbf1d7b2b0fa70a696e2cccbdf0921d57a329ff62a15de115d8d1bd4
|
7
|
+
data.tar.gz: f5a62fb8592908556546226ff6232eef6b8be3a7d72f87080dd2b31a38cfdb60c724069439037942549b72b319672ebd1af1e06bfb378d526f0a2014c1499318
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm (~> 0.
|
4
|
+
eac_tools (0.35.0)
|
5
|
+
avm (~> 0.46)
|
6
6
|
avm-eac_asciidoctor_base0 (~> 0.7, >= 0.7.1)
|
7
7
|
avm-eac_generic_base0 (~> 0.5)
|
8
8
|
avm-eac_latex_base0 (~> 0.2, >= 0.2.1)
|
@@ -10,10 +10,10 @@ PATH
|
|
10
10
|
avm-eac_rails_base1 (~> 0.7)
|
11
11
|
avm-eac_redmine_base0 (~> 0.16)
|
12
12
|
avm-eac_redmine_plugin_base0 (~> 0.3)
|
13
|
-
avm-eac_ruby_base1 (~> 0.
|
14
|
-
avm-eac_webapp_base0 (~> 0.9)
|
13
|
+
avm-eac_ruby_base1 (~> 0.22)
|
14
|
+
avm-eac_webapp_base0 (~> 0.9, >= 0.9.1)
|
15
15
|
avm-eac_wordpress_base0 (~> 0.2, >= 0.2.1)
|
16
|
-
avm-tools (~> 0.
|
16
|
+
avm-tools (~> 0.139)
|
17
17
|
eac_ruby_utils (~> 0.104)
|
18
18
|
|
19
19
|
PATH
|
@@ -80,16 +80,16 @@ PATH
|
|
80
80
|
PATH
|
81
81
|
remote: sub/avm-eac_ruby_base1
|
82
82
|
specs:
|
83
|
-
avm-eac_ruby_base1 (0.
|
84
|
-
avm (~> 0.
|
83
|
+
avm-eac_ruby_base1 (0.22.0)
|
84
|
+
avm (~> 0.45)
|
85
85
|
avm-eac_generic_base0 (~> 0.5)
|
86
|
-
eac_ruby_utils (~> 0.
|
86
|
+
eac_ruby_utils (~> 0.104)
|
87
87
|
|
88
88
|
PATH
|
89
89
|
remote: sub/avm-eac_webapp_base0
|
90
90
|
specs:
|
91
|
-
avm-eac_webapp_base0 (0.9.
|
92
|
-
avm (~> 0.
|
91
|
+
avm-eac_webapp_base0 (0.9.1)
|
92
|
+
avm (~> 0.46)
|
93
93
|
avm-eac_generic_base0 (~> 0.5)
|
94
94
|
avm-eac_postgresql_base0 (~> 0.2)
|
95
95
|
avm-eac_ubuntu_base0 (~> 0.3)
|
@@ -113,16 +113,25 @@ PATH
|
|
113
113
|
eac_ruby_utils (~> 0.103)
|
114
114
|
eac_templates (~> 0.3, >= 0.3.2)
|
115
115
|
|
116
|
+
PATH
|
117
|
+
remote: sub/avm-git
|
118
|
+
specs:
|
119
|
+
avm-git (0.5.0)
|
120
|
+
avm (~> 0.46)
|
121
|
+
avm-files (~> 0.4, >= 0.4.1)
|
122
|
+
eac_git (~> 0.12, >= 0.12.3)
|
123
|
+
eac_ruby_utils (~> 0.104)
|
124
|
+
|
116
125
|
PATH
|
117
126
|
remote: sub/avm-tools
|
118
127
|
specs:
|
119
|
-
avm-tools (0.
|
128
|
+
avm-tools (0.139.0)
|
120
129
|
aranha-parsers (~> 0.14, >= 0.14.3)
|
121
|
-
avm (~> 0.
|
122
|
-
avm-eac_ruby_base1 (~> 0.
|
130
|
+
avm (~> 0.46)
|
131
|
+
avm-eac_ruby_base1 (~> 0.22)
|
123
132
|
avm-eac_ubuntu_base0 (~> 0.3)
|
124
133
|
avm-files (~> 0.4, >= 0.4.1)
|
125
|
-
avm-git (~> 0.
|
134
|
+
avm-git (~> 0.5)
|
126
135
|
clipboard (~> 1.3, >= 1.3.6)
|
127
136
|
curb (~> 0.9, >= 0.9.11)
|
128
137
|
eac_git (~> 0.12, >= 0.12.3)
|
@@ -134,10 +143,10 @@ PATH
|
|
134
143
|
PATH
|
135
144
|
remote: sub/avm
|
136
145
|
specs:
|
137
|
-
avm (0.
|
146
|
+
avm (0.46.0)
|
138
147
|
eac_cli (~> 0.28)
|
139
148
|
eac_config (~> 0.11, >= 0.11.1)
|
140
|
-
eac_docker (~> 0.
|
149
|
+
eac_docker (~> 0.5)
|
141
150
|
eac_git (~> 0.12, >= 0.12.3)
|
142
151
|
eac_ruby_utils (~> 0.104)
|
143
152
|
eac_templates (~> 0.3, >= 0.3.2)
|
@@ -163,9 +172,9 @@ PATH
|
|
163
172
|
PATH
|
164
173
|
remote: sub/eac_docker
|
165
174
|
specs:
|
166
|
-
eac_docker (0.
|
167
|
-
eac_ruby_utils (~> 0.
|
168
|
-
eac_templates (~> 0.3, >= 0.3.
|
175
|
+
eac_docker (0.5.0)
|
176
|
+
eac_ruby_utils (~> 0.104)
|
177
|
+
eac_templates (~> 0.3, >= 0.3.2)
|
169
178
|
|
170
179
|
PATH
|
171
180
|
remote: sub/eac_fs
|
@@ -230,10 +239,6 @@ GEM
|
|
230
239
|
avm (~> 0.7)
|
231
240
|
eac_ruby_utils (~> 0.77, >= 0.77.1)
|
232
241
|
eac_templates (~> 0.3)
|
233
|
-
avm-git (0.4.0)
|
234
|
-
avm-files (~> 0.1)
|
235
|
-
eac_git (~> 0.11)
|
236
|
-
eac_ruby_utils (~> 0.76)
|
237
242
|
clipboard (1.3.6)
|
238
243
|
colorize (0.8.1)
|
239
244
|
concurrent-ruby (1.1.10)
|
@@ -342,7 +347,7 @@ GEM
|
|
342
347
|
tzinfo (2.0.5)
|
343
348
|
concurrent-ruby (~> 1.0)
|
344
349
|
unicode-display_width (1.6.1)
|
345
|
-
zeitwerk (2.6.
|
350
|
+
zeitwerk (2.6.1)
|
346
351
|
zlib (2.1.1)
|
347
352
|
|
348
353
|
PLATFORMS
|
@@ -361,6 +366,7 @@ DEPENDENCIES
|
|
361
366
|
avm-eac_webapp_base0!
|
362
367
|
avm-eac_wordpress_base0!
|
363
368
|
avm-files!
|
369
|
+
avm-git!
|
364
370
|
avm-tools!
|
365
371
|
eac_cli!
|
366
372
|
eac_config!
|
data/lib/eac_tools/version.rb
CHANGED
data/sub/avm/avm.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.add_dependency 'eac_cli', '~> 0.28'
|
16
16
|
s.add_dependency 'eac_config', '~> 0.11', '>= 0.11.1'
|
17
|
-
s.add_dependency 'eac_docker', '~> 0.
|
17
|
+
s.add_dependency 'eac_docker', '~> 0.5'
|
18
18
|
s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.3'
|
19
19
|
s.add_dependency 'eac_ruby_utils', '~> 0.104'
|
20
20
|
s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.2'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,16 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/launcher/errors/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
4
5
|
|
5
6
|
module Avm
|
6
7
|
module Launcher
|
7
8
|
module Publish
|
8
9
|
class Base
|
9
|
-
|
10
|
-
|
11
|
-
def initialize(instance)
|
12
|
-
@instance = instance
|
13
|
-
end
|
10
|
+
common_constructor :instance
|
14
11
|
|
15
12
|
def run
|
16
13
|
s = check
|
data/sub/avm/lib/avm/registry.rb
CHANGED
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,locale,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.45'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.104'
|
18
18
|
|
19
19
|
s.add_development_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
|
20
20
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
@@ -29,17 +29,34 @@ module Avm
|
|
29
29
|
siblings.map { |s| sibling_gemfile_local_line(s) }.join
|
30
30
|
end
|
31
31
|
|
32
|
+
def on_unexisting_gemfile_local
|
33
|
+
return yield unless gemfile_local_path.exist?
|
34
|
+
|
35
|
+
::EacRubyUtils::Fs::Temp.on_file do |temp_file|
|
36
|
+
::FileUtils.cp(gemfile_local_path, temp_file)
|
37
|
+
begin
|
38
|
+
::FileUtils.rm_f(gemfile_local_path)
|
39
|
+
yield
|
40
|
+
ensure
|
41
|
+
::FileUtils.cp(temp_file, gemfile_local_path)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
32
46
|
def run_bundle
|
33
|
-
|
34
|
-
|
35
|
-
|
47
|
+
on_unexisting_gemfile_local do
|
48
|
+
the_source.bundle.execute!
|
49
|
+
rescue ::RuntimeError
|
50
|
+
the_source.bundle('update').execute!
|
51
|
+
end
|
36
52
|
end
|
37
53
|
|
38
54
|
def sibling_gemfile_local_line(sibling)
|
39
55
|
["gem '#{sibling.gem_name}'",
|
40
56
|
"path: ::File.expand_path('" +
|
41
57
|
sibling.path.relative_path_from(the_source.path).to_path +
|
42
|
-
"', __dir__)"
|
58
|
+
"', __dir__)",
|
59
|
+
'require: false'].join(', ') + "\n"
|
43
60
|
end
|
44
61
|
|
45
62
|
def start_banner
|
data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock/git.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacRubyBase1
|
7
|
+
module Sources
|
8
|
+
module Runners
|
9
|
+
class Bundler
|
10
|
+
class GemfileLock
|
11
|
+
module Git
|
12
|
+
private
|
13
|
+
|
14
|
+
def git_continue
|
15
|
+
infom "Adding \"#{gemfile_lock}\"..."
|
16
|
+
git_repo.command('add', gemfile_lock).execute!
|
17
|
+
if rebase_conflict?
|
18
|
+
git_continue_run('rebase')
|
19
|
+
elsif cherry_conflict?
|
20
|
+
git_continue_run('cherry-pick')
|
21
|
+
else
|
22
|
+
raise 'Unknown how to continue'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def git_continue_run(command)
|
27
|
+
infom "\"#{command}\" --continue..."
|
28
|
+
cmd = git_repo.command(command, '--continue')
|
29
|
+
.envvar('GIT_EDITOR', 'true')
|
30
|
+
return unless !cmd.system && !conflict?
|
31
|
+
|
32
|
+
fatal_error "\"#{cmd}\" failed and there is no conflict"
|
33
|
+
end
|
34
|
+
|
35
|
+
def git_repo
|
36
|
+
instance.scm.git_repo
|
37
|
+
end
|
38
|
+
|
39
|
+
def git_reset_checkout
|
40
|
+
git_reset_gemfile_lock
|
41
|
+
git_checkout_gemfile_lock
|
42
|
+
end
|
43
|
+
|
44
|
+
def git_checkout_gemfile_lock
|
45
|
+
infom 'Checkouting...'
|
46
|
+
git_repo.command('checkout', '--', gemfile_lock).system!
|
47
|
+
end
|
48
|
+
|
49
|
+
def git_reset_gemfile_lock
|
50
|
+
infom 'Reseting...'
|
51
|
+
git_repo.command('reset', gemfile_lock).system! if
|
52
|
+
::File.exist?(gemfile_lock)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacRubyBase1
|
7
|
+
module Sources
|
8
|
+
module Runners
|
9
|
+
class Bundler
|
10
|
+
class GemfileLock
|
11
|
+
require_sub __FILE__, include_modules: true
|
12
|
+
runner_with :help do
|
13
|
+
desc 'Manipulage a "Gemfile.lock" file.'
|
14
|
+
bool_opt '-c', '--continue', 'Continue Git rebase/cherry-pick.'
|
15
|
+
bool_opt '-i', '--install', 'Run "bundle install".'
|
16
|
+
bool_opt '-u', '--update', 'Run "bundle update".'
|
17
|
+
bool_opt '-r', '--recursive', 'Run until Git rebase/cherry-pick is finished.'
|
18
|
+
bool_opt '-a', '--all', 'Same as "-cirud".'
|
19
|
+
bool_opt '-d', '--delete', 'Delete Gemfile.lock'
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
loop do
|
24
|
+
git_reset_checkout
|
25
|
+
delete_gemfile_lock
|
26
|
+
bundle_update
|
27
|
+
bundle_install
|
28
|
+
git_continue
|
29
|
+
break if complete?
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def complete?
|
36
|
+
!option_or_all?(:recursive) || !conflict?
|
37
|
+
end
|
38
|
+
|
39
|
+
def delete_gemfile_lock
|
40
|
+
::FileUtils.rm_f(gemfile_lock)
|
41
|
+
end
|
42
|
+
|
43
|
+
def rebasing?
|
44
|
+
git_repo.root_path.join('.git', 'rebase-merge').exist?
|
45
|
+
end
|
46
|
+
|
47
|
+
def bundle_install
|
48
|
+
infom '"bundle install"...'
|
49
|
+
bundle_run('install')
|
50
|
+
end
|
51
|
+
|
52
|
+
def bundle_update
|
53
|
+
infom '"bundle update"...'
|
54
|
+
bundle_run('update')
|
55
|
+
end
|
56
|
+
|
57
|
+
def gemfile_lock
|
58
|
+
'Gemfile.lock'
|
59
|
+
end
|
60
|
+
|
61
|
+
def bundle_run(*args)
|
62
|
+
instance.bundle(*args).system!
|
63
|
+
end
|
64
|
+
|
65
|
+
def conflict?
|
66
|
+
rebase_conflict? || cherry_conflict?
|
67
|
+
end
|
68
|
+
|
69
|
+
def rebase_conflict?
|
70
|
+
git_repo.root_path.join('.git', 'REBASE_HEAD').exist?
|
71
|
+
end
|
72
|
+
|
73
|
+
def cherry_conflict?
|
74
|
+
git_repo.root_path.join('.git', 'CHERRY_PICK_HEAD').exist?
|
75
|
+
end
|
76
|
+
|
77
|
+
def option_or_all?(option)
|
78
|
+
parsed[option] || parsed.all?
|
79
|
+
end
|
80
|
+
|
81
|
+
def instance
|
82
|
+
runner_context.call(:subject)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.46'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
|
17
17
|
s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2'
|
18
18
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
|
@@ -15,7 +15,8 @@ module Avm
|
|
15
15
|
include ::Avm::Entries::Jobs::Base
|
16
16
|
|
17
17
|
def directory_extra_config
|
18
|
-
instance.entry(APACHE_DIRECTORY_EXTRA_CONFIG_KEY).
|
18
|
+
instance.entry(APACHE_DIRECTORY_EXTRA_CONFIG_KEY).optional_value
|
19
|
+
.if_present { |v| " #{v}\n" }
|
19
20
|
end
|
20
21
|
|
21
22
|
def no_ssl_site_content
|
data/sub/avm-git/Gemfile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'avm/git/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'avm-git'
|
9
|
+
s.version = Avm::Git::VERSION
|
10
|
+
s.authors = ['Put here the authors']
|
11
|
+
s.summary = 'Put here de description.'
|
12
|
+
|
13
|
+
s.files = Dir['{lib}/**/*']
|
14
|
+
|
15
|
+
s.add_dependency 'avm', '~> 0.46'
|
16
|
+
s.add_dependency 'avm-files', '~> 0.4', '>= 0.4.1'
|
17
|
+
s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.3'
|
18
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.104'
|
19
|
+
|
20
|
+
s.add_development_dependency 'aranha-parsers', '~> 0.8', '>= 0.8.5'
|
21
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
22
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Git
|
7
|
+
module AutoCommit
|
8
|
+
class CommitInfo
|
9
|
+
enable_immutable
|
10
|
+
|
11
|
+
immutable_accessor :fixup, :message
|
12
|
+
|
13
|
+
def git_commit_args
|
14
|
+
r = fixup.if_present([]) { |v| ['--fixup', v.sha1] }
|
15
|
+
r += message.if_present([]) { |v| ['--message', v] }
|
16
|
+
return r if r.any?
|
17
|
+
|
18
|
+
raise 'Argument list is empty'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Git
|
7
|
+
module AutoCommit
|
8
|
+
module Rules
|
9
|
+
class Base
|
10
|
+
class << self
|
11
|
+
def keys
|
12
|
+
[long_key, short_key]
|
13
|
+
end
|
14
|
+
|
15
|
+
def long_key
|
16
|
+
name.demodulize.variableize
|
17
|
+
end
|
18
|
+
|
19
|
+
def short_key
|
20
|
+
long_key[0, 1]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def with_file(file)
|
25
|
+
self.class.const_get('WithFile').new(self, file)
|
26
|
+
end
|
27
|
+
|
28
|
+
class WithFile
|
29
|
+
common_constructor :rule, :file
|
30
|
+
|
31
|
+
def new_commit_info
|
32
|
+
::Avm::Git::AutoCommit::CommitInfo.new
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/git/auto_commit/rules/base'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Git
|
7
|
+
module AutoCommit
|
8
|
+
module Rules
|
9
|
+
class Last < ::Avm::Git::AutoCommit::Rules::Base
|
10
|
+
class WithFile < ::Avm::Git::AutoCommit::Rules::Base::WithFile
|
11
|
+
def commit_info
|
12
|
+
file.commits.last.if_present { |v| new_commit_info.fixup(v) }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/git/auto_commit/rules/base'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Git
|
7
|
+
module AutoCommit
|
8
|
+
module Rules
|
9
|
+
class Manual < ::Avm::Git::AutoCommit::Rules::Base
|
10
|
+
class WithFile < ::Avm::Git::AutoCommit::Rules::Base::WithFile
|
11
|
+
enable_speaker
|
12
|
+
|
13
|
+
COMMIT_FORMAT = '%h - %s (%cr)'
|
14
|
+
SKIP_OPTION = 's'
|
15
|
+
|
16
|
+
def commit_info
|
17
|
+
return nil unless file.commits.any?
|
18
|
+
|
19
|
+
commits_banner
|
20
|
+
input('Which commit?', list: commits_by_position).if_present do |v|
|
21
|
+
new_commit_info.fixup(v)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def commits_banner
|
26
|
+
file.commits.each_with_index do |commit, _index|
|
27
|
+
infov " #{commit.position}", format_commit(commit)
|
28
|
+
end
|
29
|
+
infov " #{SKIP_OPTION}", 'skip'
|
30
|
+
end
|
31
|
+
|
32
|
+
def commits_by_position
|
33
|
+
(file.commits.map { |commit| [commit.position.to_s, commit] } + [[SKIP_OPTION, nil]])
|
34
|
+
.to_h
|
35
|
+
end
|
36
|
+
|
37
|
+
def format_commit(commit)
|
38
|
+
commit.format(COMMIT_FORMAT)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/git/auto_commit/rules/base'
|
4
|
+
require 'avm/git/auto_commit_path'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module AutoCommit
|
9
|
+
module Rules
|
10
|
+
class New < ::Avm::Git::AutoCommit::Rules::Base
|
11
|
+
class WithFile < ::Avm::Git::AutoCommit::Rules::Base::WithFile
|
12
|
+
def auto_commit_path
|
13
|
+
::Avm::Git::AutoCommitPath.new(file.git, file.path)
|
14
|
+
end
|
15
|
+
|
16
|
+
def commit_info
|
17
|
+
new_commit_info.message(auto_commit_path.commit_message)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|