Sha256: 62fa7ee7a935b6e40fc2978eb2cef2df3c73a00f50a126474790433fe3d46a32
Contents?: true
Size: 502 Bytes
Versions: 85
Compression:
Stored size: 502 Bytes
Contents
module KnapsackPro module RepositoryAdapters class GitAdapter < BaseAdapter def commit_hash `git -C "#{working_dir}" rev-parse HEAD`.strip end def branch `git -C "#{working_dir}" rev-parse --abbrev-ref HEAD`.strip end def branches str_branches = `git rev-parse --abbrev-ref --branches` str_branches.split("\n") end private def working_dir KnapsackPro::Config::Env.project_dir end end end end
Version data entries
85 entries across 85 versions & 1 rubygems