class LetItCrash::Matchers::Git
Constants
- BRANCH_CMD
- SHA_CMD
- STATUS_CMD
Public Instance Methods
branch()
click to toggle source
This method reeks of :reek:UtilityFunction.
# File lib/letitcrash/matchers/git.rb, line 16 def branch ret = IO.popen(BRANCH_CMD).read.strip ret == 'HEAD' ? 'master' : ret end
matches?()
click to toggle source
This method reeks of :reek:UtilityFunction.
# File lib/letitcrash/matchers/git.rb, line 11 def matches? IO.popen(STATUS_CMD).read.start_with?('On branch') end
sha()
click to toggle source
This method reeks of :reek:UtilityFunction.
# File lib/letitcrash/matchers/git.rb, line 22 def sha IO.popen(SHA_CMD).read.strip end