Sha256: c07cd7456c0a840e753c679b84e56280493e56951a4faeefc7c0089336487f67
Contents?: true
Size: 468 Bytes
Versions: 11
Compression:
Stored size: 468 Bytes
Contents
require 'contracts' require 'git' module GitHubStatus module Support module Git include ::Contracts::Core include ::Contracts::Builtin Contract None => ::Git::Base def git @git ||= ::Git.open "#{workdir}/#{path}" rescue ArgumentError STDERR.puts "#{path} is not a git repository" abort end Contract None => String def sha @sha ||= git.revparse 'HEAD' end end end end
Version data entries
11 entries across 11 versions & 1 rubygems