Sha256: 399fe269b27959e410f3e8c9c6e56e7d2d095a1c945997232f747cf69678df26
Contents?: true
Size: 601 Bytes
Versions: 8
Compression:
Stored size: 601 Bytes
Contents
module EacLauncher module Stereotypes class GitSubrepo include EacLauncher::Stereotype class << self def match?(path) File.exist?(path.real.subpath('.gitrepo')) && subrepo_url(path.real) != 'none' end def color :light_cyan end 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 end end end end
Version data entries
8 entries across 8 versions & 1 rubygems