churn 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/{LICENSE → LICENSE.txt} +0 -0
- data/README.md +137 -120
- data/bin/churn +27 -12
- data/churn.gemspec +7 -21
- data/lib/churn/calculator.rb +24 -11
- data/lib/churn/history.rb +1 -1
- data/lib/churn/location_mapping.rb +1 -1
- data/lib/churn/options.rb +7 -3
- data/lib/churn/scm/bzr_analyzer.rb +11 -4
- data/lib/churn/scm/git_analyzer.rb +5 -3
- data/lib/churn/scm/hg_analyzer.rb +11 -4
- data/lib/churn/scm/source_control.rb +6 -8
- data/lib/churn/scm/svn_analyzer.rb +9 -3
- data/lib/churn/version.rb +1 -1
- metadata +24 -190
- data/.deferred_server +0 -1
- data/.document +0 -5
- data/.gitignore +0 -11
- data/.travis.yml +0 -6
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -79
- data/Rakefile +0 -41
- data/doc/Churn.html +0 -165
- data/doc/Churn/BzrAnalyzer.html +0 -276
- data/doc/Churn/ChurnCalculator.html +0 -578
- data/doc/Churn/ChurnHistory.html +0 -250
- data/doc/Churn/ChurnOptions.html +0 -393
- data/doc/Churn/GitAnalyzer.html +0 -311
- data/doc/Churn/HgAnalyzer.html +0 -276
- data/doc/Churn/LocationMapping.html +0 -448
- data/doc/Churn/SourceControl.html +0 -451
- data/doc/Churn/SvnAnalyzer.html +0 -311
- data/doc/LICENSE.html +0 -123
- data/doc/Object.html +0 -246
- data/doc/created.rid +0 -15
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +0 -100
- data/doc/js/darkfish.js +0 -155
- data/doc/js/jquery.js +0 -18
- data/doc/js/navigation.js +0 -142
- data/doc/js/search.js +0 -94
- data/doc/js/search_index.js +0 -1
- data/doc/js/searcher.js +0 -228
- data/doc/rdoc.css +0 -595
- data/doc/table_of_contents.html +0 -167
- data/test/data/churn_calculator.rb +0 -217
- data/test/data/test_helper.rb +0 -14
- data/test/test_helper.rb +0 -21
- data/test/unit/bzr_analyzer_test.rb +0 -65
- data/test/unit/churn_calculator_test.rb +0 -181
- data/test/unit/churn_history_test.rb +0 -24
- data/test/unit/churn_options_test.rb +0 -16
- data/test/unit/git_analyzer_test.rb +0 -88
- data/test/unit/hg_analyzer_test.rb +0 -66
- data/test/unit/location_mapping_test.rb +0 -35
- data/test/unit/source_control_test.rb +0 -22
- data/test/unit/svn_analyzer_test.rb +0 -65
data/doc/Churn/GitAnalyzer.html
DELETED
@@ -1,311 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>class Churn::GitAnalyzer - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "../";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="../index.html">Home</a>
|
28
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
<div id="file-metadata">
|
49
|
-
<nav id="file-list-section" class="section">
|
50
|
-
<h3 class="section-header">Defined In</h3>
|
51
|
-
<ul>
|
52
|
-
<li>lib/churn/scm/git_analyzer.rb
|
53
|
-
</ul>
|
54
|
-
</nav>
|
55
|
-
|
56
|
-
|
57
|
-
</div>
|
58
|
-
|
59
|
-
<div id="class-metadata">
|
60
|
-
|
61
|
-
<nav id="parent-class-section" class="section">
|
62
|
-
<h3 class="section-header">Parent</h3>
|
63
|
-
|
64
|
-
<p class="link">SourceControl
|
65
|
-
|
66
|
-
</nav>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
<!-- Method Quickref -->
|
71
|
-
<nav id="method-list-section" class="section">
|
72
|
-
<h3 class="section-header">Methods</h3>
|
73
|
-
|
74
|
-
<ul class="link-list">
|
75
|
-
|
76
|
-
<li ><a href="#method-c-supported-3F">::supported?</a>
|
77
|
-
|
78
|
-
<li ><a href="#method-i-get_commit_history">#get_commit_history</a>
|
79
|
-
|
80
|
-
<li ><a href="#method-i-get_logs">#get_logs</a>
|
81
|
-
|
82
|
-
<li ><a href="#method-i-get_revisions">#get_revisions</a>
|
83
|
-
|
84
|
-
</ul>
|
85
|
-
</nav>
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
<div id="project-metadata">
|
90
|
-
<nav id="fileindex-section" class="section project-section">
|
91
|
-
<h3 class="section-header">Pages</h3>
|
92
|
-
|
93
|
-
<ul>
|
94
|
-
|
95
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
96
|
-
|
97
|
-
</ul>
|
98
|
-
</nav>
|
99
|
-
|
100
|
-
<nav id="classindex-section" class="section project-section">
|
101
|
-
<h3 class="section-header">Class and Module Index</h3>
|
102
|
-
|
103
|
-
<ul class="link-list">
|
104
|
-
|
105
|
-
<li><a href="../Churn.html">Churn</a>
|
106
|
-
|
107
|
-
<li><a href="../Churn/BzrAnalyzer.html">Churn::BzrAnalyzer</a>
|
108
|
-
|
109
|
-
<li><a href="../Churn/ChurnCalculator.html">Churn::ChurnCalculator</a>
|
110
|
-
|
111
|
-
<li><a href="../Churn/ChurnHistory.html">Churn::ChurnHistory</a>
|
112
|
-
|
113
|
-
<li><a href="../Churn/ChurnOptions.html">Churn::ChurnOptions</a>
|
114
|
-
|
115
|
-
<li><a href="../Churn/GitAnalyzer.html">Churn::GitAnalyzer</a>
|
116
|
-
|
117
|
-
<li><a href="../Churn/HgAnalyzer.html">Churn::HgAnalyzer</a>
|
118
|
-
|
119
|
-
<li><a href="../Churn/LocationMapping.html">Churn::LocationMapping</a>
|
120
|
-
|
121
|
-
<li><a href="../Churn/SourceControl.html">Churn::SourceControl</a>
|
122
|
-
|
123
|
-
<li><a href="../Churn/SvnAnalyzer.html">Churn::SvnAnalyzer</a>
|
124
|
-
|
125
|
-
<li><a href="../Object.html">Object</a>
|
126
|
-
|
127
|
-
</ul>
|
128
|
-
</nav>
|
129
|
-
|
130
|
-
</div>
|
131
|
-
</nav>
|
132
|
-
|
133
|
-
<div id="documentation">
|
134
|
-
<h1 class="class">class Churn::GitAnalyzer</h1>
|
135
|
-
|
136
|
-
<div id="description" class="description">
|
137
|
-
|
138
|
-
<p>analizes git SCM to find recently changed files, and what lines have been
|
139
|
-
altered</p>
|
140
|
-
|
141
|
-
</div><!-- description -->
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<!-- Methods -->
|
156
|
-
|
157
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
158
|
-
<h3 class="section-header">Public Class Methods</h3>
|
159
|
-
|
160
|
-
|
161
|
-
<div id="method-c-supported-3F" class="method-detail ">
|
162
|
-
|
163
|
-
<div class="method-heading">
|
164
|
-
<span class="method-name">supported?</span><span
|
165
|
-
class="method-args">()</span>
|
166
|
-
|
167
|
-
<span class="method-click-advice">click to toggle source</span>
|
168
|
-
|
169
|
-
</div>
|
170
|
-
|
171
|
-
|
172
|
-
<div class="method-description">
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
<div class="method-source-code" id="supported-3F-source">
|
180
|
-
<pre><span class="ruby-comment"># File lib/churn/scm/git_analyzer.rb, line 6</span>
|
181
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">supported?</span>
|
182
|
-
<span class="ruby-operator">!</span><span class="ruby-operator">!</span>(<span class="ruby-value">%xgit branch 2>&1`</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">$?</span>.<span class="ruby-identifier">success?</span>)
|
183
|
-
<span class="ruby-keyword">end</span></pre>
|
184
|
-
</div><!-- supported-3F-source -->
|
185
|
-
|
186
|
-
</div>
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
</div><!-- supported-3F-method -->
|
192
|
-
|
193
|
-
|
194
|
-
</section><!-- public-class-method-details -->
|
195
|
-
|
196
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
197
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
198
|
-
|
199
|
-
|
200
|
-
<div id="method-i-get_commit_history" class="method-detail ">
|
201
|
-
|
202
|
-
<div class="method-heading">
|
203
|
-
<span class="method-name">get_commit_history</span><span
|
204
|
-
class="method-args">()</span>
|
205
|
-
|
206
|
-
<span class="method-click-advice">click to toggle source</span>
|
207
|
-
|
208
|
-
</div>
|
209
|
-
|
210
|
-
|
211
|
-
<div class="method-description">
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
<div class="method-source-code" id="get_commit_history-source">
|
219
|
-
<pre><span class="ruby-comment"># File lib/churn/scm/git_analyzer.rb, line 18</span>
|
220
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_commit_history</span>
|
221
|
-
<span class="ruby-value">%xgit log --reverse --pretty=format:"%H"`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/\n/</span>).<span class="ruby-identifier">reject</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-string">""</span>}
|
222
|
-
<span class="ruby-keyword">end</span></pre>
|
223
|
-
</div><!-- get_commit_history-source -->
|
224
|
-
|
225
|
-
</div>
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
</div><!-- get_commit_history-method -->
|
231
|
-
|
232
|
-
|
233
|
-
<div id="method-i-get_logs" class="method-detail ">
|
234
|
-
|
235
|
-
<div class="method-heading">
|
236
|
-
<span class="method-name">get_logs</span><span
|
237
|
-
class="method-args">()</span>
|
238
|
-
|
239
|
-
<span class="method-click-advice">click to toggle source</span>
|
240
|
-
|
241
|
-
</div>
|
242
|
-
|
243
|
-
|
244
|
-
<div class="method-description">
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
<div class="method-source-code" id="get_logs-source">
|
252
|
-
<pre><span class="ruby-comment"># File lib/churn/scm/git_analyzer.rb, line 10</span>
|
253
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_logs</span>
|
254
|
-
<span class="ruby-node">%xgit log #{date_range} --name-only --pretty=format:`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/\n/</span>).<span class="ruby-identifier">reject</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-string">""</span>}
|
255
|
-
<span class="ruby-keyword">end</span></pre>
|
256
|
-
</div><!-- get_logs-source -->
|
257
|
-
|
258
|
-
</div>
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
</div><!-- get_logs-method -->
|
264
|
-
|
265
|
-
|
266
|
-
<div id="method-i-get_revisions" class="method-detail ">
|
267
|
-
|
268
|
-
<div class="method-heading">
|
269
|
-
<span class="method-name">get_revisions</span><span
|
270
|
-
class="method-args">()</span>
|
271
|
-
|
272
|
-
<span class="method-click-advice">click to toggle source</span>
|
273
|
-
|
274
|
-
</div>
|
275
|
-
|
276
|
-
|
277
|
-
<div class="method-description">
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
<div class="method-source-code" id="get_revisions-source">
|
285
|
-
<pre><span class="ruby-comment"># File lib/churn/scm/git_analyzer.rb, line 14</span>
|
286
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_revisions</span>
|
287
|
-
<span class="ruby-node">%xgit log #{date_range} --pretty=format:"%H"`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/\n/</span>).<span class="ruby-identifier">reject</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-string">""</span>}
|
288
|
-
<span class="ruby-keyword">end</span></pre>
|
289
|
-
</div><!-- get_revisions-source -->
|
290
|
-
|
291
|
-
</div>
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
</div><!-- get_revisions-method -->
|
297
|
-
|
298
|
-
|
299
|
-
</section><!-- public-instance-method-details -->
|
300
|
-
|
301
|
-
</section><!-- 5Buntitled-5D -->
|
302
|
-
|
303
|
-
</div><!-- documentation -->
|
304
|
-
|
305
|
-
|
306
|
-
<footer id="validator-badges">
|
307
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
308
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
309
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
310
|
-
</footer>
|
311
|
-
|
data/doc/Churn/HgAnalyzer.html
DELETED
@@ -1,276 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>class Churn::HgAnalyzer - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "../";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="../index.html">Home</a>
|
28
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
<div id="file-metadata">
|
49
|
-
<nav id="file-list-section" class="section">
|
50
|
-
<h3 class="section-header">Defined In</h3>
|
51
|
-
<ul>
|
52
|
-
<li>lib/churn/scm/hg_analyzer.rb
|
53
|
-
</ul>
|
54
|
-
</nav>
|
55
|
-
|
56
|
-
|
57
|
-
</div>
|
58
|
-
|
59
|
-
<div id="class-metadata">
|
60
|
-
|
61
|
-
<nav id="parent-class-section" class="section">
|
62
|
-
<h3 class="section-header">Parent</h3>
|
63
|
-
|
64
|
-
<p class="link">SourceControl
|
65
|
-
|
66
|
-
</nav>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
<!-- Method Quickref -->
|
71
|
-
<nav id="method-list-section" class="section">
|
72
|
-
<h3 class="section-header">Methods</h3>
|
73
|
-
|
74
|
-
<ul class="link-list">
|
75
|
-
|
76
|
-
<li ><a href="#method-c-supported-3F">::supported?</a>
|
77
|
-
|
78
|
-
<li ><a href="#method-i-get_logs">#get_logs</a>
|
79
|
-
|
80
|
-
<li ><a href="#method-i-get_revisions">#get_revisions</a>
|
81
|
-
|
82
|
-
</ul>
|
83
|
-
</nav>
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<div id="project-metadata">
|
88
|
-
<nav id="fileindex-section" class="section project-section">
|
89
|
-
<h3 class="section-header">Pages</h3>
|
90
|
-
|
91
|
-
<ul>
|
92
|
-
|
93
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
94
|
-
|
95
|
-
</ul>
|
96
|
-
</nav>
|
97
|
-
|
98
|
-
<nav id="classindex-section" class="section project-section">
|
99
|
-
<h3 class="section-header">Class and Module Index</h3>
|
100
|
-
|
101
|
-
<ul class="link-list">
|
102
|
-
|
103
|
-
<li><a href="../Churn.html">Churn</a>
|
104
|
-
|
105
|
-
<li><a href="../Churn/BzrAnalyzer.html">Churn::BzrAnalyzer</a>
|
106
|
-
|
107
|
-
<li><a href="../Churn/ChurnCalculator.html">Churn::ChurnCalculator</a>
|
108
|
-
|
109
|
-
<li><a href="../Churn/ChurnHistory.html">Churn::ChurnHistory</a>
|
110
|
-
|
111
|
-
<li><a href="../Churn/ChurnOptions.html">Churn::ChurnOptions</a>
|
112
|
-
|
113
|
-
<li><a href="../Churn/GitAnalyzer.html">Churn::GitAnalyzer</a>
|
114
|
-
|
115
|
-
<li><a href="../Churn/HgAnalyzer.html">Churn::HgAnalyzer</a>
|
116
|
-
|
117
|
-
<li><a href="../Churn/LocationMapping.html">Churn::LocationMapping</a>
|
118
|
-
|
119
|
-
<li><a href="../Churn/SourceControl.html">Churn::SourceControl</a>
|
120
|
-
|
121
|
-
<li><a href="../Churn/SvnAnalyzer.html">Churn::SvnAnalyzer</a>
|
122
|
-
|
123
|
-
<li><a href="../Object.html">Object</a>
|
124
|
-
|
125
|
-
</ul>
|
126
|
-
</nav>
|
127
|
-
|
128
|
-
</div>
|
129
|
-
</nav>
|
130
|
-
|
131
|
-
<div id="documentation">
|
132
|
-
<h1 class="class">class Churn::HgAnalyzer</h1>
|
133
|
-
|
134
|
-
<div id="description" class="description">
|
135
|
-
|
136
|
-
<p>analizes Hg / Mercurial SCM to find recently changed files, and what lines
|
137
|
-
have been altered</p>
|
138
|
-
|
139
|
-
</div><!-- description -->
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
<!-- Methods -->
|
154
|
-
|
155
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
156
|
-
<h3 class="section-header">Public Class Methods</h3>
|
157
|
-
|
158
|
-
|
159
|
-
<div id="method-c-supported-3F" class="method-detail ">
|
160
|
-
|
161
|
-
<div class="method-heading">
|
162
|
-
<span class="method-name">supported?</span><span
|
163
|
-
class="method-args">()</span>
|
164
|
-
|
165
|
-
<span class="method-click-advice">click to toggle source</span>
|
166
|
-
|
167
|
-
</div>
|
168
|
-
|
169
|
-
|
170
|
-
<div class="method-description">
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
<div class="method-source-code" id="supported-3F-source">
|
178
|
-
<pre><span class="ruby-comment"># File lib/churn/scm/hg_analyzer.rb, line 6</span>
|
179
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">supported?</span>
|
180
|
-
<span class="ruby-operator">!</span><span class="ruby-operator">!</span>(<span class="ruby-value">%xhg branch 2>&1`</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">$?</span>.<span class="ruby-identifier">success?</span>)
|
181
|
-
<span class="ruby-keyword">end</span></pre>
|
182
|
-
</div><!-- supported-3F-source -->
|
183
|
-
|
184
|
-
</div>
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
</div><!-- supported-3F-method -->
|
190
|
-
|
191
|
-
|
192
|
-
</section><!-- public-class-method-details -->
|
193
|
-
|
194
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
195
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
196
|
-
|
197
|
-
|
198
|
-
<div id="method-i-get_logs" class="method-detail ">
|
199
|
-
|
200
|
-
<div class="method-heading">
|
201
|
-
<span class="method-name">get_logs</span><span
|
202
|
-
class="method-args">()</span>
|
203
|
-
|
204
|
-
<span class="method-click-advice">click to toggle source</span>
|
205
|
-
|
206
|
-
</div>
|
207
|
-
|
208
|
-
|
209
|
-
<div class="method-description">
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
<div class="method-source-code" id="get_logs-source">
|
217
|
-
<pre><span class="ruby-comment"># File lib/churn/scm/hg_analyzer.rb, line 10</span>
|
218
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_logs</span>
|
219
|
-
<span class="ruby-node">%xhg log -v#{date_range}`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>).<span class="ruby-identifier">reject</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp">/^files:/</span>}.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">" "</span>)[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]}.<span class="ruby-identifier">flatten</span>
|
220
|
-
<span class="ruby-keyword">end</span></pre>
|
221
|
-
</div><!-- get_logs-source -->
|
222
|
-
|
223
|
-
</div>
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
</div><!-- get_logs-method -->
|
229
|
-
|
230
|
-
|
231
|
-
<div id="method-i-get_revisions" class="method-detail ">
|
232
|
-
|
233
|
-
<div class="method-heading">
|
234
|
-
<span class="method-name">get_revisions</span><span
|
235
|
-
class="method-args">()</span>
|
236
|
-
|
237
|
-
<span class="method-click-advice">click to toggle source</span>
|
238
|
-
|
239
|
-
</div>
|
240
|
-
|
241
|
-
|
242
|
-
<div class="method-description">
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
<div class="method-source-code" id="get_revisions-source">
|
250
|
-
<pre><span class="ruby-comment"># File lib/churn/scm/hg_analyzer.rb, line 14</span>
|
251
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_revisions</span>
|
252
|
-
<span class="ruby-node">%xhg log#{date_range}`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>).<span class="ruby-identifier">reject</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp">/^changeset:/</span>}.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>[<span class="ruby-regexp">/:(\S+)$/</span>, <span class="ruby-value">1</span>] }
|
253
|
-
<span class="ruby-keyword">end</span></pre>
|
254
|
-
</div><!-- get_revisions-source -->
|
255
|
-
|
256
|
-
</div>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
</div><!-- get_revisions-method -->
|
262
|
-
|
263
|
-
|
264
|
-
</section><!-- public-instance-method-details -->
|
265
|
-
|
266
|
-
</section><!-- 5Buntitled-5D -->
|
267
|
-
|
268
|
-
</div><!-- documentation -->
|
269
|
-
|
270
|
-
|
271
|
-
<footer id="validator-badges">
|
272
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
273
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
274
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
275
|
-
</footer>
|
276
|
-
|