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/ChurnHistory.html
DELETED
@@ -1,250 +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::ChurnHistory - 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/history.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"><a href="../Object.html">Object</a>
|
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-load_revision_data">::load_revision_data</a>
|
77
|
-
|
78
|
-
<li ><a href="#method-c-store_revision_history">::store_revision_history</a>
|
79
|
-
|
80
|
-
</ul>
|
81
|
-
</nav>
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div id="project-metadata">
|
86
|
-
<nav id="fileindex-section" class="section project-section">
|
87
|
-
<h3 class="section-header">Pages</h3>
|
88
|
-
|
89
|
-
<ul>
|
90
|
-
|
91
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
92
|
-
|
93
|
-
</ul>
|
94
|
-
</nav>
|
95
|
-
|
96
|
-
<nav id="classindex-section" class="section project-section">
|
97
|
-
<h3 class="section-header">Class and Module Index</h3>
|
98
|
-
|
99
|
-
<ul class="link-list">
|
100
|
-
|
101
|
-
<li><a href="../Churn.html">Churn</a>
|
102
|
-
|
103
|
-
<li><a href="../Churn/BzrAnalyzer.html">Churn::BzrAnalyzer</a>
|
104
|
-
|
105
|
-
<li><a href="../Churn/ChurnCalculator.html">Churn::ChurnCalculator</a>
|
106
|
-
|
107
|
-
<li><a href="../Churn/ChurnHistory.html">Churn::ChurnHistory</a>
|
108
|
-
|
109
|
-
<li><a href="../Churn/ChurnOptions.html">Churn::ChurnOptions</a>
|
110
|
-
|
111
|
-
<li><a href="../Churn/GitAnalyzer.html">Churn::GitAnalyzer</a>
|
112
|
-
|
113
|
-
<li><a href="../Churn/HgAnalyzer.html">Churn::HgAnalyzer</a>
|
114
|
-
|
115
|
-
<li><a href="../Churn/LocationMapping.html">Churn::LocationMapping</a>
|
116
|
-
|
117
|
-
<li><a href="../Churn/SourceControl.html">Churn::SourceControl</a>
|
118
|
-
|
119
|
-
<li><a href="../Churn/SvnAnalyzer.html">Churn::SvnAnalyzer</a>
|
120
|
-
|
121
|
-
<li><a href="../Object.html">Object</a>
|
122
|
-
|
123
|
-
</ul>
|
124
|
-
</nav>
|
125
|
-
|
126
|
-
</div>
|
127
|
-
</nav>
|
128
|
-
|
129
|
-
<div id="documentation">
|
130
|
-
<h1 class="class">class Churn::ChurnHistory</h1>
|
131
|
-
|
132
|
-
<div id="description" class="description">
|
133
|
-
|
134
|
-
<p>responsible for storing the churn history to json, and for loading old
|
135
|
-
churn history data from json.</p>
|
136
|
-
|
137
|
-
</div><!-- description -->
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<!-- Methods -->
|
152
|
-
|
153
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
154
|
-
<h3 class="section-header">Public Class Methods</h3>
|
155
|
-
|
156
|
-
|
157
|
-
<div id="method-c-load_revision_data" class="method-detail ">
|
158
|
-
|
159
|
-
<div class="method-heading">
|
160
|
-
<span class="method-name">load_revision_data</span><span
|
161
|
-
class="method-args">(revision, data_directory)</span>
|
162
|
-
|
163
|
-
<span class="method-click-advice">click to toggle source</span>
|
164
|
-
|
165
|
-
</div>
|
166
|
-
|
167
|
-
|
168
|
-
<div class="method-description">
|
169
|
-
|
170
|
-
<p>given a previous project revision find and load the churn data from a json
|
171
|
-
file</p>
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
<div class="method-source-code" id="load_revision_data-source">
|
177
|
-
<pre><span class="ruby-comment"># File lib/churn/history.rb, line 14</span>
|
178
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">load_revision_data</span>(<span class="ruby-identifier">revision</span>, <span class="ruby-identifier">data_directory</span>)
|
179
|
-
<span class="ruby-comment">#load revision data from scratch folder if it exists</span>
|
180
|
-
<span class="ruby-identifier">filename</span> = <span class="ruby-node">"#{data_directory}/#{revision}.json"</span>
|
181
|
-
<span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">filename</span>)
|
182
|
-
<span class="ruby-keyword">begin</span>
|
183
|
-
<span class="ruby-identifier">json_data</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>)
|
184
|
-
<span class="ruby-identifier">data</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">json_data</span>)
|
185
|
-
<span class="ruby-identifier">changed_files</span> = <span class="ruby-identifier">data</span>[<span class="ruby-string">'churn'</span>][<span class="ruby-string">'changed_files'</span>]
|
186
|
-
<span class="ruby-identifier">changed_classes</span> = <span class="ruby-identifier">data</span>[<span class="ruby-string">'churn'</span>][<span class="ruby-string">'changed_classes'</span>]
|
187
|
-
<span class="ruby-identifier">changed_methods</span> = <span class="ruby-identifier">data</span>[<span class="ruby-string">'churn'</span>][<span class="ruby-string">'changed_methods'</span>]
|
188
|
-
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span>
|
189
|
-
<span class="ruby-comment">#leave all of the objects nil</span>
|
190
|
-
<span class="ruby-keyword">end</span>
|
191
|
-
<span class="ruby-keyword">end</span>
|
192
|
-
[<span class="ruby-identifier">changed_files</span>, <span class="ruby-identifier">changed_classes</span>, <span class="ruby-identifier">changed_methods</span>]
|
193
|
-
<span class="ruby-keyword">end</span></pre>
|
194
|
-
</div><!-- load_revision_data-source -->
|
195
|
-
|
196
|
-
</div>
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
</div><!-- load_revision_data-method -->
|
202
|
-
|
203
|
-
|
204
|
-
<div id="method-c-store_revision_history" class="method-detail ">
|
205
|
-
|
206
|
-
<div class="method-heading">
|
207
|
-
<span class="method-name">store_revision_history</span><span
|
208
|
-
class="method-args">(revision, hash_data, data_directory)</span>
|
209
|
-
|
210
|
-
<span class="method-click-advice">click to toggle source</span>
|
211
|
-
|
212
|
-
</div>
|
213
|
-
|
214
|
-
|
215
|
-
<div class="method-description">
|
216
|
-
|
217
|
-
<p>takes current revision and its hash_data and stores it</p>
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
<div class="method-source-code" id="store_revision_history-source">
|
223
|
-
<pre><span class="ruby-comment"># File lib/churn/history.rb, line 8</span>
|
224
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">store_revision_history</span>(<span class="ruby-identifier">revision</span>, <span class="ruby-identifier">hash_data</span>, <span class="ruby-identifier">data_directory</span>)
|
225
|
-
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span> <span class="ruby-identifier">data_directory</span>
|
226
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-node">"#{data_directory}/#{revision}.json"</span>, <span class="ruby-string">'w'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">hash_data</span>.<span class="ruby-identifier">to_json</span>) }
|
227
|
-
<span class="ruby-keyword">end</span></pre>
|
228
|
-
</div><!-- store_revision_history-source -->
|
229
|
-
|
230
|
-
</div>
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
</div><!-- store_revision_history-method -->
|
236
|
-
|
237
|
-
|
238
|
-
</section><!-- public-class-method-details -->
|
239
|
-
|
240
|
-
</section><!-- 5Buntitled-5D -->
|
241
|
-
|
242
|
-
</div><!-- documentation -->
|
243
|
-
|
244
|
-
|
245
|
-
<footer id="validator-badges">
|
246
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
247
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
248
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
249
|
-
</footer>
|
250
|
-
|
data/doc/Churn/ChurnOptions.html
DELETED
@@ -1,393 +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::ChurnOptions - 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/options.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"><a href="../Object.html">Object</a>
|
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-new">::new</a>
|
77
|
-
|
78
|
-
<li ><a href="#method-i-set_options">#set_options</a>
|
79
|
-
|
80
|
-
</ul>
|
81
|
-
</nav>
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div id="project-metadata">
|
86
|
-
<nav id="fileindex-section" class="section project-section">
|
87
|
-
<h3 class="section-header">Pages</h3>
|
88
|
-
|
89
|
-
<ul>
|
90
|
-
|
91
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
92
|
-
|
93
|
-
</ul>
|
94
|
-
</nav>
|
95
|
-
|
96
|
-
<nav id="classindex-section" class="section project-section">
|
97
|
-
<h3 class="section-header">Class and Module Index</h3>
|
98
|
-
|
99
|
-
<ul class="link-list">
|
100
|
-
|
101
|
-
<li><a href="../Churn.html">Churn</a>
|
102
|
-
|
103
|
-
<li><a href="../Churn/BzrAnalyzer.html">Churn::BzrAnalyzer</a>
|
104
|
-
|
105
|
-
<li><a href="../Churn/ChurnCalculator.html">Churn::ChurnCalculator</a>
|
106
|
-
|
107
|
-
<li><a href="../Churn/ChurnHistory.html">Churn::ChurnHistory</a>
|
108
|
-
|
109
|
-
<li><a href="../Churn/ChurnOptions.html">Churn::ChurnOptions</a>
|
110
|
-
|
111
|
-
<li><a href="../Churn/GitAnalyzer.html">Churn::GitAnalyzer</a>
|
112
|
-
|
113
|
-
<li><a href="../Churn/HgAnalyzer.html">Churn::HgAnalyzer</a>
|
114
|
-
|
115
|
-
<li><a href="../Churn/LocationMapping.html">Churn::LocationMapping</a>
|
116
|
-
|
117
|
-
<li><a href="../Churn/SourceControl.html">Churn::SourceControl</a>
|
118
|
-
|
119
|
-
<li><a href="../Churn/SvnAnalyzer.html">Churn::SvnAnalyzer</a>
|
120
|
-
|
121
|
-
<li><a href="../Object.html">Object</a>
|
122
|
-
|
123
|
-
</ul>
|
124
|
-
</nav>
|
125
|
-
|
126
|
-
</div>
|
127
|
-
</nav>
|
128
|
-
|
129
|
-
<div id="documentation">
|
130
|
-
<h1 class="class">class Churn::ChurnOptions</h1>
|
131
|
-
|
132
|
-
<div id="description" class="description">
|
133
|
-
|
134
|
-
<p>responsible for storing the churn configuration</p>
|
135
|
-
|
136
|
-
</div><!-- description -->
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<!-- Constants -->
|
148
|
-
<section id="constants-list" class="section">
|
149
|
-
<h3 class="section-header">Constants</h3>
|
150
|
-
<dl>
|
151
|
-
|
152
|
-
<dt id="DEFAULT_CHURN_DIRECTORY">DEFAULT_CHURN_DIRECTORY
|
153
|
-
|
154
|
-
<dd class="description">
|
155
|
-
|
156
|
-
|
157
|
-
<dt id="DEFAULT_MINIMUM_CHURN_COUNT">DEFAULT_MINIMUM_CHURN_COUNT
|
158
|
-
|
159
|
-
<dd class="description">
|
160
|
-
|
161
|
-
|
162
|
-
<dt id="DEFAULT_REPORT_HOST">DEFAULT_REPORT_HOST
|
163
|
-
|
164
|
-
<dd class="description">
|
165
|
-
|
166
|
-
|
167
|
-
<dt id="DEFAULT_START_TIME">DEFAULT_START_TIME
|
168
|
-
|
169
|
-
<dd class="description">
|
170
|
-
|
171
|
-
|
172
|
-
</dl>
|
173
|
-
</section>
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
<!-- Attributes -->
|
178
|
-
<section id="attribute-method-details" class="method-section section">
|
179
|
-
<h3 class="section-header">Attributes</h3>
|
180
|
-
|
181
|
-
|
182
|
-
<div id="attribute-i-data_directory" class="method-detail">
|
183
|
-
<div class="method-heading attribute-method-heading">
|
184
|
-
<span class="method-name">data_directory</span><span
|
185
|
-
class="attribute-access-type">[RW]</span>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
<div class="method-description">
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
</div>
|
193
|
-
</div>
|
194
|
-
|
195
|
-
<div id="attribute-i-history" class="method-detail">
|
196
|
-
<div class="method-heading attribute-method-heading">
|
197
|
-
<span class="method-name">history</span><span
|
198
|
-
class="attribute-access-type">[RW]</span>
|
199
|
-
</div>
|
200
|
-
|
201
|
-
<div class="method-description">
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
</div>
|
206
|
-
</div>
|
207
|
-
|
208
|
-
<div id="attribute-i-ignores" class="method-detail">
|
209
|
-
<div class="method-heading attribute-method-heading">
|
210
|
-
<span class="method-name">ignores</span><span
|
211
|
-
class="attribute-access-type">[RW]</span>
|
212
|
-
</div>
|
213
|
-
|
214
|
-
<div class="method-description">
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
</div>
|
219
|
-
</div>
|
220
|
-
|
221
|
-
<div id="attribute-i-minimum_churn_count" class="method-detail">
|
222
|
-
<div class="method-heading attribute-method-heading">
|
223
|
-
<span class="method-name">minimum_churn_count</span><span
|
224
|
-
class="attribute-access-type">[RW]</span>
|
225
|
-
</div>
|
226
|
-
|
227
|
-
<div class="method-description">
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
</div>
|
232
|
-
</div>
|
233
|
-
|
234
|
-
<div id="attribute-i-name" class="method-detail">
|
235
|
-
<div class="method-heading attribute-method-heading">
|
236
|
-
<span class="method-name">name</span><span
|
237
|
-
class="attribute-access-type">[RW]</span>
|
238
|
-
</div>
|
239
|
-
|
240
|
-
<div class="method-description">
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
</div>
|
245
|
-
</div>
|
246
|
-
|
247
|
-
<div id="attribute-i-report_host" class="method-detail">
|
248
|
-
<div class="method-heading attribute-method-heading">
|
249
|
-
<span class="method-name">report_host</span><span
|
250
|
-
class="attribute-access-type">[RW]</span>
|
251
|
-
</div>
|
252
|
-
|
253
|
-
<div class="method-description">
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
</div>
|
258
|
-
</div>
|
259
|
-
|
260
|
-
<div id="attribute-i-start_date" class="method-detail">
|
261
|
-
<div class="method-heading attribute-method-heading">
|
262
|
-
<span class="method-name">start_date</span><span
|
263
|
-
class="attribute-access-type">[RW]</span>
|
264
|
-
</div>
|
265
|
-
|
266
|
-
<div class="method-description">
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
</div>
|
271
|
-
</div>
|
272
|
-
|
273
|
-
</section><!-- attribute-method-details -->
|
274
|
-
|
275
|
-
|
276
|
-
<!-- Methods -->
|
277
|
-
|
278
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
279
|
-
<h3 class="section-header">Public Class Methods</h3>
|
280
|
-
|
281
|
-
|
282
|
-
<div id="method-c-new" class="method-detail ">
|
283
|
-
|
284
|
-
<div class="method-heading">
|
285
|
-
<span class="method-name">new</span><span
|
286
|
-
class="method-args">()</span>
|
287
|
-
|
288
|
-
<span class="method-click-advice">click to toggle source</span>
|
289
|
-
|
290
|
-
</div>
|
291
|
-
|
292
|
-
|
293
|
-
<div class="method-description">
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
<div class="method-source-code" id="new-source">
|
301
|
-
<pre><span class="ruby-comment"># File lib/churn/options.rb, line 14</span>
|
302
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>()
|
303
|
-
<span class="ruby-ivar">@data_directory</span> = <span class="ruby-constant">DEFAULT_CHURN_DIRECTORY</span>
|
304
|
-
<span class="ruby-ivar">@minimum_churn_count</span> = <span class="ruby-constant">DEFAULT_MINIMUM_CHURN_COUNT</span>
|
305
|
-
<span class="ruby-ivar">@ignores</span> = <span class="ruby-string">'/dev/null'</span>
|
306
|
-
<span class="ruby-ivar">@start_date</span> = <span class="ruby-constant">DEFAULT_START_TIME</span>
|
307
|
-
<span class="ruby-ivar">@history</span> = <span class="ruby-keyword">nil</span>
|
308
|
-
<span class="ruby-ivar">@report_host</span> = <span class="ruby-keyword">nil</span>
|
309
|
-
<span class="ruby-ivar">@name</span> = <span class="ruby-keyword">nil</span>
|
310
|
-
<span class="ruby-keyword">end</span></pre>
|
311
|
-
</div><!-- new-source -->
|
312
|
-
|
313
|
-
</div>
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
</div><!-- new-method -->
|
319
|
-
|
320
|
-
|
321
|
-
</section><!-- public-class-method-details -->
|
322
|
-
|
323
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
324
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
325
|
-
|
326
|
-
|
327
|
-
<div id="method-i-set_options" class="method-detail ">
|
328
|
-
|
329
|
-
<div class="method-heading">
|
330
|
-
<span class="method-name">set_options</span><span
|
331
|
-
class="method-args">(options = {})</span>
|
332
|
-
|
333
|
-
<span class="method-click-advice">click to toggle source</span>
|
334
|
-
|
335
|
-
</div>
|
336
|
-
|
337
|
-
|
338
|
-
<div class="method-description">
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
<div class="method-source-code" id="set_options-source">
|
346
|
-
<pre><span class="ruby-comment"># File lib/churn/options.rb, line 24</span>
|
347
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">set_options</span>(<span class="ruby-identifier">options</span> = {})
|
348
|
-
<span class="ruby-ivar">@data_directory</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-value">:data_directory</span>){ <span class="ruby-ivar">@data_directory</span> } <span class="ruby-keyword">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:data_directory</span>]<span class="ruby-operator">==</span><span class="ruby-string">''</span>
|
349
|
-
<span class="ruby-ivar">@minimum_churn_count</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-value">:minimum_churn_count</span>){ <span class="ruby-ivar">@minimum_churn_count</span> }.<span class="ruby-identifier">to_i</span>
|
350
|
-
<span class="ruby-ivar">@ignores</span> = (<span class="ruby-identifier">options</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-value">:ignores</span>){ <span class="ruby-ivar">@ignores</span> }).<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">','</span>).<span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-value">:strip</span>)
|
351
|
-
<span class="ruby-ivar">@ignores</span> <span class="ruby-operator"><<</span> <span class="ruby-string">'/dev/null'</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@ignores</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">'/dev/null'</span>)
|
352
|
-
<span class="ruby-ivar">@start_date</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:start_date</span>] <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:start_date</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:start_date</span>]<span class="ruby-operator">!=</span><span class="ruby-string">''</span>
|
353
|
-
<span class="ruby-ivar">@history</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:history</span>] <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:history</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:history</span>]<span class="ruby-operator">!=</span><span class="ruby-string">''</span>
|
354
|
-
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@history</span><span class="ruby-operator">==</span><span class="ruby-string">'true'</span>
|
355
|
-
<span class="ruby-ivar">@history</span> = <span class="ruby-constant">DEFAULT_START_TIME</span>
|
356
|
-
<span class="ruby-keyword">end</span>
|
357
|
-
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:report</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:report</span>]<span class="ruby-operator">!=</span><span class="ruby-string">''</span>
|
358
|
-
<span class="ruby-ivar">@report_host</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:report</span>]
|
359
|
-
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@report_host</span><span class="ruby-operator">==</span><span class="ruby-string">'true'</span>
|
360
|
-
<span class="ruby-ivar">@report_host</span> = <span class="ruby-constant">DEFAULT_REPORT_HOST</span>
|
361
|
-
<span class="ruby-keyword">end</span>
|
362
|
-
<span class="ruby-keyword">end</span>
|
363
|
-
|
364
|
-
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:name</span>] <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:name</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:name</span>]<span class="ruby-operator">!=</span><span class="ruby-string">''</span>
|
365
|
-
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@report_host</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">nil?</span>
|
366
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span> <span class="ruby-string">"If you are reporting churn results you must pass a valid github project name in the form of username/project_name"</span>
|
367
|
-
<span class="ruby-keyword">end</span>
|
368
|
-
|
369
|
-
<span class="ruby-keyword">self</span>
|
370
|
-
<span class="ruby-keyword">end</span></pre>
|
371
|
-
</div><!-- set_options-source -->
|
372
|
-
|
373
|
-
</div>
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
</div><!-- set_options-method -->
|
379
|
-
|
380
|
-
|
381
|
-
</section><!-- public-instance-method-details -->
|
382
|
-
|
383
|
-
</section><!-- 5Buntitled-5D -->
|
384
|
-
|
385
|
-
</div><!-- documentation -->
|
386
|
-
|
387
|
-
|
388
|
-
<footer id="validator-badges">
|
389
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
390
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
391
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
392
|
-
</footer>
|
393
|
-
|