Class | Churn::ChurnCalculator |
In: |
lib/churn/calculator.rb
|
Parent: | Object |
The work horse of the the churn library. This class takes user input, determines the SCM the user is using. It then determines changes made during this revision. Finally it reads all the changes from previous revisions and displays human readable output on the command line. It can also output a yaml format readable by other tools such as metric_fu and Caliper.
Emits various data from source control to be analyzed later… Currently this is broken up like this as a throwback to metric_fu
this method generates the past history of a churn project from first commit to current running the report for oldest commits first so they are built up correctly
prepares the data for the given project to be reported. reads git/svn logs analyzes the output, generates a report and either formats as a nice string or returns hash. @param [Boolean] format to return the data, true for string or false for hash @return [Object] returns either a pretty string or a hash representing the churn of the project