class RspecProfiling::VCS::GitSvn
Public Instance Methods
branch()
click to toggle source
# File lib/rspec_profiling/vcs/git_svn.rb, line 12 def branch nil end
sha()
click to toggle source
# File lib/rspec_profiling/vcs/git_svn.rb, line 16 def sha if version_control.nil? `git svn info | grep "Revision" | cut -f2 -d' '` else `svn info -r 'HEAD' | grep "Revision" | cut -f2 -d' '` end end
time()
click to toggle source
# File lib/rspec_profiling/vcs/git_svn.rb, line 24 def time if version_control.nil? Time.parse `git svn info | grep "Last Changed Date" | cut -f4,5,6 -d' '` else Time.parse `svn info -r 'HEAD' | grep "Last Changed Date" | cut -f4,5,6 -d' '` end end
version_control()
click to toggle source
returns nil if using `git svn`
# File lib/rspec_profiling/vcs/git_svn.rb, line 7 def version_control `[ -d .git/svn ] && [ x != x"$(ls -A .git/svn/)" ]` RspecProfiling::VCS::Svn unless $CHILD_STATUS.success? end