We created a code snippet that displays the git repository, git url, last commit and author of a rails application.
During development it is helpful to see the version of an application that is currently on stage or in production. With the following code you get all that inside a handy method.
Put it somwhere in your lib folder where rails is able to locate and load it. The script extends the ActionController::Base and ActionView::Base classes about the methods git_info and git_info_text. The latter may be used to render the information inside a template. So using
= git_info_text.html_safe
will print the following information
Now you always know who pushed the latest bug, enjoy.
Das sagen die Anderen:
Marcel
CuttyDultfunc