Sha256: 7b84adb0172b3eee5b1060bd7eb35d72b9f8053aff4f3851ab4714ba44eef3c9
Contents?: true
Size: 538 Bytes
Versions: 29
Compression:
Stored size: 538 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 dir = KnapsackPro::Config::Env.project_dir File.expand_path(dir) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems