module Idonethis::Adapters module Git class << self def commits(dir, since, how_many = 1000) require 'git' since_when = case since when 'yesterday' '1am yesterday' when 'today' '1am' else since end ::Git.open(dir).log(how_many).since(since_when) end def repo?(dir) File.exists?(File.join(dir, ".git")) end end end end