class Graf::Filter

Constants

IS_GIT
IS_LOG

Public Class Methods

process() click to toggle source
# File lib/graf/filter.rb, line 9
def process
  o, e, s = Open3.capture3(IS_GIT)

  if e.include? 'Not a git repository'
    return 'Not a git repository (or any of the parent directories)'
  else
    o, e, s = Open3.capture3(IS_LOG)

    if e.include? 'bad default revision'
      return 'This git repository don\'t have any commits yet'
    else
      Source.authors()
    end
  end
end