module Github::Validations::Token

def validates_token_for(method, path)


request is sent.
Ensures that required authentication token is present before
def validates_token_for(method, path)
  return true unless TOKEN_REQUIRED.grep("#{method} #{path}").empty?
  token_required = false
  TOKEN_REQUIRED_REGEXP.each do |regex|
    if "#{method} #{path}" =~ regex
      token_required = true
    end
  end
  return token_required
end