eac_tools 0.36.0 → 0.37.0
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 +14 -13
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/launcher/paths/logical.rb +2 -1
- data/sub/avm/lib/avm/launcher/publish/base.rb +0 -2
- data/sub/{avm-tools/lib/avm/projects → avm/lib/avm/launcher}/stereotype.rb +1 -1
- data/sub/avm/lib/avm/launcher_stereotypes.rb +9 -0
- data/sub/avm/lib/avm/registry/launcher_stereotypes.rb +11 -0
- data/sub/avm/lib/avm/registry.rb +2 -2
- data/sub/avm/lib/avm/rspec/setup.rb +2 -0
- data/sub/avm/lib/avm/rspec/source_generator.rb +16 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- 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-tools/lib/avm/projects/stereotypes/ruby_gem → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base}/local_project_mixin.rb +3 -3
- data/sub/{avm-tools/lib/avm/projects/stereotypes/ruby_gem → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base}/publish.rb +6 -6
- data/sub/{avm-tools/lib/avm/projects/stereotypes/ruby_gem.rb → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base.rb} +7 -7
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base_spec.rb +9 -0
- data/sub/avm-eac_ruby_base1/spec/spec_helper.rb +4 -0
- data/sub/avm-git/avm-git.gemspec +2 -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 +5 -3
- 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 +8 -8
- data/sub/avm-git/lib/avm/git/launcher.rb +7 -0
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git/local_project_mixin.rb +2 -2
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git/publish.rb +4 -4
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git/warp.rb +5 -5
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git.rb +4 -4
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +14 -0
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git_subrepo/warp.rb +9 -9
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git_subrepo.rb +6 -6
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/publish.rb +14 -0
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git_subtree/warp.rb +6 -6
- data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git_subtree.rb +9 -9
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +22 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes.rb +11 -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/spec/lib/avm/launcher/git → avm-git/spec/lib/avm/git/launcher}/base_spec.rb +7 -7
- data/sub/avm-tools/avm-tools.gemspec +3 -3
- data/sub/avm-tools/lib/avm/projects/stereotypes.rb +4 -0
- 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_stereotypes/list.rb +42 -0
- data/sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes.rb +16 -0
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/avm-tools/spec/lib/avm/{launcher/ruby → eac_ruby_base1/launcher}/gem/build_spec.rb +4 -4
- data/sub/avm-tools/spec/lib/avm/{launcher/ruby → eac_ruby_base1/launcher}/gem/specification_spec.rb +3 -3
- data/sub/avm-tools/spec/lib/avm/{projects/stereotypes/ruby_gem → eac_ruby_base1/launcher_stereotypes/base}/publish_spec.rb +4 -4
- data/sub/avm-tools/spec/lib/avm/{projects/stereotypes/ruby_gem_spec.rb → eac_ruby_base1/launcher_stereotypes/base_spec.rb} +5 -5
- data/sub/avm-tools/spec/lib/avm/launcher/context_spec.rb +51 -37
- data/sub/avm-tools/spec/lib/avm/projects/stereotypes/git_subrepo/publish_spec.rb +3 -3
- data/sub/avm-tools/spec/lib/avm/projects/stereotypes/git_subrepo/warp_spec.rb +4 -4
- data/sub/avm-tools/spec/lib/avm/tools/runner/launcher_stereotypes/list_spec.rb +17 -0
- 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 +53 -44
- data/sub/avm-tools/lib/avm/launcher/git.rb +0 -7
- 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/projects/stereotypes/git_subrepo/publish.rb +0 -14
- data/sub/avm-tools/lib/avm/projects/stereotypes/git_subtree/publish.rb +0 -14
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/projects/stereotype'
|
4
3
|
require 'avm/launcher/errors/base'
|
4
|
+
require 'avm/launcher/stereotype'
|
5
5
|
|
6
6
|
module Avm
|
7
|
-
module
|
8
|
-
module
|
7
|
+
module Git
|
8
|
+
module Launcher
|
9
9
|
module SubWarpBase
|
10
10
|
private
|
11
11
|
|
@@ -17,7 +17,7 @@ module Avm
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def find_parent_instance(current)
|
20
|
-
if ::Avm::
|
20
|
+
if ::Avm::Launcher::Stereotype.git_stereotypes.any? { |s| current.stereotype?(s) }
|
21
21
|
return current
|
22
22
|
end
|
23
23
|
|
@@ -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
|
-
require 'avm/
|
6
|
+
require 'avm/git/launcher_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
|
@@ -15,7 +15,7 @@ module Avm
|
|
15
15
|
class WarpBase < ::Avm::Launcher::Paths::Real
|
16
16
|
include ::EacRubyUtils::SimpleCache
|
17
17
|
|
18
|
-
TARGET_REMOTE = ::Avm::
|
18
|
+
TARGET_REMOTE = ::Avm::Git::LauncherStereotypes::Git::Publish::PUBLISH_GIT_REMOTE_NAME
|
19
19
|
|
20
20
|
def initialize(instance)
|
21
21
|
@instance = instance
|
@@ -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
|
@@ -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
|
-
module
|
7
|
-
module
|
6
|
+
module Git
|
7
|
+
module LauncherStereotypes
|
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
|
-
module
|
7
|
-
module
|
6
|
+
module Git
|
7
|
+
module LauncherStereotypes
|
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
|
@@ -18,7 +18,7 @@ module Avm
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def source_remote_name
|
21
|
-
::Avm::
|
21
|
+
::Avm::Git::LauncherStereotypes::Git::Publish::PUBLISH_GIT_REMOTE_NAME
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/sub/{avm-tools/lib/avm/projects/stereotypes → avm-git/lib/avm/git/launcher_stereotypes}/git.rb
RENAMED
@@ -1,14 +1,14 @@
|
|
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
|
7
|
-
module
|
8
|
-
module
|
7
|
+
module Git
|
8
|
+
module LauncherStereotypes
|
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,17 +1,17 @@
|
|
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'
|
8
8
|
|
9
9
|
module Avm
|
10
|
-
module
|
11
|
-
module
|
10
|
+
module Git
|
11
|
+
module LauncherStereotypes
|
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
|
-
module
|
9
|
-
module
|
8
|
+
module Git
|
9
|
+
module LauncherStereotypes
|
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,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
|
-
module
|
8
|
-
module
|
7
|
+
module Git
|
8
|
+
module LauncherStereotypes
|
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,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
4
|
-
require 'avm/
|
3
|
+
require 'avm/launcher/stereotype'
|
4
|
+
require 'avm/git/launcher_stereotypes/git'
|
5
5
|
require 'eac_ruby_utils/core_ext'
|
6
6
|
|
7
7
|
module Avm
|
8
|
-
module
|
9
|
-
module
|
8
|
+
module Git
|
9
|
+
module LauncherStereotypes
|
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)
|
@@ -29,7 +29,7 @@ module Avm
|
|
29
29
|
def parent_git(parent_path)
|
30
30
|
return nil unless parent_path
|
31
31
|
|
32
|
-
if ::Avm::
|
32
|
+
if ::Avm::Git::LauncherStereotypes::Git.match?(parent_path)
|
33
33
|
parent_path
|
34
34
|
else
|
35
35
|
parent_git(parent_path.parent_path)
|
@@ -37,12 +37,12 @@ module Avm
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def other_git_stereotype?(path)
|
40
|
-
::Avm::
|
41
|
-
::Avm::
|
40
|
+
::Avm::Git::LauncherStereotypes::Git.match?(path) ||
|
41
|
+
::Avm::Git::LauncherStereotypes::GitSubrepo.match?(path)
|
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
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/git/launcher_stereotypes/git'
|
4
|
+
require 'avm/git/launcher_stereotypes/git_subrepo'
|
5
|
+
require 'avm/git/launcher_stereotypes/git_subtree'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module Git
|
10
|
+
module LauncherStereotypes
|
11
|
+
class Provider
|
12
|
+
STEREOTYPES = [::Avm::Git::LauncherStereotypes::Git,
|
13
|
+
::Avm::Git::LauncherStereotypes::GitSubrepo,
|
14
|
+
::Avm::Git::LauncherStereotypes::GitSubtree].freeze
|
15
|
+
|
16
|
+
def all
|
17
|
+
STEREOTYPES
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/sub/{avm-tools/spec/lib/avm/launcher/git → avm-git/spec/lib/avm/git/launcher}/base_spec.rb
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/launcher/
|
3
|
+
require 'avm/git/launcher/base'
|
4
4
|
|
5
|
-
RSpec.describe ::Avm::Launcher::
|
6
|
-
context 'new non-bare repository' do
|
5
|
+
RSpec.describe ::Avm::Git::Launcher::Base do
|
6
|
+
context 'new non-bare repository' do # rubocop:disable RSpec/ContextWording
|
7
7
|
let(:repo) do
|
8
8
|
r = described_class.new(::Dir.mktmpdir)
|
9
9
|
r.git
|
@@ -13,12 +13,12 @@ RSpec.describe ::Avm::Launcher::Git::Base do
|
|
13
13
|
describe '#remote_exist?' do
|
14
14
|
it { expect(repo.remote_exist?('origin')).to eq(false) }
|
15
15
|
|
16
|
-
context 'after remote added' do
|
16
|
+
context 'after remote added' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups:
|
17
17
|
before { repo.execute!('remote', 'add', 'origin', 'file:///path/to/remote') }
|
18
18
|
|
19
19
|
it { expect(repo.remote_exist?('origin')).to eq(true) }
|
20
20
|
|
21
|
-
context 'after remote removed' do
|
21
|
+
context 'after remote removed' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups:
|
22
22
|
before { repo.execute!('remote', 'remove', 'origin') }
|
23
23
|
|
24
24
|
it { expect(repo.remote_exist?('origin')).to eq(false) }
|
@@ -29,12 +29,12 @@ RSpec.describe ::Avm::Launcher::Git::Base do
|
|
29
29
|
describe '#assert_remote_url' do
|
30
30
|
it { expect(repo.remote_exist?('origin')).to eq(false) }
|
31
31
|
|
32
|
-
context 'after asserted remote URL "/remote1"' do
|
32
|
+
context 'after asserted remote URL "/remote1"' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups:
|
33
33
|
before { repo.assert_remote_url('origin', '/remote1') }
|
34
34
|
|
35
35
|
it { expect(repo.git.remote('origin').url).to eq('/remote1') }
|
36
36
|
|
37
|
-
context 'after asserted remote URL "/remote2"' do
|
37
|
+
context 'after asserted remote URL "/remote2"' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups:
|
38
38
|
before { repo.assert_remote_url('origin', '/remote2') }
|
39
39
|
|
40
40
|
it { expect(repo.git.remote('origin').url).to eq('/remote2') }
|
@@ -15,11 +15,11 @@ Gem::Specification.new do |s|
|
|
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.49'
|
19
|
+
s.add_dependency 'avm-eac_ruby_base1', '~> 0.24'
|
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.7'
|
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,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/git/launcher_stereotypes/git'
|
4
|
+
require 'avm/git/launcher_stereotypes/git_subrepo'
|
5
|
+
require 'avm/git/launcher_stereotypes/git_subtree'
|
6
|
+
require 'avm/eac_ruby_base1/launcher_stereotypes/base'
|
3
7
|
require 'eac_ruby_utils/core_ext'
|
4
8
|
|
5
9
|
module Avm
|
@@ -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]]
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/launcher/stereotype'
|
4
|
+
require 'avm/projects/stereotypes'
|
5
|
+
require 'avm/tools/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Tools
|
9
|
+
class Runner
|
10
|
+
class LauncherStereotypes
|
11
|
+
class List
|
12
|
+
runner_with :help, :output do
|
13
|
+
bool_opt '-d', '--deprecated'
|
14
|
+
end
|
15
|
+
|
16
|
+
def run
|
17
|
+
infov 'Found', stereotypes.count
|
18
|
+
run_output
|
19
|
+
end
|
20
|
+
|
21
|
+
def output_content
|
22
|
+
stereotypes.map { |s| "#{s}\n" }.join
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def stereotypes
|
28
|
+
(parsed.deprecated? ? deprecated_stereotypes : registry_stereotypes)
|
29
|
+
end
|
30
|
+
|
31
|
+
def registry_stereotypes
|
32
|
+
::Avm::Registry.launcher_stereotypes.available.sort_by { |s| [s.name] }
|
33
|
+
end
|
34
|
+
|
35
|
+
def deprecated_stereotypes
|
36
|
+
::Avm::Launcher::Stereotype.stereotypes.sort_by { |s| [s.stereotype_name] }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'active_support/core_ext/object'
|
4
|
-
require 'avm/launcher/
|
4
|
+
require 'avm/eac_ruby_base1/launcher/gem/build'
|
5
5
|
|
6
|
-
RSpec.describe ::Avm::Launcher::
|
6
|
+
RSpec.describe ::Avm::EacRubyBase1::Launcher::Gem::Build do
|
7
7
|
describe '#output_file' do
|
8
8
|
let(:gem_dir) { ::File.join(DUMMY_DIR, 'ruby_gem_stub') }
|
9
9
|
|
10
|
-
it 'builds .gem file' do
|
10
|
+
it 'builds .gem file' do # rubocop:disable RSpec/ExampleLength
|
11
11
|
expect(::File.directory?(gem_dir)).to eq true
|
12
12
|
build = described_class.new(gem_dir)
|
13
13
|
|
@@ -32,7 +32,7 @@ RSpec.describe ::Avm::Launcher::Ruby::Gem::Build do
|
|
32
32
|
expect(build.builded?).to eq false
|
33
33
|
end
|
34
34
|
|
35
|
-
def assert_open(build)
|
35
|
+
def assert_open(build) # rubocop:disable Metrics/AbcSize
|
36
36
|
expect(build.output_file.present?).to eq true
|
37
37
|
expect(build.builded?).to eq true
|
38
38
|
expect(::File.exist?(build.output_file)).to eq true
|
data/sub/avm-tools/spec/lib/avm/{launcher/ruby → eac_ruby_base1/launcher}/gem/specification_spec.rb
RENAMED
@@ -1,18 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
RSpec.describe ::Avm::Launcher::
|
3
|
+
RSpec.describe ::Avm::EacRubyBase1::Launcher::Gem::Specification do
|
4
4
|
let(:gemspec_file) { ::File.join(DUMMY_DIR, 'ruby_gem_stub', 'ruby_gem_stub.gemspec') }
|
5
5
|
let(:instance) { described_class.new(gemspec_file) }
|
6
6
|
|
7
7
|
describe '#parse_version_file' do
|
8
|
-
it 'parses valid version file' do
|
8
|
+
it 'parses valid version file' do # rubocop:disable RSpec/MultipleExpectations
|
9
9
|
file = ::File.join(DUMMY_DIR, 'ruby_gem_stub', 'lib', 'ruby_gem_stub', 'version.rb')
|
10
10
|
expect(::File.exist?(file)).to eq true
|
11
11
|
version = described_class.parse_version_file(file)
|
12
12
|
expect(version).to eq('1.0.0.pre.stub')
|
13
13
|
end
|
14
14
|
|
15
|
-
it 'does not parse invalid version file' do
|
15
|
+
it 'does not parse invalid version file' do # rubocop:disable RSpec/MultipleExpectations
|
16
16
|
file = __FILE__
|
17
17
|
expect(::File.exist?(file)).to eq true
|
18
18
|
version = described_class.parse_version_file(file)
|