eac_tools 0.35.0 → 0.36.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -0
- data/Gemfile.lock +23 -15
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/launcher/errors.rb +11 -0
- data/sub/avm/lib/avm/launcher/instances.rb +11 -0
- data/sub/avm/lib/avm/launcher/paths/logical.rb +2 -1
- data/sub/avm/lib/avm/launcher/paths.rb +11 -0
- data/sub/{avm-tools → avm}/lib/avm/launcher/project.rb +4 -5
- data/sub/avm/lib/avm/launcher/publish.rb +11 -0
- data/sub/{avm-tools/lib/avm/projects → avm/lib/avm/launcher}/stereotype.rb +1 -1
- data/sub/avm/lib/avm/launcher.rb +9 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_php_base0/Gemfile +8 -0
- data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +18 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +7 -0
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0.rb +9 -0
- data/sub/avm-eac_php_base0/spec/rubocop_spec.rb +3 -0
- data/sub/avm-eac_php_base0/spec/spec_helper.rb +4 -0
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +1 -1
- data/sub/{avm-tools/lib/avm/launcher/ruby → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher}/gem/build.rb +4 -4
- data/sub/{avm-tools/lib/avm/launcher/ruby → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher}/gem/specification.rb +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem.rb +13 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/git_info.rb +2 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +0 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-git/avm-git.gemspec +1 -1
- data/sub/avm-git/lib/avm/git/issue/complete.rb +1 -1
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/base/class_methods.rb +3 -3
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/base/dirty_files.rb +2 -2
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/base/remotes.rb +5 -5
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/base/subrepo.rb +2 -2
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/base/underlying.rb +2 -2
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/base.rb +9 -9
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/error.rb +2 -2
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/mirror_update.rb +5 -5
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/publish_base.rb +4 -4
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/remote.rb +2 -2
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/sub_warp_base.rb +4 -4
- data/sub/{avm-tools/lib/avm/launcher/git → avm-git/lib/avm/git/launcher}/warp_base.rb +6 -6
- data/sub/avm-git/lib/avm/git/launcher.rb +7 -0
- data/sub/avm-git/lib/avm/git/organize/repository.rb +1 -0
- data/sub/avm-git/lib/avm/git/version.rb +1 -1
- data/sub/avm-tools/avm-tools.gemspec +4 -4
- data/sub/avm-tools/lib/avm/projects/stereotypes/git/publish.rb +2 -2
- data/sub/avm-tools/lib/avm/projects/stereotypes/git/warp.rb +2 -2
- data/sub/avm-tools/lib/avm/projects/stereotypes/git.rb +2 -2
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subrepo/publish.rb +2 -2
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subrepo/warp.rb +7 -7
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subrepo.rb +4 -4
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subtree/publish.rb +2 -2
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subtree/warp.rb +4 -4
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subtree.rb +3 -3
- data/sub/avm-tools/lib/avm/projects/stereotypes/ruby_gem/publish.rb +2 -2
- data/sub/avm-tools/lib/avm/projects/stereotypes/ruby_gem.rb +4 -4
- data/sub/avm-tools/lib/avm/projects/stereotypes.rb +0 -9
- data/sub/avm-tools/lib/avm/tools/core_ext.rb +0 -1
- data/sub/avm-tools/lib/avm/tools/runner/files/format.rb +2 -2
- data/sub/avm-tools/lib/avm/tools/runner/git/commit.rb +2 -2
- data/sub/avm-tools/lib/avm/tools/runner/git/deploy.rb +2 -2
- data/sub/avm-tools/lib/avm/tools/runner/git.rb +2 -2
- data/sub/avm-tools/lib/avm/tools/runner/launcher.rb +1 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/info.rb +0 -4
- data/sub/avm-tools/lib/avm/tools/runner/source/test.rb +1 -1
- data/sub/avm-tools/lib/avm/tools/runner/source.rb +0 -12
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/avm-tools/spec/lib/avm/launcher/context_spec.rb +50 -36
- data/sub/avm-tools/spec/lib/avm/launcher/git/base_spec.rb +2 -2
- data/sub/avm-tools/spec/lib/avm/launcher/ruby/gem/build_spec.rb +2 -2
- data/sub/avm-tools/spec/lib/avm/launcher/ruby/gem/specification_spec.rb +1 -1
- data/sub/avm-tools/spec/lib/avm/projects/stereotypes/git_subrepo/warp_spec.rb +1 -1
- data/sub/avm-tools/spec/lib/avm/tools/runner/source/issue/complete_spec.rb +2 -2
- data/sub/avm-tools/spec/spec_helper/eac_launcher.rb +4 -4
- metadata +54 -42
- data/sub/avm-tools/lib/avm/launcher/git.rb +0 -7
- data/sub/avm-tools/lib/avm/launcher/instances.rb +0 -6
- data/sub/avm-tools/lib/avm/launcher/paths.rb +0 -4
- data/sub/avm-tools/lib/avm/launcher/publish.rb +0 -4
- data/sub/avm-tools/lib/avm/launcher/ruby/gem.rb +0 -4
- data/sub/avm-tools/lib/avm/launcher/ruby.rb +0 -3
- data/sub/avm-tools/lib/avm/patches/i18n.rb +0 -22
- data/sub/avm-tools/lib/avm/patches.rb +0 -9
- data/sub/avm-tools/lib/avm/projects/stereotype/job_comparator.rb +0 -32
- data/sub/avm-tools/lib/avm/projects/stereotypes/rails_application/local_project_mixin.rb +0 -18
- data/sub/avm-tools/lib/avm/projects/stereotypes/rails_application.rb +0 -25
- data/sub/avm-tools/lib/avm/projects/stereotypes/redmine_plugin.rb +0 -23
- data/sub/avm-tools/lib/avm/stereotypes.rb +0 -9
- data/sub/avm-tools/lib/avm/tools/source.rb +0 -64
- data/sub/avm-tools/locale/en.yml +0 -7
- data/sub/avm-tools/locale/pt-BR.yml +0 -7
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/mirror_update'
|
4
4
|
require 'avm/launcher/instances/error'
|
5
5
|
require 'avm/git/vendor/github'
|
6
6
|
require 'avm/projects/stereotypes/git/publish'
|
7
7
|
|
8
8
|
module Avm
|
9
|
-
module
|
10
|
-
module
|
9
|
+
module Git
|
10
|
+
module Launcher
|
11
11
|
# Métodos abstratos:
|
12
12
|
# * source_instance
|
13
13
|
# * source_remote_name
|
@@ -39,7 +39,7 @@ module Avm
|
|
39
39
|
|
40
40
|
def update
|
41
41
|
validate_source_current_revision
|
42
|
-
::Avm::Launcher::
|
42
|
+
::Avm::Git::Launcher::MirrorUpdate.new(
|
43
43
|
path,
|
44
44
|
source_instance.real,
|
45
45
|
source_instance.options.git_current_revision
|
@@ -51,11 +51,11 @@ module Avm
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def source_git_uncached
|
54
|
-
::Avm::Launcher::
|
54
|
+
::Avm::Git::Launcher::Base.new(source_instance.real)
|
55
55
|
end
|
56
56
|
|
57
57
|
def cache_git_uncached
|
58
|
-
::Avm::Launcher::
|
58
|
+
::Avm::Git::Launcher::Base.new(update)
|
59
59
|
end
|
60
60
|
|
61
61
|
def target_remote_url
|
@@ -10,16 +10,16 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.authors = ['Esquilo Azul Company']
|
11
11
|
s.summary = 'Tools for AVM.'
|
12
12
|
|
13
|
-
s.files = Dir['{exe,lib,
|
13
|
+
s.files = Dir['{exe,lib,template,sub}/**/*', 'Gemfile']
|
14
14
|
s.bindir = 'exe'
|
15
15
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
16
16
|
|
17
17
|
s.add_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.3'
|
18
|
-
s.add_dependency 'avm', '~> 0.
|
19
|
-
s.add_dependency 'avm-eac_ruby_base1', '~> 0.
|
18
|
+
s.add_dependency 'avm', '~> 0.48'
|
19
|
+
s.add_dependency 'avm-eac_ruby_base1', '~> 0.23'
|
20
20
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
|
21
21
|
s.add_dependency 'avm-files', '~> 0.4', '>= 0.4.1'
|
22
|
-
s.add_dependency 'avm-git', '~> 0.
|
22
|
+
s.add_dependency 'avm-git', '~> 0.6'
|
23
23
|
s.add_dependency 'clipboard', '~> 1.3', '>= 1.3.6'
|
24
24
|
s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
|
25
25
|
s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.3'
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/publish_base'
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module Projects
|
7
7
|
module Stereotypes
|
8
8
|
class Git
|
9
|
-
class Publish < ::Avm::Launcher::
|
9
|
+
class Publish < ::Avm::Git::Launcher::PublishBase
|
10
10
|
PUBLISH_GIT_REMOTE_NAME = 'publish'
|
11
11
|
end
|
12
12
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/warp_base'
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module Projects
|
7
7
|
module Stereotypes
|
8
8
|
class Git
|
9
|
-
class Warp < ::Avm::Launcher::
|
9
|
+
class Warp < ::Avm::Git::Launcher::WarpBase
|
10
10
|
private
|
11
11
|
|
12
12
|
def current_ref
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/launcher/stereotype'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
6
|
module Avm
|
@@ -8,7 +8,7 @@ module Avm
|
|
8
8
|
module Stereotypes
|
9
9
|
class Git
|
10
10
|
require_sub __FILE__
|
11
|
-
include Avm::
|
11
|
+
include Avm::Launcher::Stereotype
|
12
12
|
|
13
13
|
class << self
|
14
14
|
def match?(path)
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/publish_base'
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module Projects
|
7
7
|
module Stereotypes
|
8
8
|
class GitSubrepo
|
9
|
-
class Publish < ::Avm::Launcher::
|
9
|
+
class Publish < ::Avm::Git::Launcher::PublishBase
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/simple_cache'
|
4
|
-
require 'avm/launcher/
|
4
|
+
require 'avm/git/launcher/sub_warp_base'
|
5
5
|
require 'avm/launcher/errors/base'
|
6
6
|
require 'avm/launcher/paths/real'
|
7
7
|
require 'avm/git/vendor/github'
|
@@ -11,7 +11,7 @@ module Avm
|
|
11
11
|
module Stereotypes
|
12
12
|
class GitSubrepo
|
13
13
|
class Warp < ::Avm::Launcher::Paths::Real
|
14
|
-
include ::Avm::Launcher::
|
14
|
+
include ::Avm::Git::Launcher::SubWarpBase
|
15
15
|
include ::EacRubyUtils::SimpleCache
|
16
16
|
|
17
17
|
attr_reader :instance
|
@@ -46,11 +46,11 @@ module Avm
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def init_aux
|
49
|
-
::Avm::Launcher::
|
49
|
+
::Avm::Git::Launcher::Base.new(aux_path).init_bare
|
50
50
|
end
|
51
51
|
|
52
52
|
def parent_git_warped_uncached
|
53
|
-
::Avm::Launcher::
|
53
|
+
::Avm::Git::Launcher::Base.new(parent_instance.warped)
|
54
54
|
end
|
55
55
|
|
56
56
|
def aux_path
|
@@ -58,7 +58,7 @@ module Avm
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def warped_git_uncached
|
61
|
-
::Avm::Launcher::
|
61
|
+
::Avm::Git::Launcher::Base.new(instance.cache_path('git_repository'))
|
62
62
|
end
|
63
63
|
|
64
64
|
def push_to_aux
|
@@ -68,11 +68,11 @@ module Avm
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def reset
|
71
|
-
::Avm::Launcher::
|
71
|
+
::Avm::Git::Launcher::MirrorUpdate.new(warped_git, aux_path, 'master')
|
72
72
|
end
|
73
73
|
|
74
74
|
def assert_target_remote
|
75
|
-
warped_git.assert_remote_url(::Avm::Launcher::
|
75
|
+
warped_git.assert_remote_url(::Avm::Git::Launcher::WarpBase::TARGET_REMOTE,
|
76
76
|
target_remote_url)
|
77
77
|
end
|
78
78
|
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/error'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
|
-
require 'avm/
|
5
|
+
require 'avm/launcher/stereotype'
|
6
6
|
|
7
7
|
module Avm
|
8
8
|
module Projects
|
9
9
|
module Stereotypes
|
10
10
|
class GitSubrepo
|
11
11
|
require_sub __FILE__
|
12
|
-
include Avm::
|
12
|
+
include Avm::Launcher::Stereotype
|
13
13
|
|
14
14
|
class << self
|
15
15
|
def match?(path)
|
@@ -25,7 +25,7 @@ module Avm
|
|
25
25
|
m = /remote\s*=\s(.+)/.match(l)
|
26
26
|
return m[1] if m
|
27
27
|
end
|
28
|
-
raise ::Avm::Launcher::
|
28
|
+
raise ::Avm::Git::Launcher::Error.new(path, '"remote = ... " not found')
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/publish_base'
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module Projects
|
7
7
|
module Stereotypes
|
8
8
|
class GitSubtree
|
9
|
-
class Publish < ::Avm::Launcher::
|
9
|
+
class Publish < ::Avm::Git::Launcher::PublishBase
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
4
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/warp_base'
|
4
|
+
require 'avm/git/launcher/sub_warp_base'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
module Projects
|
8
8
|
module Stereotypes
|
9
9
|
class GitSubtree
|
10
|
-
class Warp < ::Avm::Launcher::
|
11
|
-
include ::Avm::Launcher::
|
10
|
+
class Warp < ::Avm::Git::Launcher::WarpBase
|
11
|
+
include ::Avm::Git::Launcher::SubWarpBase
|
12
12
|
|
13
13
|
private
|
14
14
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/launcher/stereotype'
|
4
4
|
require 'avm/projects/stereotypes/git'
|
5
5
|
require 'eac_ruby_utils/core_ext'
|
6
6
|
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
module Stereotypes
|
10
10
|
class GitSubtree
|
11
11
|
require_sub __FILE__
|
12
|
-
include Avm::
|
12
|
+
include Avm::Launcher::Stereotype
|
13
13
|
|
14
14
|
class << self
|
15
15
|
def match?(path)
|
@@ -42,7 +42,7 @@ module Avm
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def other_nogit_stereotype?(path)
|
45
|
-
Avm::
|
45
|
+
Avm::Launcher::Stereotype.nogit_stereotypes.any? { |s| s.match?(path) }
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -7,7 +7,7 @@ require 'rubygems'
|
|
7
7
|
require 'eac_cli/speaker'
|
8
8
|
require 'avm/launcher/publish/base'
|
9
9
|
require 'avm/launcher/publish/check_result'
|
10
|
-
require 'avm/launcher/
|
10
|
+
require 'avm/eac_ruby_base1/launcher/gem'
|
11
11
|
|
12
12
|
module Avm
|
13
13
|
module Projects
|
@@ -71,7 +71,7 @@ module Avm
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def gem_build_uncached
|
74
|
-
::Avm::Launcher::
|
74
|
+
::Avm::EacRubyBase1::Launcher::Gem::Build.new(source)
|
75
75
|
end
|
76
76
|
|
77
77
|
def publish
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
4
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/eac_ruby_base1/launcher/gem/specification'
|
4
|
+
require 'avm/launcher/stereotype'
|
5
5
|
require 'eac_ruby_utils/core_ext'
|
6
6
|
|
7
7
|
module Avm
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
module Stereotypes
|
10
10
|
class RubyGem
|
11
11
|
require_sub __FILE__
|
12
|
-
include Avm::
|
12
|
+
include Avm::Launcher::Stereotype
|
13
13
|
|
14
14
|
class << self
|
15
15
|
def match?(path)
|
@@ -21,7 +21,7 @@ module Avm
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def load_gemspec(gemspec_file)
|
24
|
-
::Avm::Launcher::
|
24
|
+
::Avm::EacRubyBase1::Launcher::Gem::Specification.new(gemspec_file)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -1,20 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/projects/stereotype'
|
4
3
|
require 'eac_ruby_utils/core_ext'
|
5
4
|
|
6
5
|
module Avm
|
7
6
|
module Projects
|
8
7
|
module Stereotypes
|
9
8
|
require_sub __FILE__, base: nil
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def list
|
13
|
-
@list ||= constants.map { |c| const_get(c) }
|
14
|
-
.select { |c| c.included_modules.include?(Avm::Projects::Stereotype) }
|
15
|
-
.freeze
|
16
|
-
end
|
17
|
-
end
|
18
9
|
end
|
19
10
|
end
|
20
11
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'avm/files/formatter'
|
4
4
|
require 'eac_cli/core_ext'
|
5
|
-
require 'avm/launcher/
|
5
|
+
require 'avm/git/launcher/base'
|
6
6
|
|
7
7
|
module Avm
|
8
8
|
module Tools
|
@@ -29,7 +29,7 @@ module Avm
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def git
|
32
|
-
@git ||= ::Avm::Launcher::
|
32
|
+
@git ||= ::Avm::Git::Launcher::Base.new('.')
|
33
33
|
end
|
34
34
|
|
35
35
|
def git_dirty_files
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/speaker'
|
4
4
|
require 'eac_ruby_utils/simple_cache'
|
5
|
-
require 'avm/launcher/
|
5
|
+
require 'avm/git/launcher/base'
|
6
6
|
require 'filesize'
|
7
7
|
require 'avm/git/commit'
|
8
8
|
|
@@ -76,7 +76,7 @@ module Avm
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def git_uncached
|
79
|
-
::Avm::Launcher::
|
79
|
+
::Avm::Git::Launcher::Base.new(runner_context.call(:repository_path))
|
80
80
|
end
|
81
81
|
|
82
82
|
def commit_uncached
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/base'
|
4
4
|
require 'avm/git/commit'
|
5
5
|
require 'eac_config/node'
|
6
6
|
|
@@ -57,7 +57,7 @@ module Avm
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def git_uncached
|
60
|
-
::Avm::Launcher::
|
60
|
+
::Avm::Git::Launcher::Base.new(git_repository_path)
|
61
61
|
end
|
62
62
|
|
63
63
|
def git_repository_path
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/tools/core_ext'
|
4
|
-
require 'avm/launcher/
|
4
|
+
require 'avm/git/launcher/base'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
module Tools
|
@@ -23,7 +23,7 @@ module Avm
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def git
|
26
|
-
@git ||= ::Avm::Launcher::
|
26
|
+
@git ||= ::Avm::Git::Launcher::Base.by_root(repository_path)
|
27
27
|
end
|
28
28
|
|
29
29
|
# @return [[EacGit::Local]]
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/sources/runner'
|
4
|
-
require 'avm/tools/source'
|
5
4
|
require 'eac_cli/core_ext'
|
6
5
|
|
7
6
|
module Avm
|
@@ -10,20 +9,9 @@ module Avm
|
|
10
9
|
class Source < ::Avm::Sources::Runner
|
11
10
|
require_sub __FILE__
|
12
11
|
|
13
|
-
def instance_banner
|
14
|
-
infov 'Instance', instance
|
15
|
-
infov 'Stereotypes', instance.stereotypes.map(&:label).join(', ')
|
16
|
-
end
|
17
|
-
|
18
12
|
def subject
|
19
13
|
source
|
20
14
|
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
def instance_uncached
|
25
|
-
::Avm::Tools::Source.new(source_path)
|
26
|
-
end
|
27
15
|
end
|
28
16
|
end
|
29
17
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/launcher/context'
|
4
|
+
require 'avm/launcher/stereotype'
|
4
5
|
|
5
6
|
RSpec.describe ::Avm::Launcher::Context do
|
6
7
|
describe '#instances' do
|
@@ -17,52 +18,65 @@ RSpec.describe ::Avm::Launcher::Context do
|
|
17
18
|
end
|
18
19
|
|
19
20
|
context 'subinstance mylib' do
|
21
|
+
let(:mylib_repos) do
|
22
|
+
r = init_remote('mylib_repos')
|
23
|
+
wc = init_git('mylib_wc')
|
24
|
+
touch_commit(wc, 'app.gemspec')
|
25
|
+
wc.execute!('remote', 'add', 'origin', r)
|
26
|
+
wc.execute!('push', 'origin', 'master')
|
27
|
+
r
|
28
|
+
end
|
29
|
+
|
20
30
|
before do
|
21
31
|
temp_context(::File.join(__dir__, 'context_spec.yml'))
|
32
|
+
mylib_repos
|
33
|
+
end
|
22
34
|
|
23
|
-
|
35
|
+
context 'when sub is a GitSubrepo' do
|
36
|
+
let(:sub) { described_class.current.instance('/app/sub1') }
|
37
|
+
let(:instance) { described_class.current.instance('/app/sub1/mylib') }
|
24
38
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
39
|
+
before do
|
40
|
+
app = init_git('app')
|
41
|
+
touch_commit(app, 'sub1/app.gemspec')
|
42
|
+
app.execute!('subrepo', 'clone', mylib_repos, 'sub1/mylib')
|
43
|
+
end
|
30
44
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
sub = described_class.current.instance('/app/sub1')
|
36
|
-
expect(sub).to be_a(::Avm::Launcher::Instances::Base)
|
37
|
-
::Avm::Projects::Stereotype.git_stereotypes.each do |s|
|
38
|
-
expect(sub.stereotypes).not_to include(s)
|
45
|
+
it { expect(sub).to be_a(::Avm::Launcher::Instances::Base) }
|
46
|
+
it do
|
47
|
+
::Avm::Launcher::Stereotype.git_stereotypes
|
48
|
+
.each { |s| expect(sub.stereotypes).not_to include(s) }
|
39
49
|
end
|
40
|
-
|
41
|
-
expect(instance).to
|
42
|
-
expect(instance.stereotypes).to include(::Avm::Projects::Stereotypes::GitSubrepo)
|
50
|
+
it { expect(instance).to be_a(::Avm::Launcher::Instances::Base) }
|
51
|
+
it { expect(instance.stereotypes).to include(::Avm::Projects::Stereotypes::GitSubrepo) }
|
43
52
|
end
|
44
53
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
+
context 'when sub is a GitSubtree' do
|
55
|
+
let(:sub) { described_class.current.instance('/app/sub1') }
|
56
|
+
let(:instance) { described_class.current.instance('/app/sub1/mylib') }
|
57
|
+
|
58
|
+
before do
|
59
|
+
app = init_git('app')
|
60
|
+
touch_commit(app, 'sub1/app.gemspec')
|
61
|
+
app.execute!('subtree', 'add', '-P', 'sub1/mylib', mylib_repos, 'master')
|
62
|
+
app.execute!('remote', 'add', 'mylib', mylib_repos)
|
63
|
+
end
|
64
|
+
|
65
|
+
it { expect(sub).to be_a(::Avm::Launcher::Instances::Base) }
|
66
|
+
it do
|
67
|
+
::Avm::Launcher::Stereotype.git_stereotypes
|
68
|
+
.each { |s| expect(sub.stereotypes).not_to include(s) }
|
54
69
|
end
|
55
|
-
|
56
|
-
expect(instance).to
|
57
|
-
expect(instance.stereotypes).to include(::Avm::Projects::Stereotypes::GitSubtree)
|
70
|
+
it { expect(instance).to be_a(::Avm::Launcher::Instances::Base) }
|
71
|
+
it { expect(instance.stereotypes).to include(::Avm::Projects::Stereotypes::GitSubtree) }
|
58
72
|
end
|
59
73
|
|
60
74
|
context 'subtree present' do
|
61
75
|
before do
|
62
|
-
|
63
|
-
touch_commit(
|
64
|
-
|
65
|
-
|
76
|
+
app = init_git('subtree_main_app')
|
77
|
+
touch_commit(app, 'file1')
|
78
|
+
app.execute!('subtree', 'add', '-P', 'mylib', mylib_repos, 'master')
|
79
|
+
app.execute!('remote', 'add', 'mylib', mylib_repos)
|
66
80
|
end
|
67
81
|
|
68
82
|
it 'recognizes subtree instance' do
|
@@ -77,7 +91,7 @@ RSpec.describe ::Avm::Launcher::Context do
|
|
77
91
|
app = init_git('app') # HEAD: master
|
78
92
|
touch_commit(app, 'file2')
|
79
93
|
app.execute!('checkout', '-b', 'not_master') # HEAD: not_master
|
80
|
-
app.execute!('subrepo', 'clone',
|
94
|
+
app.execute!('subrepo', 'clone', mylib_repos, 'mylib')
|
81
95
|
expect(described_class.current.instance('/app/mylib')).to be_nil
|
82
96
|
end
|
83
97
|
end
|
@@ -88,7 +102,7 @@ RSpec.describe ::Avm::Launcher::Context do
|
|
88
102
|
app = init_git('app') # HEAD: master
|
89
103
|
touch_commit(app, 'file2')
|
90
104
|
app.execute!('checkout', '-b', 'not_master') # HEAD: not_master
|
91
|
-
app.execute!('subrepo', 'clone',
|
105
|
+
app.execute!('subrepo', 'clone', mylib_repos, 'mylib')
|
92
106
|
expect(described_class.current.instance('/app/mylib')).to be_nil
|
93
107
|
end
|
94
108
|
end
|
@@ -98,7 +112,7 @@ RSpec.describe ::Avm::Launcher::Context do
|
|
98
112
|
app = init_git('app') # HEAD: master
|
99
113
|
touch_commit(app, 'file3')
|
100
114
|
app.execute!('branch', '-f', 'not_master')
|
101
|
-
app.execute!('subrepo', 'clone',
|
115
|
+
app.execute!('subrepo', 'clone', mylib_repos, 'mylib')
|
102
116
|
app.execute!('checkout', 'not_master') # HEAD: not_master
|
103
117
|
expect(described_class.current.instance('/app/mylib'))
|
104
118
|
.to be_a(::Avm::Launcher::Instances::Base)
|