Sha256: 6826250144a6b817328e3c1ebb34d5d56beb979a5beb24fc1fde53fb757bafee
Contents?: true
Size: 478 Bytes
Versions: 17
Compression:
Stored size: 478 Bytes
Contents
# frozen_string_literal: true module Lolcommits class VCSInfo def self.repo_root?(path = '.') GitInfo.repo_root?(path) || MercurialInfo.repo_root?(path) end def self.local_name(path = '.') if GitInfo.repo_root?(path) GitInfo.local_name(path) elsif MercurialInfo.repo_root?(path) MercurialInfo.local_name(path) else raise "'#{File.expand_path(path)}' is not the root of a supported VCS" end end end end
Version data entries
17 entries across 17 versions & 1 rubygems