avm-tools 0.58.1 → 0.62.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/cached_download.rb +39 -0
- data/lib/avm/eac_redmine_base0/core_update.rb +110 -0
- data/lib/avm/eac_redmine_base0/data_unit.rb +27 -0
- data/lib/avm/eac_redmine_base0/deploy.rb +36 -0
- data/lib/avm/eac_redmine_base0/instance.rb +38 -0
- data/lib/avm/local_projects.rb +9 -0
- data/lib/avm/local_projects/instance.rb +35 -0
- data/lib/avm/local_projects/jobs/update.rb +29 -0
- data/lib/avm/projects.rb +9 -0
- data/lib/avm/projects/stereotype.rb +62 -0
- data/lib/avm/projects/stereotypes.rb +20 -0
- data/lib/avm/projects/stereotypes/git.rb +25 -0
- data/lib/avm/projects/stereotypes/git/local_project_mixin.rb +19 -0
- data/lib/avm/projects/stereotypes/git/publish.rb +15 -0
- data/lib/avm/projects/stereotypes/git/warp.rb +27 -0
- data/lib/avm/projects/stereotypes/git_subrepo.rb +34 -0
- data/lib/avm/projects/stereotypes/git_subrepo/publish.rb +14 -0
- data/lib/avm/projects/stereotypes/git_subrepo/warp.rb +87 -0
- data/lib/avm/projects/stereotypes/git_subtree.rb +51 -0
- data/lib/avm/projects/stereotypes/git_subtree/publish.rb +12 -0
- data/lib/avm/projects/stereotypes/git_subtree/warp.rb +29 -0
- data/lib/avm/projects/stereotypes/rails_application.rb +23 -0
- data/lib/avm/projects/stereotypes/redmine_plugin.rb +23 -0
- data/lib/avm/projects/stereotypes/ruby_gem.rb +30 -0
- data/lib/avm/projects/stereotypes/ruby_gem/local_project_mixin.rb +19 -0
- data/lib/avm/projects/stereotypes/ruby_gem/publish.rb +129 -0
- data/lib/avm/projects/stereotypes/ruby_gem/update.rb +59 -0
- data/lib/avm/stereotypes/eac_webapp_base0/runner/deploy.rb +3 -1
- data/lib/avm/sync.rb +94 -0
- data/lib/avm/tools/runner/eac_redmine_base0.rb +2 -2
- data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +67 -0
- data/lib/avm/tools/runner/eac_redmine_base0/deploy.rb +1 -1
- data/lib/avm/tools/runner/git/issue.rb +43 -4
- data/lib/avm/tools/runner/launcher.rb +10 -2
- data/lib/avm/tools/runner/launcher/instances.rb +45 -0
- data/lib/avm/tools/runner/launcher/projects.rb +50 -0
- data/lib/avm/tools/runner/launcher/publish.rb +65 -0
- data/lib/avm/tools/runner/local_project.rb +32 -0
- data/lib/avm/tools/runner/local_project/info.rb +25 -0
- data/lib/avm/tools/runner/local_project/update.rb +26 -0
- data/lib/avm/tools/version.rb +1 -1
- data/lib/eac_launcher.rb +1 -2
- data/lib/eac_launcher/context/instance_manager.rb +1 -0
- data/lib/eac_launcher/git/base/dirty_files.rb +5 -14
- data/lib/eac_launcher/git/publish_base.rb +1 -0
- data/lib/eac_launcher/git/sub_warp_base.rb +1 -1
- data/lib/eac_launcher/git/warp_base.rb +2 -2
- data/lib/eac_launcher/instances/base.rb +2 -2
- data/lib/eac_launcher/instances/runner_helper.rb +1 -1
- data/lib/eac_launcher/paths/logical.rb +2 -2
- data/template/avm/{stereotypes/eac_redmine_base0 → eac_redmine_base0}/deploy/config/install.sh.template +0 -0
- data/template/avm/{stereotypes/eac_redmine_base0 → eac_redmine_base0}/deploy/config/secrets.yml +0 -0
- data/vendor/eac_git/lib/eac_git/local.rb +1 -1
- data/vendor/eac_git/lib/eac_git/local/dirty_files.rb +38 -0
- data/vendor/eac_git/lib/eac_git/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +2 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +2 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +2 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +5 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +8 -8
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- metadata +41 -27
- data/lib/avm/stereotypes/eac_redmine_base0/data_unit.rb +0 -29
- data/lib/avm/stereotypes/eac_redmine_base0/deploy.rb +0 -38
- data/lib/avm/stereotypes/eac_redmine_base0/instance.rb +0 -40
- data/lib/eac_launcher/runner.rb +0 -21
- data/lib/eac_launcher/runner/instances.rb +0 -41
- data/lib/eac_launcher/runner/projects.rb +0 -46
- data/lib/eac_launcher/runner/publish.rb +0 -59
- data/lib/eac_launcher/stereotype.rb +0 -52
- data/lib/eac_launcher/stereotypes.rb +0 -14
- data/lib/eac_launcher/stereotypes/git.rb +0 -21
- data/lib/eac_launcher/stereotypes/git/publish.rb +0 -13
- data/lib/eac_launcher/stereotypes/git/warp.rb +0 -25
- data/lib/eac_launcher/stereotypes/git_subrepo.rb +0 -30
- data/lib/eac_launcher/stereotypes/git_subrepo/publish.rb +0 -12
- data/lib/eac_launcher/stereotypes/git_subrepo/warp.rb +0 -85
- data/lib/eac_launcher/stereotypes/git_subtree.rb +0 -47
- data/lib/eac_launcher/stereotypes/git_subtree/publish.rb +0 -10
- data/lib/eac_launcher/stereotypes/git_subtree/warp.rb +0 -27
- data/lib/eac_launcher/stereotypes/rails.rb +0 -21
- data/lib/eac_launcher/stereotypes/redmine_plugin.rb +0 -21
- data/lib/eac_launcher/stereotypes/ruby_gem.rb +0 -27
- data/lib/eac_launcher/stereotypes/ruby_gem/publish.rb +0 -127
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 447658cf671d6c1aac6466424cf7b18d4872629bdfb1bdf9c742cff32204b727
|
4
|
+
data.tar.gz: f7bf0f7474bd5b90b726b5cc19802d4cdaef60ae8eaa06a138c3a4ecd542e483
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a14e64ac9c8e6220ab30e4d24a86fee412dd7ba7b15d4825adfc3c064fe9b7ea1a0a96469e608ee85a5cc0041580f625bd1a367ba560db3a205428c28ae322eb
|
7
|
+
data.tar.gz: 227b8a6efafda6f7660549498858a09cc1e4900cf154464ef77095c430e7f915f0604c0662faec8d5b4515043a02bc79e66237beeaea075ecf1128fb6a526368
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/fs_cache'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
class CachedDownload
|
8
|
+
attr_reader :url, :fs_cache
|
9
|
+
|
10
|
+
def initialize(url, parent_fs_cache = nil)
|
11
|
+
@url = url
|
12
|
+
@fs_cache = (parent_fs_cache || ::Avm.fs_cache).child(url.parameterize)
|
13
|
+
end
|
14
|
+
|
15
|
+
def assert
|
16
|
+
download unless fs_cache.cached?
|
17
|
+
end
|
18
|
+
|
19
|
+
def download
|
20
|
+
::EacRubyUtils::Fs::Temp.on_file do |temp|
|
21
|
+
download_to(temp)
|
22
|
+
fs_cache.content_path.to_pathname.dirname.mkpath
|
23
|
+
::FileUtils.mv(temp.to_path, fs_cache.content_path)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def path
|
28
|
+
@path ||= fs_cache.content_path.to_pathname
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def download_to(local_file)
|
34
|
+
::URI.parse(url).open do |remote|
|
35
|
+
local_file.open('wb') { |handle| handle.write(remote.read) }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_redmine_base0/core_update'
|
4
|
+
require 'avm/cached_download'
|
5
|
+
require 'avm/sync'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacRedmineBase0
|
10
|
+
class CoreUpdate
|
11
|
+
enable_console_speaker
|
12
|
+
enable_simple_cache
|
13
|
+
common_constructor :instance, :version, :url
|
14
|
+
|
15
|
+
GITIGNORE_ADD = %w[/public/assets/**/* /config/install.sh /log/**/*].freeze
|
16
|
+
GITIGNORE_DEL = %w[/Gemfile.lock /plugins/* /public/themes/*].freeze
|
17
|
+
TARGET_KEEP = %w[/Gemfile.lock].freeze
|
18
|
+
|
19
|
+
def run
|
20
|
+
::EacRubyUtils::Fs::Temp.on_directory do |dir|
|
21
|
+
@tempdir = dir
|
22
|
+
assert_source_package
|
23
|
+
extract_package_to_tempdir
|
24
|
+
sync_content
|
25
|
+
change_git_ignore
|
26
|
+
validate_empty_dir
|
27
|
+
end
|
28
|
+
git_commit
|
29
|
+
success 'Done!'
|
30
|
+
end
|
31
|
+
|
32
|
+
def assert_source_package
|
33
|
+
infom 'Asserting source package...'
|
34
|
+
source_package.assert
|
35
|
+
infov 'Package cache path', source_package.path
|
36
|
+
infov 'Package size', source_package.path.size
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
attr_reader :tempdir
|
42
|
+
|
43
|
+
def change_git_ignore
|
44
|
+
file = target_path.join('.gitignore')
|
45
|
+
file.write(
|
46
|
+
(file.read.each_line.map(&:strip).reject { |line| GITIGNORE_DEL.include?(line) } +
|
47
|
+
['', '#eac_redmine_base0'] + GITIGNORE_ADD).map { |line| "#{line}\n" }.join
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
def extract_package_to_tempdir
|
52
|
+
infom "Extracting package to tempdir #{tempdir}..."
|
53
|
+
::EacRubyUtils::Envs.local.command(
|
54
|
+
'tar', '-xf', source_package.path.to_path, '-C', tempdir.to_path,
|
55
|
+
'--strip-components', '1'
|
56
|
+
).execute!
|
57
|
+
end
|
58
|
+
|
59
|
+
def git_commit
|
60
|
+
if git_repo.dirty?
|
61
|
+
infom 'Git commiting...'
|
62
|
+
git_repo.command('add', '--', target_path).execute!
|
63
|
+
git_repo.command('commit', '-m', git_commit_message, '--', target_path).execute!
|
64
|
+
else
|
65
|
+
infom 'Nothing to commit'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def git_commit_message
|
70
|
+
"Core: update to #{version}."
|
71
|
+
end
|
72
|
+
|
73
|
+
def git_repo_uncached
|
74
|
+
::EacGit::Local.new(target_path)
|
75
|
+
end
|
76
|
+
|
77
|
+
def sync_content
|
78
|
+
::Avm::Sync.new(source_path, target_path)
|
79
|
+
.add_exclude('/*').add_includes(*target_files_to_remove).move_mode(true).run
|
80
|
+
end
|
81
|
+
|
82
|
+
def source_package_uncached
|
83
|
+
::Avm::CachedDownload.new(url, ::Avm.fs_cache.child('eac_redmine_base0', 'core_update'))
|
84
|
+
end
|
85
|
+
|
86
|
+
def validate_empty_dir
|
87
|
+
if source_path.children.empty?
|
88
|
+
infom 'No content left in source directory'
|
89
|
+
else
|
90
|
+
fatal_error 'Found entries in source directory: ' +
|
91
|
+
source_path.children.map { |c| c.basename.to_path }.join(', ')
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def source_path_uncached
|
96
|
+
::Pathname.new(tempdir.to_path)
|
97
|
+
end
|
98
|
+
|
99
|
+
def target_files_to_remove
|
100
|
+
git_repo.command('ls-files').execute!
|
101
|
+
.each_line.map { |v| "/#{v.strip}" }
|
102
|
+
.without(*TARGET_KEEP)
|
103
|
+
end
|
104
|
+
|
105
|
+
def target_path_uncached
|
106
|
+
instance.read_entry('fs_path').to_pathname
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/data/instance/unit'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
require 'open-uri'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacRedmineBase0
|
9
|
+
class DataUnit < ::Avm::Data::Instance::Unit
|
10
|
+
common_constructor :instance
|
11
|
+
|
12
|
+
EXTENSION = '.tar'
|
13
|
+
|
14
|
+
def do_dump(data_path)
|
15
|
+
::File.open(data_path, 'wb') do |file|
|
16
|
+
file << URI.parse(export_url).read
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def export_url
|
21
|
+
uri = ::Addressable::URI.parse(instance.read_entry('web.url')) + '/backup/export'
|
22
|
+
uri.query_values = { key: instance.read_entry('admin.api_key') }
|
23
|
+
uri.to_s
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/stereotypes/eac_webapp_base0/deploy'
|
4
|
+
require 'eac_ruby_utils/ruby'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRedmineBase0
|
8
|
+
class Deploy < ::Avm::Stereotypes::EacWebappBase0::Deploy
|
9
|
+
set_callback :assert_instance_branch, :after, :run_installer
|
10
|
+
|
11
|
+
def run_installer
|
12
|
+
infom 'Running installer'
|
13
|
+
::EacRubyUtils::Ruby.on_clean_environment do
|
14
|
+
installer_command.system!
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def installer_command
|
19
|
+
instance.host_env.command(installer_path, install_task)
|
20
|
+
end
|
21
|
+
|
22
|
+
def installer_path
|
23
|
+
::File.join(instance.read_entry(:fs_path), 'plugins', 'redmine_installer', 'installer',
|
24
|
+
'run.sh')
|
25
|
+
end
|
26
|
+
|
27
|
+
def install_task
|
28
|
+
if instance.read_entry_optional('web.path').present?
|
29
|
+
'redmine_as_apache_path'
|
30
|
+
else
|
31
|
+
'redmine_as_apache_base'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_redmine_base0/data_unit'
|
4
|
+
require 'avm/stereotypes/eac_ubuntu_base0/docker_image'
|
5
|
+
require 'avm/stereotypes/eac_webapp_base0/instance'
|
6
|
+
require 'avm/stereotypes/rails/instance'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacRedmineBase0
|
10
|
+
class Instance < ::Avm::Stereotypes::EacWebappBase0::Instance
|
11
|
+
include ::Avm::Stereotypes::Rails::Instance
|
12
|
+
|
13
|
+
FILES_UNITS = { files: 'files' }.freeze
|
14
|
+
|
15
|
+
def docker_image_class
|
16
|
+
::Avm::Stereotypes::EacUbuntuBase0::DockerImage
|
17
|
+
end
|
18
|
+
|
19
|
+
def docker_run_arguments
|
20
|
+
[
|
21
|
+
'--volume', "#{read_entry(:fs_path)}:/home/myuser/eac_redmine_base0",
|
22
|
+
'--publish', "#{read_entry(:ssh_port)}:22",
|
23
|
+
'--publish', "#{read_entry(:http_port)}:80",
|
24
|
+
'--publish', "#{read_entry(:https_port)}:443"
|
25
|
+
]
|
26
|
+
end
|
27
|
+
|
28
|
+
def data_package
|
29
|
+
@data_package ||= ::Avm::Data::Instance::Package.new(
|
30
|
+
self,
|
31
|
+
units: {
|
32
|
+
all: ::Avm::EacRedmineBase0::DataUnit.new(self)
|
33
|
+
}
|
34
|
+
)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_launcher/paths/real'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
require 'avm/projects/stereotypes'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module LocalProjects
|
9
|
+
class Instance
|
10
|
+
enable_simple_cache
|
11
|
+
common_constructor :path do
|
12
|
+
self.path = path.to_pathname
|
13
|
+
source_stereotypes_mixins
|
14
|
+
end
|
15
|
+
|
16
|
+
# Backward compatibility with [EacLauncher::Paths::Logical].
|
17
|
+
# @return [EacLauncher::Paths::Real].
|
18
|
+
def real
|
19
|
+
::EacLauncher::Paths::Real.new(path.to_path)
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def stereotypes_uncached
|
25
|
+
::Avm::Projects::Stereotypes.list.select { |s| s.match?(self) }
|
26
|
+
end
|
27
|
+
|
28
|
+
def source_stereotypes_mixins
|
29
|
+
stereotypes.each do |s|
|
30
|
+
s.local_project_mixin_module.if_present { |v| extend(v) }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module LocalProjects
|
7
|
+
module Jobs
|
8
|
+
class Update
|
9
|
+
enable_console_speaker
|
10
|
+
common_constructor :instance
|
11
|
+
|
12
|
+
def run
|
13
|
+
instance.stereotypes.each { |stereotype| run_stereotype(stereotype) }
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def run_stereotype(stereotype)
|
19
|
+
if stereotype.update_class.present?
|
20
|
+
puts stereotype.label + ': update class found. Running...'
|
21
|
+
stereotype.update_class.new(instance).run
|
22
|
+
else
|
23
|
+
puts stereotype.label + ': update class not found'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/avm/projects.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/core_ext/string/inflections'
|
4
|
+
require 'colorized_string'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Projects
|
8
|
+
module Stereotype
|
9
|
+
class << self
|
10
|
+
attr_reader :stereotypes
|
11
|
+
|
12
|
+
def included(base)
|
13
|
+
@stereotypes ||= []
|
14
|
+
@stereotypes << base
|
15
|
+
base.extend(ClassMethods)
|
16
|
+
end
|
17
|
+
|
18
|
+
def git_stereotypes
|
19
|
+
stereotypes.select { |c| c.name.demodulize.downcase.match('git') }
|
20
|
+
end
|
21
|
+
|
22
|
+
def nogit_stereotypes
|
23
|
+
stereotypes - git_stereotypes
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
module ClassMethods
|
28
|
+
def label
|
29
|
+
::ColorizedString.new(stereotype_name).send(color)
|
30
|
+
end
|
31
|
+
|
32
|
+
def stereotype_name
|
33
|
+
name.demodulize
|
34
|
+
end
|
35
|
+
|
36
|
+
{
|
37
|
+
local_project_mixin: ::Module,
|
38
|
+
publish: ::Class,
|
39
|
+
update: ::Class,
|
40
|
+
warp: ::Class
|
41
|
+
}.each do |name, is_a|
|
42
|
+
define_method "#{name}_#{is_a.name.underscore}" do
|
43
|
+
sub_constant(name.to_s.camelcase, is_a)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def sub_constant(constant_name, is_a)
|
50
|
+
constant = const_get(constant_name)
|
51
|
+
unless is_a.if_present(true) { |v| constant.is_a?(v) }
|
52
|
+
raise("#{constant} is not a #{is_a}")
|
53
|
+
end
|
54
|
+
|
55
|
+
constant
|
56
|
+
rescue NameError
|
57
|
+
nil
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/projects/stereotype'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Projects
|
8
|
+
module Stereotypes
|
9
|
+
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
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/projects/stereotype'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Projects
|
8
|
+
module Stereotypes
|
9
|
+
class Git
|
10
|
+
require_sub __FILE__
|
11
|
+
include Avm::Projects::Stereotype
|
12
|
+
|
13
|
+
class << self
|
14
|
+
def match?(path)
|
15
|
+
File.directory?(path.real.subpath('.git'))
|
16
|
+
end
|
17
|
+
|
18
|
+
def color
|
19
|
+
:white
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|