churn 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/README.md +5 -2
- data/lib/churn/version.rb +1 -1
- data/lib/tasks/churn_tasks.rb +16 -14
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
__churn__
|
2
2
|
|
3
|
-
A Project to give the churn file, class, and method for a project for a given checkin. Over time the tool adds up the history of
|
3
|
+
A Project to give the churn file, class, and method for a project for a given checkin. Over time the tool adds up the history of churns to give the number of times a file, class, or method is changing during the life of a project.
|
4
4
|
Churn for files is immediate, but classes and methods requires buildings up a history using churn between revisions. The history is stored in ./tmp
|
5
5
|
|
6
6
|
Currently has full Git, Mercurial (hg), and Bazaar (bzr) support, and partial SVN support (supports only file level churn currently)
|
@@ -11,6 +11,7 @@ Authors:
|
|
11
11
|
* ajwalters
|
12
12
|
* cldwalker
|
13
13
|
* absurdhero
|
14
|
+
* bf4
|
14
15
|
|
15
16
|
__CI Build Status__
|
16
17
|
|
@@ -19,7 +20,9 @@ __CI Build Status__
|
|
19
20
|
This project runs [travis-ci.org](http://travis-ci.org)
|
20
21
|
|
21
22
|
__Churn Usage__
|
22
|
-
Install with `gem install churn` or for bundler add to your Gemfile `gem 'churn'
|
23
|
+
Install with `gem install churn` or for bundler add to your Gemfile `gem 'churn', :require => false`.
|
24
|
+
|
25
|
+
The reason you want require false is that when required by default churn is expecting to add some rake tasks, you don't really want or need it loading when running your server or tests. Previous versions required this change, churn will now do the right thing if you forget to add `require => false`.
|
23
26
|
|
24
27
|
* rake:
|
25
28
|
* add `require 'churn'` to Rakefile
|
data/lib/churn/version.rb
CHANGED
data/lib/tasks/churn_tasks.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
if defined?(RakeFileUtils) # self.respond_to?(:desc)
|
2
|
+
def report_churn()
|
3
|
+
require File.join(File.dirname(__FILE__), '..', 'churn', 'churn_calculator')
|
4
|
+
params = {}
|
5
|
+
{ :minimum_churn_count => ENV['CHURN_MINIMUM_CHURN_COUNT'],
|
6
|
+
:start_date => ENV['CHURN_START_DATE'],
|
7
|
+
:ignore_files => ENV['CHURN_IGNORE_FILES'],
|
8
|
+
}.each {|k,v| params[k] = v unless v.nil? }
|
9
|
+
Churn::ChurnCalculator.new(params).report
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Report the current churn for the project"
|
13
|
+
task :churn do
|
14
|
+
report = report_churn()
|
15
|
+
puts report
|
16
|
+
end
|
15
17
|
end
|
metadata
CHANGED