class EacLauncher::Stereotypes::GitSubrepo

Public Class Methods

color() click to toggle source
# File lib/eac_launcher/stereotypes/git_subrepo.rb, line 16
def color
  :light_cyan
end
match?(path) click to toggle source
# File lib/eac_launcher/stereotypes/git_subrepo.rb, line 12
def match?(path)
  File.exist?(path.real.subpath('.gitrepo')) && subrepo_url(path.real) != 'none'
end
subrepo_url(path) click to toggle source
# File lib/eac_launcher/stereotypes/git_subrepo.rb, line 20
def subrepo_url(path)
  File.read(path.subpath('.gitrepo')).each_line do |l|
    m = /remote\s*=\s(.+)/.match(l)
    return m[1] if m
  end
  raise ::EacLauncher::Git::Error.new(path, '"remote = ... " not found')
end