Sha256: 30599384ef6693e1220fe86f898698f09a9169c4a007d1b26e2362e2c0a611d3
Contents?: true
Size: 823 Bytes
Versions: 109
Compression:
Stored size: 823 Bytes
Contents
# frozen_string_literal: true require 'avm/launcher/git/error' require 'eac_ruby_utils/core_ext' require 'avm/projects/stereotype' module Avm module Projects module Stereotypes class GitSubrepo require_sub __FILE__ include Avm::Projects::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 ::Avm::Launcher::Git::Error.new(path, '"remote = ... " not found') end end end end end end
Version data entries
109 entries across 109 versions & 2 rubygems