avm-tools 0.45.0 → 0.50.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/git/issue/complete.rb +1 -1
- data/lib/avm/git/issue/complete/_test.rb +16 -2
- data/lib/avm/git/issue/complete/_validations.rb +9 -14
- data/lib/avm/git/issue/complete/validation.rb +31 -0
- data/lib/avm/git/revision_test.rb +2 -2
- data/lib/avm/instances/configuration/_tests.rb +14 -0
- data/lib/avm/rails.rb +9 -0
- data/lib/avm/rails/runners.rb +11 -0
- data/lib/avm/rails/runners/bundle.rb +35 -0
- data/lib/avm/rails/runners/runner.rb +48 -0
- data/lib/avm/ruby.rb +0 -20
- data/lib/avm/stereotypes/eac_redmine_base0/deploy.rb +2 -2
- data/lib/avm/stereotypes/eac_webapp_base0/instance.rb +3 -3
- data/lib/avm/tools/runner/eac_rails_base0/bundle.rb +14 -0
- data/lib/avm/tools/runner/eac_rails_base0/runner.rb +14 -0
- data/lib/avm/tools/runner/eac_redmine_base0/bundle.rb +2 -24
- data/lib/avm/tools/runner/eac_redmine_base0/runner.rb +14 -0
- data/lib/avm/tools/runner/files/format.rb +1 -1
- data/lib/avm/tools/runner/git.rb +1 -1
- data/lib/avm/tools/runner/launcher.rb +12 -0
- data/lib/avm/tools/version.rb +1 -1
- data/lib/eac_launcher.rb +17 -0
- data/lib/eac_launcher/context.rb +81 -0
- data/lib/eac_launcher/context/instance_discovery.rb +54 -0
- data/lib/eac_launcher/context/instance_manager.rb +94 -0
- data/lib/eac_launcher/context/settings.rb +51 -0
- data/lib/eac_launcher/git.rb +7 -0
- data/lib/eac_launcher/git/base.rb +100 -0
- data/lib/eac_launcher/git/base/class_methods.rb +26 -0
- data/lib/eac_launcher/git/base/dirty_files.rb +30 -0
- data/lib/eac_launcher/git/base/remotes.rb +38 -0
- data/lib/eac_launcher/git/base/subrepo.rb +42 -0
- data/lib/eac_launcher/git/base/underlying.rb +59 -0
- data/lib/eac_launcher/git/error.rb +11 -0
- data/lib/eac_launcher/git/mirror_update.rb +36 -0
- data/lib/eac_launcher/git/publish_base.rb +118 -0
- data/lib/eac_launcher/git/remote.rb +53 -0
- data/lib/eac_launcher/git/sub_warp_base.rb +30 -0
- data/lib/eac_launcher/git/warp_base.rb +54 -0
- data/lib/eac_launcher/instances.rb +6 -0
- data/lib/eac_launcher/instances/base.rb +91 -0
- data/lib/eac_launcher/instances/base/cache.rb +41 -0
- data/lib/eac_launcher/instances/error.rb +8 -0
- data/lib/eac_launcher/instances/runner_helper.rb +42 -0
- data/lib/eac_launcher/instances/settings.rb +23 -0
- data/lib/eac_launcher/paths.rb +4 -0
- data/lib/eac_launcher/paths/logical.rb +80 -0
- data/lib/eac_launcher/paths/real.rb +42 -0
- data/lib/eac_launcher/project.rb +16 -0
- data/lib/eac_launcher/publish.rb +4 -0
- data/lib/eac_launcher/publish/base.rb +45 -0
- data/lib/eac_launcher/publish/check_result.rb +65 -0
- data/lib/eac_launcher/ruby.rb +3 -0
- data/lib/eac_launcher/ruby/gem.rb +4 -0
- data/lib/eac_launcher/ruby/gem/build.rb +123 -0
- data/lib/eac_launcher/ruby/gem/specification.rb +61 -0
- data/lib/eac_launcher/runner.rb +21 -0
- data/lib/eac_launcher/runner/instances.rb +41 -0
- data/lib/eac_launcher/runner/projects.rb +46 -0
- data/lib/eac_launcher/runner/publish.rb +59 -0
- data/lib/eac_launcher/stereotype.rb +52 -0
- data/lib/eac_launcher/stereotypes.rb +14 -0
- data/lib/eac_launcher/stereotypes/git.rb +21 -0
- data/lib/eac_launcher/stereotypes/git/publish.rb +13 -0
- data/lib/eac_launcher/stereotypes/git/warp.rb +25 -0
- data/lib/eac_launcher/stereotypes/git_subrepo.rb +30 -0
- data/lib/eac_launcher/stereotypes/git_subrepo/publish.rb +12 -0
- data/lib/eac_launcher/stereotypes/git_subrepo/warp.rb +85 -0
- data/lib/eac_launcher/stereotypes/git_subtree.rb +47 -0
- data/lib/eac_launcher/stereotypes/git_subtree/publish.rb +10 -0
- data/lib/eac_launcher/stereotypes/git_subtree/warp.rb +27 -0
- data/lib/eac_launcher/stereotypes/rails.rb +21 -0
- data/lib/eac_launcher/stereotypes/redmine_plugin.rb +21 -0
- data/lib/eac_launcher/stereotypes/ruby_gem.rb +27 -0
- data/lib/eac_launcher/stereotypes/ruby_gem/publish.rb +127 -0
- data/lib/eac_launcher/vendor.rb +3 -0
- data/lib/eac_launcher/vendor/github.rb +18 -0
- data/lib/eac_launcher/version.rb +5 -0
- metadata +122 -9
- data/lib/avm/patches/eac_launcher_git_base.rb +0 -77
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacLauncher
|
4
|
+
module Vendor
|
5
|
+
module Github
|
6
|
+
class << self
|
7
|
+
def to_ssh_url(url)
|
8
|
+
return nil if url.blank?
|
9
|
+
|
10
|
+
url_no_dot_git = url.gsub(/\.git\z/, '')
|
11
|
+
|
12
|
+
m = %r{\Ahttps://github.com/([^/]+)/([^/]+)\z}.match(url_no_dot_git.to_s)
|
13
|
+
m ? "git@github.com:#{m[1]}/#{m[2]}.git" : url
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.50.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -59,19 +59,19 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 0.0.1
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: curb
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 0.9.10
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 0.9.10
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: eac_ruby_gem_support
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: 0.1.1
|
85
|
-
type: :
|
85
|
+
type: :development
|
86
86
|
prerelease: false
|
87
87
|
version_requirements: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
@@ -92,6 +92,20 @@ dependencies:
|
|
92
92
|
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: 0.1.1
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: eac_cli
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0.3'
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0.3'
|
95
109
|
- !ruby/object:Gem::Dependency
|
96
110
|
name: eac_ruby_gems_utils
|
97
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,14 +126,14 @@ dependencies:
|
|
112
126
|
requirements:
|
113
127
|
- - "~>"
|
114
128
|
- !ruby/object:Gem::Version
|
115
|
-
version: '0.
|
129
|
+
version: '0.35'
|
116
130
|
type: :runtime
|
117
131
|
prerelease: false
|
118
132
|
version_requirements: !ruby/object:Gem::Requirement
|
119
133
|
requirements:
|
120
134
|
- - "~>"
|
121
135
|
- !ruby/object:Gem::Version
|
122
|
-
version: '0.
|
136
|
+
version: '0.35'
|
123
137
|
- !ruby/object:Gem::Dependency
|
124
138
|
name: filesize
|
125
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,6 +148,20 @@ dependencies:
|
|
134
148
|
- - ">="
|
135
149
|
- !ruby/object:Gem::Version
|
136
150
|
version: '0'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: git
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '1.7'
|
158
|
+
type: :runtime
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - "~>"
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '1.7'
|
137
165
|
- !ruby/object:Gem::Dependency
|
138
166
|
name: htmlbeautifier
|
139
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,6 +196,26 @@ dependencies:
|
|
168
196
|
- - ">="
|
169
197
|
- !ruby/object:Gem::Version
|
170
198
|
version: '0'
|
199
|
+
- !ruby/object:Gem::Dependency
|
200
|
+
name: ruby-progressbar
|
201
|
+
requirement: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - "~>"
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '1.10'
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 1.10.1
|
209
|
+
type: :runtime
|
210
|
+
prerelease: false
|
211
|
+
version_requirements: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '1.10'
|
216
|
+
- - ">="
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: 1.10.1
|
171
219
|
description:
|
172
220
|
email:
|
173
221
|
executables:
|
@@ -226,6 +274,7 @@ files:
|
|
226
274
|
- lib/avm/git/issue/complete/_tracker.rb
|
227
275
|
- lib/avm/git/issue/complete/_validations.rb
|
228
276
|
- lib/avm/git/issue/complete/_working_tree.rb
|
277
|
+
- lib/avm/git/issue/complete/validation.rb
|
229
278
|
- lib/avm/git/revision_test.rb
|
230
279
|
- lib/avm/git/spec_helper.rb
|
231
280
|
- lib/avm/instances.rb
|
@@ -249,9 +298,12 @@ files:
|
|
249
298
|
- lib/avm/instances/entries/entry_reader.rb
|
250
299
|
- lib/avm/instances/entry_keys.rb
|
251
300
|
- lib/avm/patches.rb
|
252
|
-
- lib/avm/patches/eac_launcher_git_base.rb
|
253
301
|
- lib/avm/patches/object/template.rb
|
254
302
|
- lib/avm/path_string.rb
|
303
|
+
- lib/avm/rails.rb
|
304
|
+
- lib/avm/rails/runners.rb
|
305
|
+
- lib/avm/rails/runners/bundle.rb
|
306
|
+
- lib/avm/rails/runners/runner.rb
|
255
307
|
- lib/avm/result.rb
|
256
308
|
- lib/avm/ruby.rb
|
257
309
|
- lib/avm/ruby/rubocop.rb
|
@@ -298,14 +350,17 @@ files:
|
|
298
350
|
- lib/avm/tools/runner.rb
|
299
351
|
- lib/avm/tools/runner/eac_rails_base0.rb
|
300
352
|
- lib/avm/tools/runner/eac_rails_base0/apache_host.rb
|
353
|
+
- lib/avm/tools/runner/eac_rails_base0/bundle.rb
|
301
354
|
- lib/avm/tools/runner/eac_rails_base0/data.rb
|
302
355
|
- lib/avm/tools/runner/eac_rails_base0/deploy.rb
|
356
|
+
- lib/avm/tools/runner/eac_rails_base0/runner.rb
|
303
357
|
- lib/avm/tools/runner/eac_redmine_base0.rb
|
304
358
|
- lib/avm/tools/runner/eac_redmine_base0/bundle.rb
|
305
359
|
- lib/avm/tools/runner/eac_redmine_base0/data.rb
|
306
360
|
- lib/avm/tools/runner/eac_redmine_base0/data/dump.rb
|
307
361
|
- lib/avm/tools/runner/eac_redmine_base0/deploy.rb
|
308
362
|
- lib/avm/tools/runner/eac_redmine_base0/docker.rb
|
363
|
+
- lib/avm/tools/runner/eac_redmine_base0/runner.rb
|
309
364
|
- lib/avm/tools/runner/eac_wordpress_base0.rb
|
310
365
|
- lib/avm/tools/runner/eac_wordpress_base0/apache_host.rb
|
311
366
|
- lib/avm/tools/runner/eac_wordpress_base0/data.rb
|
@@ -320,11 +375,69 @@ files:
|
|
320
375
|
- lib/avm/tools/runner/git/dirty_files.rb
|
321
376
|
- lib/avm/tools/runner/git/issue.rb
|
322
377
|
- lib/avm/tools/runner/git/revisions_test.rb
|
378
|
+
- lib/avm/tools/runner/launcher.rb
|
323
379
|
- lib/avm/tools/runner/ruby.rb
|
324
380
|
- lib/avm/tools/runner/ruby/rubocop.rb
|
325
381
|
- lib/avm/tools/runner/self.rb
|
326
382
|
- lib/avm/tools/runner/self/docker.rb
|
327
383
|
- lib/avm/tools/version.rb
|
384
|
+
- lib/eac_launcher.rb
|
385
|
+
- lib/eac_launcher/context.rb
|
386
|
+
- lib/eac_launcher/context/instance_discovery.rb
|
387
|
+
- lib/eac_launcher/context/instance_manager.rb
|
388
|
+
- lib/eac_launcher/context/settings.rb
|
389
|
+
- lib/eac_launcher/git.rb
|
390
|
+
- lib/eac_launcher/git/base.rb
|
391
|
+
- lib/eac_launcher/git/base/class_methods.rb
|
392
|
+
- lib/eac_launcher/git/base/dirty_files.rb
|
393
|
+
- lib/eac_launcher/git/base/remotes.rb
|
394
|
+
- lib/eac_launcher/git/base/subrepo.rb
|
395
|
+
- lib/eac_launcher/git/base/underlying.rb
|
396
|
+
- lib/eac_launcher/git/error.rb
|
397
|
+
- lib/eac_launcher/git/mirror_update.rb
|
398
|
+
- lib/eac_launcher/git/publish_base.rb
|
399
|
+
- lib/eac_launcher/git/remote.rb
|
400
|
+
- lib/eac_launcher/git/sub_warp_base.rb
|
401
|
+
- lib/eac_launcher/git/warp_base.rb
|
402
|
+
- lib/eac_launcher/instances.rb
|
403
|
+
- lib/eac_launcher/instances/base.rb
|
404
|
+
- lib/eac_launcher/instances/base/cache.rb
|
405
|
+
- lib/eac_launcher/instances/error.rb
|
406
|
+
- lib/eac_launcher/instances/runner_helper.rb
|
407
|
+
- lib/eac_launcher/instances/settings.rb
|
408
|
+
- lib/eac_launcher/paths.rb
|
409
|
+
- lib/eac_launcher/paths/logical.rb
|
410
|
+
- lib/eac_launcher/paths/real.rb
|
411
|
+
- lib/eac_launcher/project.rb
|
412
|
+
- lib/eac_launcher/publish.rb
|
413
|
+
- lib/eac_launcher/publish/base.rb
|
414
|
+
- lib/eac_launcher/publish/check_result.rb
|
415
|
+
- lib/eac_launcher/ruby.rb
|
416
|
+
- lib/eac_launcher/ruby/gem.rb
|
417
|
+
- lib/eac_launcher/ruby/gem/build.rb
|
418
|
+
- lib/eac_launcher/ruby/gem/specification.rb
|
419
|
+
- lib/eac_launcher/runner.rb
|
420
|
+
- lib/eac_launcher/runner/instances.rb
|
421
|
+
- lib/eac_launcher/runner/projects.rb
|
422
|
+
- lib/eac_launcher/runner/publish.rb
|
423
|
+
- lib/eac_launcher/stereotype.rb
|
424
|
+
- lib/eac_launcher/stereotypes.rb
|
425
|
+
- lib/eac_launcher/stereotypes/git.rb
|
426
|
+
- lib/eac_launcher/stereotypes/git/publish.rb
|
427
|
+
- lib/eac_launcher/stereotypes/git/warp.rb
|
428
|
+
- lib/eac_launcher/stereotypes/git_subrepo.rb
|
429
|
+
- lib/eac_launcher/stereotypes/git_subrepo/publish.rb
|
430
|
+
- lib/eac_launcher/stereotypes/git_subrepo/warp.rb
|
431
|
+
- lib/eac_launcher/stereotypes/git_subtree.rb
|
432
|
+
- lib/eac_launcher/stereotypes/git_subtree/publish.rb
|
433
|
+
- lib/eac_launcher/stereotypes/git_subtree/warp.rb
|
434
|
+
- lib/eac_launcher/stereotypes/rails.rb
|
435
|
+
- lib/eac_launcher/stereotypes/redmine_plugin.rb
|
436
|
+
- lib/eac_launcher/stereotypes/ruby_gem.rb
|
437
|
+
- lib/eac_launcher/stereotypes/ruby_gem/publish.rb
|
438
|
+
- lib/eac_launcher/vendor.rb
|
439
|
+
- lib/eac_launcher/vendor/github.rb
|
440
|
+
- lib/eac_launcher/version.rb
|
328
441
|
- template/avm/self/docker_image/Dockerfile
|
329
442
|
- template/avm/self/docker_image/entrypoint.sh
|
330
443
|
- template/avm/stereotypes/eac_rails_base0/deploy/config/database.yml.template
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_launcher/git/base'
|
4
|
-
require 'eac_launcher/git/error'
|
5
|
-
require 'eac_ruby_utils/patch'
|
6
|
-
require 'eac_ruby_utils/require_sub'
|
7
|
-
::EacRubyUtils.require_sub(__FILE__)
|
8
|
-
|
9
|
-
module Avm
|
10
|
-
module Patches
|
11
|
-
module EacLauncherGitBase
|
12
|
-
extend ::ActiveSupport::Concern
|
13
|
-
|
14
|
-
included do
|
15
|
-
extend ClassMethods
|
16
|
-
include InstanceMethods
|
17
|
-
end
|
18
|
-
|
19
|
-
module ClassMethods
|
20
|
-
# @return [EacLauncher::Git::Base]
|
21
|
-
def by_root(search_base_path)
|
22
|
-
new(find_root(search_base_path).to_path)
|
23
|
-
end
|
24
|
-
|
25
|
-
# Searches the root path for the Git repository which includes +search_base_path+.
|
26
|
-
# @return [Pathname]
|
27
|
-
def find_root(search_base_path)
|
28
|
-
path = search_base_path.to_pathname.expand_path
|
29
|
-
loop do
|
30
|
-
return path if path.join('.git').exist?
|
31
|
-
raise "\".git\" not found for \"#{search_base_path}\"" if path.parent.root?
|
32
|
-
|
33
|
-
path = path.parent
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
module InstanceMethods
|
39
|
-
def execute(*args)
|
40
|
-
args, options = build_args(args)
|
41
|
-
::EacRubyUtils::Envs.local.command(*args).execute(options)
|
42
|
-
end
|
43
|
-
|
44
|
-
def command(*args)
|
45
|
-
args, _options = build_args(args)
|
46
|
-
::EacRubyUtils::Envs.local.command(*args)
|
47
|
-
end
|
48
|
-
|
49
|
-
def dirty?
|
50
|
-
dirty_files.any?
|
51
|
-
end
|
52
|
-
|
53
|
-
def dirty_files
|
54
|
-
execute!('status', '--porcelain', '--untracked-files').each_line.map do |line|
|
55
|
-
parse_status_line(line.gsub(/\n\z/, ''))
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
# @return [Pathname]
|
60
|
-
def root_path
|
61
|
-
@root_path ||= self.class.find_root(to_s)
|
62
|
-
end
|
63
|
-
|
64
|
-
private
|
65
|
-
|
66
|
-
def parse_status_line(line)
|
67
|
-
m = /\A(.)(.)\s(.+)\z/.match(line)
|
68
|
-
::Kernel.raise "Status pattern does not match \"#{line}\"" unless m
|
69
|
-
::OpenStruct.new(index: m[1], worktree: m[2], path: m[3],
|
70
|
-
absolute_path: ::File.expand_path(m[3], self))
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
::EacRubyUtils.patch(::EacLauncher::Git::Base, ::Avm::Patches::EacLauncherGitBase)
|