Sha256: b4afbfeeb5190c504cb7b6125a5b5aa9847e5219458c840a2444b5e8af7327b1
Contents?: true
Size: 450 Bytes
Versions: 6
Compression:
Stored size: 450 Bytes
Contents
module EY class Repo def initialize(path=File.expand_path('.')) @path = path end def current_branch head = File.read(File.join(@path, ".git/HEAD")).chomp if head.gsub!("ref: refs/heads/", "") head else nil end end def urls `git config -f #{@path}/.git/config --get-regexp 'remote.*.url'`.split(/\n/).map do |c| c.split.last end end end # Repo end # EY
Version data entries
6 entries across 4 versions & 1 rubygems