Sha256: 7b9b5442d39ff720ac7e8975442b09af79f1e62fcf2a1da9d61a51bcc741875c
Contents?: true
Size: 249 Bytes
Versions: 67
Compression:
Stored size: 249 Bytes
Contents
require 'grit' module Dockly::Util::Git extend self def git_repo @git_repo ||= Grit::Repo.new('.') end def git_sha @git_sha ||= git_repo.git.show.lines.first.chomp.match(/^commit ([a-f0-9]+)$/)[1][0..6] rescue 'unknown' end end
Version data entries
67 entries across 67 versions & 1 rubygems