Class: RspecProfiling::VCS::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_profiling/vcs/git.rb

Instance Method Summary collapse

Instance Method Details

#branchObject



6
7
8
# File 'lib/rspec_profiling/vcs/git.rb', line 6

def branch
  `git rev-parse --abbrev-ref HEAD`.chomp
end

#shaObject



10
11
12
# File 'lib/rspec_profiling/vcs/git.rb', line 10

def sha
  `git rev-parse HEAD`.chomp
end

#timeObject



14
15
16
# File 'lib/rspec_profiling/vcs/git.rb', line 14

def time
  Time.parse `git show -s --format=%ci #{sha}`
end