Just a quick tip, you can run shell commands from Ruby using the following syntax:

%x(git log)
# or
system('git log')