Sha256: 1261af04847be6fc7b9a60c94dc5c228d0a598d32a9018a9d77f5d3d45759b06
Contents?: true
Size: 473 Bytes
Versions: 21
Compression:
Stored size: 473 Bytes
Contents
module LogCabin module Modules ## # Pull state from a git hash module GitHash include Prospectus.helpers.find(:chdir) def load! chdir_helper do short_arg = @long ? '' : '--short' hash = `git rev-parse #{short_arg} HEAD 2>/dev/null`.chomp raise('No hash found') if hash.empty? @state.value = hash end end private def long @long = true end end end end
Version data entries
21 entries across 21 versions & 1 rubygems