class Rack::ECG::Check::GitRevision
@!method initialize
Returns the SHA1 of the current commit, as reported by the git executable.
Public Instance Methods
result()
click to toggle source
# File lib/rack/ecg/check/git_revision.rb, line 9 def result _stdin, stdout, stderr, wait_thread = Open3.popen3("git rev-parse HEAD") success = wait_thread.value.success? status = success ? Status::OK : Status::ERROR value = success ? stdout.read : stderr.read value = value.strip Result.new(:git_revision, status, value) end