churn 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +4 -0
  2. data/VERSION +1 -1
  3. data/lib/churn/churn_calculator.rb +7 -2
  4. metadata +32 -2
data/Rakefile CHANGED
@@ -14,6 +14,10 @@ begin
14
14
  gem.add_development_dependency "thoughtbot-shoulda"
15
15
  gem.add_dependency "main"
16
16
  gem.add_dependency "json"
17
+ gem.add_dependency "chronic", '~> 0.2.3'
18
+ gem.add_dependency "sexp_processor", '~> 3.0.3'
19
+ gem.add_dependency "ruby_parser", '~> 2.0.4'
20
+
17
21
  gem.executables = ['churn']
18
22
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
23
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -19,9 +19,10 @@ module Churn
19
19
  start_date = options.fetch(:start_date) { '3 months ago' }
20
20
  @minimum_churn_count = options.fetch(:minimum_churn_count) { 5 }
21
21
  @source_control = set_source_control(start_date)
22
+ @changes = {}
22
23
  @revision_changes = {}
23
- @method_changes = {}
24
24
  @class_changes = {}
25
+ @method_changes = {}
25
26
  end
26
27
 
27
28
  def report(print = true)
@@ -87,6 +88,10 @@ module Churn
87
88
 
88
89
  private
89
90
 
91
+ def filters
92
+ /.*\.rb/
93
+ end
94
+
90
95
  def display_array(array)
91
96
  result = ""
92
97
  array.each { |element| result += " * #{element.inspect}\n" } if array
@@ -134,7 +139,7 @@ module Churn
134
139
  changed_classes = []
135
140
  changed_methods = []
136
141
  changed_files.each do |file_changes|
137
- if file_changes.first.match(/.*\.rb/)
142
+ if file_changes.first.match(filters)
138
143
  classes, methods = get_changes(file_changes)
139
144
  changed_classes += classes
140
145
  changed_methods += methods
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
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-08 00:00:00 -05:00
12
+ date: 2010-01-12 00:00:00 -05:00
13
13
  default_executable: churn
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -42,6 +42,36 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: "0"
44
44
  version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: chronic
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 0.2.3
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: sexp_processor
57
+ type: :runtime
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ version: 3.0.3
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: ruby_parser
67
+ type: :runtime
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ version: 2.0.4
74
+ version:
45
75
  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. "
46
76
  email: dan@devver.net
47
77
  executables: