churn 0.0.26 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- churn (0.0.26)
4
+ churn (0.0.27)
5
5
  chronic (>= 0.2.3)
6
6
  hirb
7
7
  json_pure
data/README.md CHANGED
@@ -8,7 +8,7 @@ Currently has full Git, Mercurial (hg), and Bazaar (bzr) support, and partial SV
8
8
  Authors:
9
9
 
10
10
  * danmayer
11
- * ajwalters
11
+ * ajwalters
12
12
  * cldwalker
13
13
  * absurdhero
14
14
 
@@ -18,50 +18,51 @@ __CI Build Status__
18
18
 
19
19
  This project runs [travis-ci.org](http://travis-ci.org)
20
20
 
21
- __Churn Usage__
21
+ __Churn Usage__
22
22
  Install with `gem install churn` or for bundler add to your Gemfile `gem 'churn'`
23
23
 
24
24
  * rake:
25
25
  * add `require 'churn'` to Rakefile
26
26
  * then run`rake churn` or `bundle exec rake churn`
27
- * use environment variables to control churn defaults
28
-
29
- ENV['CHURN_MINIMUM_CHURN_COUNT']
30
- ENV['CHURN_START_DATE']
27
+ * use environment variables to control churn defaults
28
+
29
+ ENV['CHURN_MINIMUM_CHURN_COUNT']
30
+ ENV['CHURN_START_DATE']
31
31
  ENV['CHURN_IGNORE_FILES']
32
-
33
- * CLI:
32
+
33
+ * CLI:
34
34
  * on command line run `churn` or `bundle exec churn`
35
35
  * need help run `churn -h` to get additional information
36
36
  * run the executable passing in options to override defaults
37
-
37
+
38
38
  churn -i "churn.gemspec, Gemfile" #ignore files
39
39
  churn -y #output yaml format opposed to text
40
40
  churn -c 10 #set minimum churn count on a file to 10
41
41
  churn -c 5 -y -i "Gemfile" #mix and match
42
-
43
-
44
- __Example Output__
42
+ churn --start_date "6 months ago" #Start looking at file changes from 6 months ago
43
+
44
+
45
+ __Example Output__
45
46
 
46
47
  **********************************************************************
47
- * Revision Changes
48
+ * Revision Changes
48
49
  **********************************************************************
49
- Files:
50
+ Files:
50
51
  +-------------------------------+
51
52
  | file |
52
53
  +-------------------------------+
53
54
  | Rakefile |
54
55
  | lib/churn/churn_calculator.rb |
55
56
  +-------------------------------+
56
-
57
- Classes:
57
+
58
+ Classes:
58
59
  +-------------------------------+-----------------+
59
60
  | file | klass |
60
61
  +-------------------------------+-----------------+
61
62
  | lib/churn/churn_calculator.rb | ChurnCalculator |
62
63
  +-------------------------------+-----------------+
63
-
64
- Methods:
64
+
65
+ Methods:
65
66
  +-------------------------------+----------------- +-------------------------------+
66
67
  | file | klass | method |
67
68
  +-------------------------------+-----------------+-------------------------------+
@@ -69,11 +70,11 @@ __Example Output__
69
70
  | lib/churn/churn_calculator.rb | ChurnCalculator | ChurnCalculator#display_array |
70
71
  | lib/churn/churn_calculator.rb | ChurnCalculator | ChurnCalculator#to_s |
71
72
  +-------------------------------+-----------------+-------------------------------+
72
-
73
+
73
74
  **********************************************************************
74
- * Project Churn
75
+ * Project Churn
75
76
  **********************************************************************
76
- Files:
77
+ Files:
77
78
  +------------------------------------+---------------+
78
79
  | file_path | times_changed |
79
80
  +------------------------------------+---------------+
@@ -86,17 +87,17 @@ __Example Output__
86
87
  | test/test_helper.rb | 4 |
87
88
  | test/unit/churn_calculator_test.rb | 3 |
88
89
  | test/churn_test.rb | 3 |
89
- +------------------------------------+---------------+
90
-
91
- Classes:
90
+ +------------------------------------+---------------+
91
+
92
+ Classes:
92
93
  +-------------------------------+-----------------+---------------+
93
94
  | file | klass | times_changed |
94
95
  +-------------------------------+-----------------+---------------+
95
96
  | lib/churn/churn_calculator.rb | ChurnCalculator | 1 |
96
97
  | lib/churn/churn_calculator.rb | ChurnCalculator | 1 |
97
98
  +-------------------------------+-----------------+---------------+
98
-
99
- Methods:
99
+
100
+ Methods:
100
101
  +-------------------------------+-----------------+-----------------------------------------+---------------+
101
102
  | file | klass | method | times_changed |
102
103
  +-------------------------------+-----------------+-----------------------------------------+---------------+
@@ -114,31 +115,32 @@ __Options__
114
115
  [~/projects/churn] churn -h
115
116
  NAME
116
117
  churn
117
-
118
+
118
119
  SYNOPSIS
119
120
  churn [options]+
120
-
121
+
121
122
  PARAMETERS
122
- --minimum_churn_count=minimum_churn_count, -c (0 ~>
123
- int(minimum_churn_count=3))
124
- --yaml, -y
125
- --ignore_files=[ignore_files], -i (0 ~> string(ignore_files=))
126
- --help, -h
123
+ --minimum_churn_count=minimum_churn_count, -c (0 ~> int(minimum_churn_count=3))
124
+ --yaml, -y
125
+ --ignore_files=[ignore_files], -i (0 ~> string(ignore_files=))
126
+ --start_date=[start_date], -s (0 ~> string(start_date=))
127
+ --help, -h
127
128
 
128
- __TODO:__
129
+ __TODO:__
129
130
 
130
- * SVN only supports file, add full SVN support
131
- * support bazaar, cvs, and darcs
131
+ * SVN only supports file, add full SVN support (method and line numbers)
132
+ * add support for cvs, and darcs
132
133
  * make storage directory configurable instead of using tmp
133
- * allow passing in directories to churn, directories to ignore
134
- * add a filter that allows for other files besides. *.rb
135
- * ignore files pattern, so you can ignore things like vendor/, lib/, or docs/
134
+ * allow passing in directories to churn
135
+ * add a filter that allows for other files besides. *.rb to get method/class checks
136
+ * improve line number matching for Ruby files
137
+ * add line number matching for other langauges
136
138
  * finish adding better documenation using YARD
137
- * rake task for building manpage (currently manually run ronn -b1 README.rdoc)
139
+ * rake task for building manpage (currently manually run `ronn -b1 README.rdoc`)
138
140
  * don't output methods and classes on a commit that has none detected (css and view only commits, etc)
139
141
 
140
142
  __Notes on Patches/Pull Requests__
141
-
143
+
142
144
  * Fork the project.
143
145
  * Make your feature addition or bug fix.
144
146
  * Add tests for it. This is important so I don't break it in a
@@ -150,4 +152,4 @@ __Notes on Patches/Pull Requests__
150
152
 
151
153
  __Copyright__
152
154
 
153
- Copyright (c) 2012 Dan Mayer. See LICENSE for details.
155
+ Copyright (c) 2013 Dan Mayer. See LICENSE for details.
data/bin/churn CHANGED
@@ -21,9 +21,15 @@ Main do
21
21
  default ''
22
22
  end
23
23
 
24
+ option('start_date', 's') do
25
+ cast :string
26
+ argument :optional
27
+ default ''
28
+ end
29
+
24
30
  def report_churn(output_string)
25
31
  require File.join(File.dirname(__FILE__), '..', 'lib', 'churn', 'churn_calculator')
26
- result = Churn::ChurnCalculator.new({:minimum_churn_count => params['minimum_churn_count'].value, :ignore_files => params['ignore_files'].value}).report(output_string)
32
+ result = Churn::ChurnCalculator.new({:minimum_churn_count => params['minimum_churn_count'].value, :ignore_files => params['ignore_files'].value, :start_date => params['start_date'].value}).report(output_string)
27
33
  unless output_string
28
34
  result = YAML::dump(result)
29
35
  end
@@ -23,6 +23,7 @@ module Churn
23
23
 
24
24
  # intialized the churn calculator object
25
25
  def initialize(options={})
26
+ options[:start_date]=nil if options[:start_date]==''
26
27
  start_date = options.fetch(:start_date) { '3 months ago' }
27
28
  @minimum_churn_count = options.fetch(:minimum_churn_count) { 5 }.to_i
28
29
  @ignore_files = (options.fetch(:ignore_files){ "" }).to_s.split(',').map(&:strip)
@@ -1,3 +1,3 @@
1
1
  module Churn
2
- VERSION = "0.0.26"
2
+ VERSION = "0.0.27"
3
3
  end
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: 43
4
+ hash: 41
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 26
10
- version: 0.0.26
9
+ - 27
10
+ version: 0.0.27
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Mayer