churn 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ RAILS_ENV=development bundle install && bundle exec rake && bundle exec rake churn
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- churn (0.0.22)
4
+ churn (0.0.24)
5
5
  chronic (>= 0.2.3)
6
6
  hirb
7
7
  json_pure
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.24
1
+ 0.0.25
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "churn"
8
- s.version = "0.0.24"
8
+ s.version = "0.0.25"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Mayer"]
12
- s.date = "2012-09-25"
12
+ s.date = "2012-12-17"
13
13
  s.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. "
14
14
  s.email = "dan@mayerdan.com"
15
15
  s.executables = ["churn"]
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  "README.md"
19
19
  ]
20
20
  s.files = [
21
+ ".deferred_server",
21
22
  ".document",
22
23
  ".travis.yml",
23
24
  "Gemfile",
@@ -25,7 +25,7 @@ module Churn
25
25
  def initialize(options={})
26
26
  start_date = options.fetch(:start_date) { '3 months ago' }
27
27
  @minimum_churn_count = options.fetch(:minimum_churn_count) { 5 }.to_i
28
- @ignore_files = (options.fetch(:ignore_files){ "" }).split(',').map(&:strip)
28
+ @ignore_files = (options.fetch(:ignore_files){ "" }).to_s.split(',').map(&:strip)
29
29
  @ignore_files << '/dev/null'
30
30
  @source_control = set_source_control(start_date)
31
31
  @changes = {}
@@ -1,10 +1,11 @@
1
1
  def report_churn()
2
2
  require File.join(File.dirname(__FILE__), '..', 'churn', 'churn_calculator')
3
- Churn::ChurnCalculator.new({
4
- :minimum_churn_count => ENV['CHURN_MINIMUM_CHURN_COUNT'],
5
- :start_date => ENV['CHURN_START_DATE'],
6
- :ignore_files => ENV['CHURN_IGNORE_FILES'],
7
- }).report
3
+ params = {}
4
+ { :minimum_churn_count => ENV['CHURN_MINIMUM_CHURN_COUNT'],
5
+ :start_date => ENV['CHURN_START_DATE'],
6
+ :ignore_files => ENV['CHURN_IGNORE_FILES'],
7
+ }.each {|k,v| params[k] = v unless v.nil? }
8
+ Churn::ChurnCalculator.new(params).report
8
9
  end
9
10
 
10
11
  desc "Report the current churn for the project"
@@ -12,4 +13,3 @@ task :churn do
12
13
  report = report_churn()
13
14
  puts report
14
15
  end
15
-
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: churn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 47
4
+ hash: 45
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 24
10
- version: 0.0.24
9
+ - 25
10
+ version: 0.0.25
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Mayer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-25 00:00:00 Z
18
+ date: 2012-12-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -187,6 +187,7 @@ extra_rdoc_files:
187
187
  - LICENSE
188
188
  - README.md
189
189
  files:
190
+ - .deferred_server
190
191
  - .document
191
192
  - .travis.yml
192
193
  - Gemfile