churn 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +0 -1
- data/Rakefile +3 -1
- data/VERSION +1 -1
- data/bin/churn +22 -0
- data/lib/tasks/churn_tasks.rb +0 -9
- metadata +15 -5
data/README.rdoc
CHANGED
@@ -7,7 +7,6 @@ TODO:
|
|
7
7
|
* SVN only supports file
|
8
8
|
* make storage directory configurable instead of using tmp
|
9
9
|
* allow passing in directories to churn, directories to ignore
|
10
|
-
* add a bin/ with args passed as well as just the rake task
|
11
10
|
* todo add a filter that allows for other files besides. *.rb
|
12
11
|
|
13
12
|
Usage:
|
data/Rakefile
CHANGED
@@ -8,10 +8,12 @@ begin
|
|
8
8
|
gem.name = "churn"
|
9
9
|
gem.summary = %Q{Providing additional churn metrics over the original metric_fu churn}
|
10
10
|
gem.description = %Q{High method and class churn has been shown to have increased bug and error rates. This gem helps you know what is changing a lot so you can do additional testing, code review, or refactoring to try to tame the volatile code. }
|
11
|
-
gem.email = "
|
11
|
+
gem.email = "dan@devver.net"
|
12
12
|
gem.homepage = "http://github.com/danmayer/churn"
|
13
13
|
gem.authors = ["Dan Mayer"]
|
14
14
|
gem.add_development_dependency "thoughtbot-shoulda"
|
15
|
+
gem.add_development_dependency "main"
|
16
|
+
gem.executables = ['churn']
|
15
17
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
18
|
end
|
17
19
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/bin/churn
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
require 'main'
|
3
|
+
|
4
|
+
#example usage. In the root of a project 'churn', or 'churn --help'
|
5
|
+
Main do
|
6
|
+
option('minimum_churn_count', 'c') do
|
7
|
+
argument :required
|
8
|
+
cast :int
|
9
|
+
default 3
|
10
|
+
end
|
11
|
+
|
12
|
+
def report_churn()
|
13
|
+
require File.join(File.dirname(__FILE__), '..', 'lib', 'churn', 'churn_calculator')
|
14
|
+
Churn::ChurnCalculator.new({:minimum_churn_count => params['minimum_churn_count'].value}).report
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
report = report_churn
|
19
|
+
puts report
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
data/lib/tasks/churn_tasks.rb
CHANGED
@@ -7,14 +7,5 @@ desc "Report the current churn for the project"
|
|
7
7
|
task :churn do
|
8
8
|
report = report_churn()
|
9
9
|
puts report
|
10
|
-
# puts "entire report"
|
11
|
-
# puts report.inspect.to_s
|
12
|
-
# puts "_"*50
|
13
|
-
# puts "changed classes: #{report[:churn][:changed_classes].inspect}"
|
14
|
-
# puts "_"*50
|
15
|
-
# puts "cahnged methods: #{report[:churn][:changed_methods].inspect}"
|
16
|
-
# puts "_"*50
|
17
|
-
# put
|
18
|
-
# s "method churn: #{report[:churn][:method_churn].inspect}"
|
19
10
|
end
|
20
11
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: churn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Mayer
|
@@ -10,7 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
|
12
12
|
date: 2010-01-08 00:00:00 -05:00
|
13
|
-
default_executable:
|
13
|
+
default_executable: churn
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thoughtbot-shoulda
|
@@ -22,10 +22,20 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: "0"
|
24
24
|
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: main
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
25
35
|
description: "High method and class churn has been shown to have increased bug and error rates. This gem helps you know what is changing a lot so you can do additional testing, code review, or refactoring to try to tame the volatile code. "
|
26
|
-
email:
|
27
|
-
executables:
|
28
|
-
|
36
|
+
email: dan@devver.net
|
37
|
+
executables:
|
38
|
+
- churn
|
29
39
|
extensions: []
|
30
40
|
|
31
41
|
extra_rdoc_files:
|