Sha256: 72a96c6891b270d31e52564e27644f9be25bda0373004ad8b4a126bc42af8f3f

Contents?: true

Size: 338 Bytes

Versions: 1

Compression:

Stored size: 338 Bytes

Contents

require "batcave/namespace"

module BatCave::Support::Git
  def project_root
    root = %x{git rev-parse --show-toplevel}.chomp
    if $?.exitstatus != 0
      raise "'git rev-parse --show-toplevel' failed. No project root found. Is this in a git clone?"
    end
    return root
  end # def project_root
end # class BatCave::Support::Git

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
batcave-0.0.1 lib/batcave/support/git.rb