Sha256: d6b351d99d7238a105f7df15281f18849f99754e2deb7dea5586fb1a1bd21300
Contents?: true
Size: 572 Bytes
Versions: 7
Compression:
Stored size: 572 Bytes
Contents
module EacLauncher module Stereotypes class GitSubrepo include EacLauncher::Stereotype class << self def match?(path) File.exist?(path.subpath('.gitrepo')) && subrepo_url(path) != '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 "\"remote = ... \" not found (Path: #{path})" end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems