corundum 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/doc/Specifications CHANGED
@@ -2,5 +2,5 @@
2
2
  A fairly complete Rakefile
3
3
  should have some tasks
4
4
 
5
- Finished in 0.45564 seconds
5
+ Finished in 0.49438 seconds
6
6
  1 example, 0 failures
@@ -23,27 +23,27 @@
23
23
  <img src="./assets/0.5.3/loading.gif" alt="loading"/>
24
24
  </div>
25
25
  <div id="wrapper" style="display:none;">
26
- <div class="timestamp">Generated <abbr class="timeago" title="2011-12-09T18:31:15-08:00">2011-12-09T18:31:15-08:00</abbr></div>
26
+ <div class="timestamp">Generated <abbr class="timeago" title="2011-12-13T15:53:06-08:00">2011-12-13T15:53:06-08:00</abbr></div>
27
27
  <ul class="group_tabs"></ul>
28
28
 
29
29
  <div id="content">
30
30
  <div class="file_list_container" id="AllFiles">
31
31
  <h2>
32
32
  <span class="group_name">All Files</span>
33
- (<span class="covered_percent"><span class="red">66.9%</span></span>
33
+ (<span class="covered_percent"><span class="red">59.82%</span></span>
34
34
  covered at
35
35
  <span class="covered_strength">
36
36
  <span class="green">
37
- 2.38
37
+ 2.19
38
38
  </span>
39
39
  </span> hits/line)
40
40
  </h2>
41
41
  <a name="AllFiles"></a>
42
42
  <div>
43
- <b>14</b> files in total.
44
- <b>571</b> relevant lines.
45
- <span class="green"><b>382</b> lines covered</span> and
46
- <span class="red"><b>189</b> lines missed </span>
43
+ <b>15</b> files in total.
44
+ <b>667</b> relevant lines.
45
+ <span class="green"><b>399</b> lines covered</span> and
46
+ <span class="red"><b>268</b> lines missed </span>
47
47
  </div>
48
48
  <table class="file_list">
49
49
  <thead>
@@ -76,7 +76,7 @@
76
76
  <td>32</td>
77
77
  <td>32</td>
78
78
  <td>0</td>
79
- <td>16.8</td>
79
+ <td>17.0</td>
80
80
  </tr>
81
81
 
82
82
  <tr>
@@ -141,11 +141,11 @@
141
141
 
142
142
  <tr>
143
143
  <td class="strong"><a href="#b74c935259341e583b2d91039bf9c5c57deeafb6" class="src_link" title="lib/corundum/simplecov.rb">lib/corundum/simplecov.rb</a></td>
144
- <td class="red strong">53.62 %</td>
145
- <td>115</td>
146
- <td>69</td>
147
- <td>37</td>
148
- <td>32</td>
144
+ <td class="red strong">51.35 %</td>
145
+ <td>122</td>
146
+ <td>74</td>
147
+ <td>38</td>
148
+ <td>36</td>
149
149
  <td>0.5</td>
150
150
  </tr>
151
151
 
@@ -162,31 +162,41 @@
162
162
  <tr>
163
163
  <td class="strong"><a href="#a4ef71b969f92d9463bf39a4ac3c99e82c2aaf26" class="src_link" title="lib/corundum/tasklibs.rb">lib/corundum/tasklibs.rb</a></td>
164
164
  <td class="green strong">100.0 %</td>
165
- <td>8</td>
166
- <td>8</td>
167
- <td>8</td>
165
+ <td>9</td>
166
+ <td>9</td>
167
+ <td>9</td>
168
168
  <td>0</td>
169
169
  <td>1.0</td>
170
170
  </tr>
171
171
 
172
172
  <tr>
173
173
  <td class="strong"><a href="#c0e4ec2b43f19148935644be7480430e81a2d80d" class="src_link" title="lib/corundum/version_control.rb">lib/corundum/version_control.rb</a></td>
174
- <td class="green strong">95.0 %</td>
175
- <td>31</td>
176
- <td>20</td>
177
- <td>19</td>
178
- <td>1</td>
174
+ <td class="green strong">100.0 %</td>
175
+ <td>34</td>
176
+ <td>23</td>
177
+ <td>23</td>
178
+ <td>0</td>
179
179
  <td>1.0</td>
180
180
  </tr>
181
181
 
182
+ <tr>
183
+ <td class="strong"><a href="#9d2f811d8f8df106d5632369df2fd635327854f1" class="src_link" title="lib/corundum/version_control/git.rb">lib/corundum/version_control/git.rb</a></td>
184
+ <td class="red strong">12.5 %</td>
185
+ <td>105</td>
186
+ <td>64</td>
187
+ <td>8</td>
188
+ <td>56</td>
189
+ <td>0.1</td>
190
+ </tr>
191
+
182
192
  <tr>
183
193
  <td class="strong"><a href="#58abe8fc8bf9e6883cd935a00513d6746935b12c" class="src_link" title="lib/corundum/version_control/monotone.rb">lib/corundum/version_control/monotone.rb</a></td>
184
- <td class="yellow strong">85.14 %</td>
185
- <td>124</td>
186
- <td>74</td>
187
- <td>63</td>
188
- <td>11</td>
189
- <td>3.5</td>
194
+ <td class="red strong">68.04 %</td>
195
+ <td>156</td>
196
+ <td>97</td>
197
+ <td>66</td>
198
+ <td>31</td>
199
+ <td>2.7</td>
190
200
  </tr>
191
201
 
192
202
  <tr>
@@ -1063,8 +1073,8 @@
1063
1073
  <code class="ruby"> mod</code>
1064
1074
  </li>
1065
1075
 
1066
- <li class="covered" data-hits="90" data-linenumber="11">
1067
- <span class="hits">90</span>
1076
+ <li class="covered" data-hits="92" data-linenumber="11">
1077
+ <span class="hits">92</span>
1068
1078
 
1069
1079
  <code class="ruby"> end</code>
1070
1080
  </li>
@@ -1117,14 +1127,14 @@
1117
1127
  <code class="ruby"> def setting(name, default_value = nil)</code>
1118
1128
  </li>
1119
1129
 
1120
- <li class="covered" data-hits="90" data-linenumber="20">
1121
- <span class="hits">90</span>
1130
+ <li class="covered" data-hits="92" data-linenumber="20">
1131
+ <span class="hits">92</span>
1122
1132
 
1123
1133
  <code class="ruby"> local_attrs.instance_eval do</code>
1124
1134
  </li>
1125
1135
 
1126
- <li class="covered" data-hits="90" data-linenumber="21">
1127
- <span class="hits">90</span>
1136
+ <li class="covered" data-hits="92" data-linenumber="21">
1137
+ <span class="hits">92</span>
1128
1138
 
1129
1139
  <code class="ruby"> attr_accessor(name)</code>
1130
1140
  </li>
@@ -1135,8 +1145,8 @@
1135
1145
  <code class="ruby"> end</code>
1136
1146
  </li>
1137
1147
 
1138
- <li class="covered" data-hits="90" data-linenumber="23">
1139
- <span class="hits">90</span>
1148
+ <li class="covered" data-hits="92" data-linenumber="23">
1149
+ <span class="hits">92</span>
1140
1150
 
1141
1151
  <code class="ruby"> instance_variable_set(&quot;@#{name}&quot;, default_value)</code>
1142
1152
  </li>
@@ -4070,11 +4080,11 @@
4070
4080
  <div class="source_table" id="b74c935259341e583b2d91039bf9c5c57deeafb6">
4071
4081
  <div class="header">
4072
4082
  <h3>lib/corundum/simplecov.rb</h3>
4073
- <h4><span class="red">53.62 %</span> covered</h4>
4083
+ <h4><span class="red">51.35 %</span> covered</h4>
4074
4084
  <div>
4075
- <b>69</b> relevant lines.
4076
- <span class="green"><b>37</b> lines covered</span> and
4077
- <span class="red"><b>32</b> lines missed.</span>
4085
+ <b>74</b> relevant lines.
4086
+ <span class="green"><b>38</b> lines covered</span> and
4087
+ <span class="red"><b>36</b> lines missed.</span>
4078
4088
  </div>
4079
4089
  </div>
4080
4090
 
@@ -4186,586 +4196,628 @@
4186
4196
  <li class="covered" data-hits="1" data-linenumber="18">
4187
4197
  <span class="hits">1</span>
4188
4198
 
4199
+ <code class="ruby"> setting(:coverage_filter, proc do |path|</code>
4200
+ </li>
4201
+
4202
+ <li class="missed" data-hits="0" data-linenumber="19">
4203
+
4204
+
4205
+ <code class="ruby"> /\.rb$/ =~ path</code>
4206
+ </li>
4207
+
4208
+ <li class="never" data-hits="" data-linenumber="20">
4209
+
4210
+
4211
+ <code class="ruby"> end)</code>
4212
+ </li>
4213
+
4214
+ <li class="never" data-hits="" data-linenumber="21">
4215
+
4216
+
4217
+ <code class="ruby"></code>
4218
+ </li>
4219
+
4220
+ <li class="covered" data-hits="1" data-linenumber="22">
4221
+ <span class="hits">1</span>
4222
+
4189
4223
  <code class="ruby"> setting(:threshold, 80)</code>
4190
4224
  </li>
4191
4225
 
4192
- <li class="covered" data-hits="1" data-linenumber="19">
4226
+ <li class="covered" data-hits="1" data-linenumber="23">
4193
4227
  <span class="hits">1</span>
4194
4228
 
4195
4229
  <code class="ruby"> setting(:groups, {})</code>
4196
4230
  </li>
4197
4231
 
4198
- <li class="covered" data-hits="1" data-linenumber="20">
4232
+ <li class="covered" data-hits="1" data-linenumber="24">
4199
4233
  <span class="hits">1</span>
4200
4234
 
4201
4235
  <code class="ruby"> setting(:code_files, toolkit.files.code)</code>
4202
4236
  </li>
4203
4237
 
4204
- <li class="covered" data-hits="1" data-linenumber="21">
4238
+ <li class="covered" data-hits="1" data-linenumber="25">
4205
4239
  <span class="hits">1</span>
4206
4240
 
4207
4241
  <code class="ruby"> setting(:all_files, toolkit.file_lists.code + toolkit.file_lists.test)</code>
4208
4242
  </li>
4209
4243
 
4210
- <li class="never" data-hits="" data-linenumber="22">
4244
+ <li class="never" data-hits="" data-linenumber="26">
4211
4245
 
4212
4246
 
4213
4247
  <code class="ruby"> end</code>
4214
4248
  </li>
4215
4249
 
4216
- <li class="never" data-hits="" data-linenumber="23">
4250
+ <li class="never" data-hits="" data-linenumber="27">
4217
4251
 
4218
4252
 
4219
4253
  <code class="ruby"></code>
4220
4254
  </li>
4221
4255
 
4222
- <li class="covered" data-hits="1" data-linenumber="24">
4256
+ <li class="covered" data-hits="1" data-linenumber="28">
4223
4257
  <span class="hits">1</span>
4224
4258
 
4225
4259
  <code class="ruby"> def resolve_configuration</code>
4226
4260
  </li>
4227
4261
 
4228
- <li class="covered" data-hits="1" data-linenumber="25">
4262
+ <li class="covered" data-hits="1" data-linenumber="29">
4229
4263
  <span class="hits">1</span>
4230
4264
 
4231
4265
  <code class="ruby"> @config_path ||= File::expand_path(config_file, Rake::original_dir)</code>
4232
4266
  </li>
4233
4267
 
4234
- <li class="covered" data-hits="1" data-linenumber="26">
4268
+ <li class="covered" data-hits="1" data-linenumber="30">
4235
4269
  <span class="hits">1</span>
4236
4270
 
4237
4271
  <code class="ruby"> @report_path ||= File::join(report_dir, &quot;index.html&quot;)</code>
4238
4272
  </li>
4239
4273
 
4240
- <li class="never" data-hits="" data-linenumber="27">
4274
+ <li class="never" data-hits="" data-linenumber="31">
4241
4275
 
4242
4276
 
4243
4277
  <code class="ruby"> end</code>
4244
4278
  </li>
4245
4279
 
4246
- <li class="never" data-hits="" data-linenumber="28">
4280
+ <li class="never" data-hits="" data-linenumber="32">
4247
4281
 
4248
4282
 
4249
4283
  <code class="ruby"></code>
4250
4284
  </li>
4251
4285
 
4252
- <li class="covered" data-hits="1" data-linenumber="29">
4286
+ <li class="covered" data-hits="1" data-linenumber="33">
4253
4287
  <span class="hits">1</span>
4254
4288
 
4255
- <code class="ruby"> def filters</code>
4289
+ <code class="ruby"> def filter_lines</code>
4256
4290
  </li>
4257
4291
 
4258
- <li class="missed" data-hits="0" data-linenumber="30">
4292
+ <li class="missed" data-hits="0" data-linenumber="34">
4259
4293
 
4260
4294
 
4261
- <code class="ruby"> filters.map do |pattern|</code>
4295
+ <code class="ruby"> return filters.map do |pattern|</code>
4262
4296
  </li>
4263
4297
 
4264
- <li class="missed" data-hits="0" data-linenumber="31">
4298
+ <li class="missed" data-hits="0" data-linenumber="35">
4265
4299
 
4266
4300
 
4267
4301
  <code class="ruby"> &quot;add_filter \&quot;#{pattern}\&quot;&quot;</code>
4268
4302
  </li>
4269
4303
 
4270
- <li class="never" data-hits="" data-linenumber="32">
4304
+ <li class="never" data-hits="" data-linenumber="36">
4271
4305
 
4272
4306
 
4273
4307
  <code class="ruby"> end</code>
4274
4308
  </li>
4275
4309
 
4276
- <li class="never" data-hits="" data-linenumber="33">
4310
+ <li class="never" data-hits="" data-linenumber="37">
4277
4311
 
4278
4312
 
4279
4313
  <code class="ruby"> end</code>
4280
4314
  </li>
4281
4315
 
4282
- <li class="never" data-hits="" data-linenumber="34">
4316
+ <li class="never" data-hits="" data-linenumber="38">
4283
4317
 
4284
4318
 
4285
4319
  <code class="ruby"></code>
4286
4320
  </li>
4287
4321
 
4288
- <li class="covered" data-hits="1" data-linenumber="35">
4322
+ <li class="covered" data-hits="1" data-linenumber="39">
4289
4323
  <span class="hits">1</span>
4290
4324
 
4291
- <code class="ruby"> def groups</code>
4325
+ <code class="ruby"> def group_lines</code>
4292
4326
  </li>
4293
4327
 
4294
- <li class="missed" data-hits="0" data-linenumber="36">
4328
+ <li class="missed" data-hits="0" data-linenumber="40">
4329
+
4330
+
4331
+ <code class="ruby"> lines = []</code>
4332
+ </li>
4333
+
4334
+ <li class="missed" data-hits="0" data-linenumber="41">
4295
4335
 
4296
4336
 
4297
4337
  <code class="ruby"> groups.each_pair do |group, pattern|</code>
4298
4338
  </li>
4299
4339
 
4300
- <li class="missed" data-hits="0" data-linenumber="37">
4340
+ <li class="missed" data-hits="0" data-linenumber="42">
4301
4341
 
4302
4342
 
4303
- <code class="ruby"> &quot;add_group \&quot;#{group}\&quot;, \&quot;#{pattern}\&quot;&quot;</code>
4343
+ <code class="ruby"> lines &lt;&lt; &quot;add_group \&quot;#{group}\&quot;, \&quot;#{pattern}\&quot;&quot;</code>
4304
4344
  </li>
4305
4345
 
4306
- <li class="never" data-hits="" data-linenumber="38">
4346
+ <li class="never" data-hits="" data-linenumber="43">
4307
4347
 
4308
4348
 
4309
4349
  <code class="ruby"> end</code>
4310
4350
  </li>
4311
4351
 
4312
- <li class="never" data-hits="" data-linenumber="39">
4352
+ <li class="missed" data-hits="0" data-linenumber="44">
4353
+
4354
+
4355
+ <code class="ruby"> lines</code>
4356
+ </li>
4357
+
4358
+ <li class="never" data-hits="" data-linenumber="45">
4313
4359
 
4314
4360
 
4315
4361
  <code class="ruby"> end</code>
4316
4362
  </li>
4317
4363
 
4318
- <li class="never" data-hits="" data-linenumber="40">
4364
+ <li class="never" data-hits="" data-linenumber="46">
4319
4365
 
4320
4366
 
4321
4367
  <code class="ruby"></code>
4322
4368
  </li>
4323
4369
 
4324
- <li class="covered" data-hits="1" data-linenumber="41">
4370
+ <li class="covered" data-hits="1" data-linenumber="47">
4325
4371
  <span class="hits">1</span>
4326
4372
 
4327
4373
  <code class="ruby"> def config_file_contents</code>
4328
4374
  </li>
4329
4375
 
4330
- <li class="missed" data-hits="0" data-linenumber="42">
4376
+ <li class="missed" data-hits="0" data-linenumber="48">
4331
4377
 
4332
4378
 
4333
4379
  <code class="ruby"> contents = [&quot;SimpleCov.start do&quot;]</code>
4334
4380
  </li>
4335
4381
 
4336
- <li class="missed" data-hits="0" data-linenumber="43">
4382
+ <li class="missed" data-hits="0" data-linenumber="49">
4337
4383
 
4338
4384
 
4339
4385
  <code class="ruby"> contents &lt;&lt; &quot; coverage_dir \&quot;#{report_dir}\&quot;&quot;</code>
4340
4386
  </li>
4341
4387
 
4342
- <li class="missed" data-hits="0" data-linenumber="44">
4388
+ <li class="missed" data-hits="0" data-linenumber="50">
4343
4389
 
4344
4390
 
4345
- <code class="ruby"> contents += filters.map{|line| &quot; &quot; + line}</code>
4391
+ <code class="ruby"> contents += filter_lines.map{|line| &quot; &quot; + line}</code>
4346
4392
  </li>
4347
4393
 
4348
- <li class="missed" data-hits="0" data-linenumber="45">
4394
+ <li class="missed" data-hits="0" data-linenumber="51">
4349
4395
 
4350
4396
 
4351
- <code class="ruby"> contents += groups.map{|line| &quot; &quot; + line}</code>
4397
+ <code class="ruby"> contents += group_lines.map{|line| &quot; &quot; + line}</code>
4352
4398
  </li>
4353
4399
 
4354
- <li class="missed" data-hits="0" data-linenumber="46">
4400
+ <li class="missed" data-hits="0" data-linenumber="52">
4355
4401
 
4356
4402
 
4357
4403
  <code class="ruby"> contents &lt;&lt; &quot;end&quot;</code>
4358
4404
  </li>
4359
4405
 
4360
- <li class="missed" data-hits="0" data-linenumber="47">
4406
+ <li class="missed" data-hits="0" data-linenumber="53">
4361
4407
 
4362
4408
 
4363
4409
  <code class="ruby"> return contents.join(&quot;\n&quot;)</code>
4364
4410
  </li>
4365
4411
 
4366
- <li class="never" data-hits="" data-linenumber="48">
4412
+ <li class="never" data-hits="" data-linenumber="54">
4367
4413
 
4368
4414
 
4369
4415
  <code class="ruby"> end</code>
4370
4416
  </li>
4371
4417
 
4372
- <li class="never" data-hits="" data-linenumber="49">
4418
+ <li class="never" data-hits="" data-linenumber="55">
4373
4419
 
4374
4420
 
4375
4421
  <code class="ruby"></code>
4376
4422
  </li>
4377
4423
 
4378
- <li class="covered" data-hits="1" data-linenumber="50">
4424
+ <li class="covered" data-hits="1" data-linenumber="56">
4379
4425
  <span class="hits">1</span>
4380
4426
 
4381
4427
  <code class="ruby"> def define</code>
4382
4428
  </li>
4383
4429
 
4384
- <li class="covered" data-hits="1" data-linenumber="51">
4430
+ <li class="covered" data-hits="1" data-linenumber="57">
4385
4431
  <span class="hits">1</span>
4386
4432
 
4387
4433
  <code class="ruby"> in_namespace do</code>
4388
4434
  </li>
4389
4435
 
4390
- <li class="covered" data-hits="1" data-linenumber="52">
4436
+ <li class="covered" data-hits="1" data-linenumber="58">
4391
4437
  <span class="hits">1</span>
4392
4438
 
4393
4439
  <code class="ruby"> file &quot;Rakefile&quot;</code>
4394
4440
  </li>
4395
4441
 
4396
- <li class="never" data-hits="" data-linenumber="53">
4442
+ <li class="never" data-hits="" data-linenumber="59">
4397
4443
 
4398
4444
 
4399
4445
  <code class="ruby"></code>
4400
4446
  </li>
4401
4447
 
4402
- <li class="covered" data-hits="1" data-linenumber="54">
4448
+ <li class="covered" data-hits="1" data-linenumber="60">
4403
4449
  <span class="hits">1</span>
4404
4450
 
4405
4451
  <code class="ruby"> task :example_config do</code>
4406
4452
  </li>
4407
4453
 
4408
- <li class="missed" data-hits="0" data-linenumber="55">
4454
+ <li class="missed" data-hits="0" data-linenumber="61">
4409
4455
 
4410
4456
 
4411
4457
  <code class="ruby"> $stderr.puts &quot;Try this in #{config_path}&quot;</code>
4412
4458
  </li>
4413
4459
 
4414
- <li class="missed" data-hits="0" data-linenumber="56">
4460
+ <li class="missed" data-hits="0" data-linenumber="62">
4415
4461
 
4416
4462
 
4417
4463
  <code class="ruby"> $stderr.puts</code>
4418
4464
  </li>
4419
4465
 
4420
- <li class="missed" data-hits="0" data-linenumber="57">
4466
+ <li class="missed" data-hits="0" data-linenumber="63">
4421
4467
 
4422
4468
 
4423
4469
  <code class="ruby"> puts config_file_contents</code>
4424
4470
  </li>
4425
4471
 
4426
- <li class="never" data-hits="" data-linenumber="58">
4472
+ <li class="never" data-hits="" data-linenumber="64">
4427
4473
 
4428
4474
 
4429
4475
  <code class="ruby"> end</code>
4430
4476
  </li>
4431
4477
 
4432
- <li class="never" data-hits="" data-linenumber="59">
4478
+ <li class="never" data-hits="" data-linenumber="65">
4433
4479
 
4434
4480
 
4435
4481
  <code class="ruby"></code>
4436
4482
  </li>
4437
4483
 
4438
- <li class="covered" data-hits="1" data-linenumber="60">
4484
+ <li class="covered" data-hits="1" data-linenumber="66">
4439
4485
  <span class="hits">1</span>
4440
4486
 
4441
4487
  <code class="ruby"> task :config_exists do</code>
4442
4488
  </li>
4443
4489
 
4444
- <li class="missed" data-hits="0" data-linenumber="61">
4490
+ <li class="missed" data-hits="0" data-linenumber="67">
4445
4491
 
4446
4492
 
4447
4493
  <code class="ruby"> File::exists?(File::join(Rake::original_dir, &quot;.simplecov&quot;)) or fail &quot;No .simplecov&quot;</code>
4448
4494
  </li>
4449
4495
 
4450
- <li class="never" data-hits="" data-linenumber="62">
4496
+ <li class="never" data-hits="" data-linenumber="68">
4451
4497
 
4452
4498
 
4453
4499
  <code class="ruby"> end</code>
4454
4500
  </li>
4455
4501
 
4456
- <li class="never" data-hits="" data-linenumber="63">
4502
+ <li class="never" data-hits="" data-linenumber="69">
4457
4503
 
4458
4504
 
4459
4505
  <code class="ruby"></code>
4460
4506
  </li>
4461
4507
 
4462
- <li class="covered" data-hits="1" data-linenumber="64">
4508
+ <li class="covered" data-hits="1" data-linenumber="70">
4463
4509
  <span class="hits">1</span>
4464
4510
 
4465
4511
  <code class="ruby"> directory File::dirname(report_path)</code>
4466
4512
  </li>
4467
4513
 
4468
- <li class="covered" data-hits="1" data-linenumber="65">
4514
+ <li class="covered" data-hits="1" data-linenumber="71">
4469
4515
  <span class="hits">1</span>
4470
4516
 
4471
4517
  <code class="ruby"> file report_path =&gt; all_files do</code>
4472
4518
  </li>
4473
4519
 
4474
- <li class="missed" data-hits="0" data-linenumber="66">
4520
+ <li class="missed" data-hits="0" data-linenumber="72">
4475
4521
 
4476
4522
 
4477
4523
  <code class="ruby"> options = @test_lib.custom_options do |options|</code>
4478
4524
  </li>
4479
4525
 
4480
- <li class="missed" data-hits="0" data-linenumber="67">
4526
+ <li class="missed" data-hits="0" data-linenumber="73">
4481
4527
 
4482
4528
 
4483
4529
  <code class="ruby"> options.rspec_opts += %w{-r simplecov}</code>
4484
4530
  </li>
4485
4531
 
4486
- <li class="never" data-hits="" data-linenumber="68">
4532
+ <li class="never" data-hits="" data-linenumber="74">
4487
4533
 
4488
4534
 
4489
4535
  <code class="ruby"> end</code>
4490
4536
  </li>
4491
4537
 
4492
- <li class="missed" data-hits="0" data-linenumber="69">
4538
+ <li class="missed" data-hits="0" data-linenumber="75">
4493
4539
 
4494
4540
 
4495
4541
  <code class="ruby"> sh @test_lib.full_command(options)</code>
4496
4542
  </li>
4497
4543
 
4498
- <li class="never" data-hits="" data-linenumber="70">
4544
+ <li class="never" data-hits="" data-linenumber="76">
4499
4545
 
4500
4546
 
4501
4547
  <code class="ruby"> end</code>
4502
4548
  </li>
4503
4549
 
4504
- <li class="never" data-hits="" data-linenumber="71">
4550
+ <li class="never" data-hits="" data-linenumber="77">
4505
4551
 
4506
4552
 
4507
4553
  <code class="ruby"></code>
4508
4554
  </li>
4509
4555
 
4510
- <li class="covered" data-hits="1" data-linenumber="72">
4556
+ <li class="covered" data-hits="1" data-linenumber="78">
4511
4557
  <span class="hits">1</span>
4512
4558
 
4513
4559
  <code class="ruby"> task :generate_report =&gt; [:preflight, report_path]</code>
4514
4560
  </li>
4515
4561
 
4516
- <li class="never" data-hits="" data-linenumber="73">
4562
+ <li class="never" data-hits="" data-linenumber="79">
4517
4563
 
4518
4564
 
4519
4565
  <code class="ruby"></code>
4520
4566
  </li>
4521
4567
 
4522
- <li class="covered" data-hits="1" data-linenumber="74">
4568
+ <li class="covered" data-hits="1" data-linenumber="80">
4523
4569
  <span class="hits">1</span>
4524
4570
 
4525
4571
  <code class="ruby"> desc &quot;View coverage in browser&quot;</code>
4526
4572
  </li>
4527
4573
 
4528
- <li class="covered" data-hits="1" data-linenumber="75">
4574
+ <li class="covered" data-hits="1" data-linenumber="81">
4529
4575
  <span class="hits">1</span>
4530
4576
 
4531
4577
  <code class="ruby"> task :view =&gt; report_path do</code>
4532
4578
  </li>
4533
4579
 
4534
- <li class="missed" data-hits="0" data-linenumber="76">
4580
+ <li class="missed" data-hits="0" data-linenumber="82">
4535
4581
 
4536
4582
 
4537
4583
  <code class="ruby"> sh &quot;#{browser} #{report_path}&quot;</code>
4538
4584
  </li>
4539
4585
 
4540
- <li class="never" data-hits="" data-linenumber="77">
4586
+ <li class="never" data-hits="" data-linenumber="83">
4541
4587
 
4542
4588
 
4543
4589
  <code class="ruby"> end</code>
4544
4590
  </li>
4545
4591
 
4546
- <li class="never" data-hits="" data-linenumber="78">
4592
+ <li class="never" data-hits="" data-linenumber="84">
4547
4593
 
4548
4594
 
4549
4595
  <code class="ruby"></code>
4550
4596
  </li>
4551
4597
 
4552
- <li class="covered" data-hits="1" data-linenumber="79">
4598
+ <li class="covered" data-hits="1" data-linenumber="85">
4553
4599
  <span class="hits">1</span>
4554
4600
 
4555
4601
  <code class="ruby"> task :verify_coverage =&gt; :generate_report do</code>
4556
4602
  </li>
4557
4603
 
4558
- <li class="missed" data-hits="0" data-linenumber="80">
4604
+ <li class="missed" data-hits="0" data-linenumber="86">
4559
4605
 
4560
4606
 
4561
4607
  <code class="ruby"> require 'nokogiri'</code>
4562
4608
  </li>
4563
4609
 
4564
- <li class="never" data-hits="" data-linenumber="81">
4610
+ <li class="never" data-hits="" data-linenumber="87">
4565
4611
 
4566
4612
 
4567
4613
  <code class="ruby"></code>
4568
4614
  </li>
4569
4615
 
4570
- <li class="missed" data-hits="0" data-linenumber="82">
4616
+ <li class="missed" data-hits="0" data-linenumber="88">
4571
4617
 
4572
4618
 
4573
4619
  <code class="ruby"> doc = Nokogiri::parse(File::read(report_path))</code>
4574
4620
  </li>
4575
4621
 
4576
- <li class="never" data-hits="" data-linenumber="83">
4622
+ <li class="never" data-hits="" data-linenumber="89">
4577
4623
 
4578
4624
 
4579
4625
  <code class="ruby"></code>
4580
4626
  </li>
4581
4627
 
4582
- <li class="missed" data-hits="0" data-linenumber="84">
4628
+ <li class="missed" data-hits="0" data-linenumber="90">
4583
4629
 
4584
4630
 
4585
4631
  <code class="ruby"> coverage_total_xpath = &quot;//span[@class='covered_percent']/span&quot;</code>
4586
4632
  </li>
4587
4633
 
4588
- <li class="missed" data-hits="0" data-linenumber="85">
4634
+ <li class="missed" data-hits="0" data-linenumber="91">
4589
4635
 
4590
4636
 
4591
4637
  <code class="ruby"> percentage = doc.xpath(coverage_total_xpath).first.content.to_f</code>
4592
4638
  </li>
4593
4639
 
4594
- <li class="never" data-hits="" data-linenumber="86">
4640
+ <li class="never" data-hits="" data-linenumber="92">
4595
4641
 
4596
4642
 
4597
4643
  <code class="ruby"></code>
4598
4644
  </li>
4599
4645
 
4600
- <li class="missed" data-hits="0" data-linenumber="87">
4646
+ <li class="missed" data-hits="0" data-linenumber="93">
4601
4647
 
4602
4648
 
4603
4649
  <code class="ruby"> raise &quot;Coverage must be at least #{threshold} but was #{percentage}&quot; if percentage &lt; threshold</code>
4604
4650
  </li>
4605
4651
 
4606
- <li class="missed" data-hits="0" data-linenumber="88">
4652
+ <li class="missed" data-hits="0" data-linenumber="94">
4607
4653
 
4608
4654
 
4609
4655
  <code class="ruby"> puts &quot;Coverage is #{percentage}% (required: #{threshold}%)&quot;</code>
4610
4656
  </li>
4611
4657
 
4612
- <li class="never" data-hits="" data-linenumber="89">
4658
+ <li class="never" data-hits="" data-linenumber="95">
4613
4659
 
4614
4660
 
4615
4661
  <code class="ruby"> end</code>
4616
4662
  </li>
4617
4663
 
4618
- <li class="never" data-hits="" data-linenumber="90">
4664
+ <li class="never" data-hits="" data-linenumber="96">
4619
4665
 
4620
4666
 
4621
4667
  <code class="ruby"></code>
4622
4668
  </li>
4623
4669
 
4624
- <li class="covered" data-hits="1" data-linenumber="91">
4670
+ <li class="covered" data-hits="1" data-linenumber="97">
4625
4671
  <span class="hits">1</span>
4626
4672
 
4627
4673
  <code class="ruby"> task :find_stragglers =&gt; :generate_report do</code>
4628
4674
  </li>
4629
4675
 
4630
- <li class="missed" data-hits="0" data-linenumber="92">
4676
+ <li class="missed" data-hits="0" data-linenumber="98">
4631
4677
 
4632
4678
 
4633
4679
  <code class="ruby"> require 'nokogiri'</code>
4634
4680
  </li>
4635
4681
 
4636
- <li class="never" data-hits="" data-linenumber="93">
4682
+ <li class="never" data-hits="" data-linenumber="99">
4637
4683
 
4638
4684
 
4639
4685
  <code class="ruby"></code>
4640
4686
  </li>
4641
4687
 
4642
- <li class="missed" data-hits="0" data-linenumber="94">
4688
+ <li class="missed" data-hits="0" data-linenumber="100">
4643
4689
 
4644
4690
 
4645
4691
  <code class="ruby"> doc = Nokogiri::parse(File::read(report_path))</code>
4646
4692
  </li>
4647
4693
 
4648
- <li class="never" data-hits="" data-linenumber="95">
4694
+ <li class="never" data-hits="" data-linenumber="101">
4649
4695
 
4650
4696
 
4651
4697
  <code class="ruby"></code>
4652
4698
  </li>
4653
4699
 
4654
- <li class="missed" data-hits="0" data-linenumber="96">
4700
+ <li class="missed" data-hits="0" data-linenumber="102">
4655
4701
 
4656
4702
 
4657
4703
  <code class="ruby"> covered_files = doc.xpath(</code>
4658
4704
  </li>
4659
4705
 
4660
- <li class="never" data-hits="" data-linenumber="97">
4706
+ <li class="never" data-hits="" data-linenumber="103">
4661
4707
 
4662
4708
 
4663
4709
  <code class="ruby"> &quot;//table[@class='file_list']//td//a[@class='src_link']&quot;).map do |link|</code>
4664
4710
  </li>
4665
4711
 
4666
- <li class="missed" data-hits="0" data-linenumber="98">
4712
+ <li class="missed" data-hits="0" data-linenumber="104">
4667
4713
 
4668
4714
 
4669
4715
  <code class="ruby"> link.content</code>
4670
4716
  </li>
4671
4717
 
4672
- <li class="never" data-hits="" data-linenumber="99">
4718
+ <li class="never" data-hits="" data-linenumber="105">
4673
4719
 
4674
4720
 
4675
4721
  <code class="ruby"> end</code>
4676
4722
  </li>
4677
4723
 
4678
- <li class="never" data-hits="" data-linenumber="100">
4724
+ <li class="missed" data-hits="0" data-linenumber="106">
4725
+
4726
+
4727
+ <code class="ruby"> need_coverage = @code_files.find_all(&amp;coverage_filter)</code>
4728
+ </li>
4729
+
4730
+ <li class="never" data-hits="" data-linenumber="107">
4679
4731
 
4680
4732
 
4681
4733
  <code class="ruby"></code>
4682
4734
  </li>
4683
4735
 
4684
- <li class="missed" data-hits="0" data-linenumber="101">
4736
+ <li class="missed" data-hits="0" data-linenumber="108">
4685
4737
 
4686
4738
 
4687
- <code class="ruby"> not_listed = covered_files - @code_files</code>
4739
+ <code class="ruby"> not_listed = covered_files - need_coverage</code>
4688
4740
  </li>
4689
4741
 
4690
- <li class="missed" data-hits="0" data-linenumber="102">
4742
+ <li class="missed" data-hits="0" data-linenumber="109">
4691
4743
 
4692
4744
 
4693
- <code class="ruby"> not_covered = @code_files - covered_files</code>
4745
+ <code class="ruby"> not_covered = need_coverage - covered_files</code>
4694
4746
  </li>
4695
4747
 
4696
- <li class="missed" data-hits="0" data-linenumber="103">
4748
+ <li class="missed" data-hits="0" data-linenumber="110">
4697
4749
 
4698
4750
 
4699
4751
  <code class="ruby"> unless not_listed.empty? and not_covered.empty?</code>
4700
4752
  </li>
4701
4753
 
4702
- <li class="never" data-hits="" data-linenumber="104">
4754
+ <li class="never" data-hits="" data-linenumber="111">
4703
4755
 
4704
4756
 
4705
4757
  <code class="ruby"> raise [&quot;Covered files and gemspec manifest don't match:&quot;,</code>
4706
4758
  </li>
4707
4759
 
4708
- <li class="never" data-hits="" data-linenumber="105">
4760
+ <li class="never" data-hits="" data-linenumber="112">
4709
4761
 
4710
4762
 
4711
4763
  <code class="ruby"> &quot;Not in gemspec: #{not_listed.inspect}&quot;,</code>
4712
4764
  </li>
4713
4765
 
4714
- <li class="missed" data-hits="0" data-linenumber="106">
4766
+ <li class="missed" data-hits="0" data-linenumber="113">
4715
4767
 
4716
4768
 
4717
4769
  <code class="ruby"> &quot;Not covered: #{not_covered.inspect}&quot;].join(&quot;\n&quot;)</code>
4718
4770
  </li>
4719
4771
 
4720
- <li class="never" data-hits="" data-linenumber="107">
4772
+ <li class="never" data-hits="" data-linenumber="114">
4721
4773
 
4722
4774
 
4723
4775
  <code class="ruby"> end</code>
4724
4776
  </li>
4725
4777
 
4726
- <li class="never" data-hits="" data-linenumber="108">
4778
+ <li class="never" data-hits="" data-linenumber="115">
4727
4779
 
4728
4780
 
4729
4781
  <code class="ruby"> end</code>
4730
4782
  </li>
4731
4783
 
4732
- <li class="never" data-hits="" data-linenumber="109">
4784
+ <li class="never" data-hits="" data-linenumber="116">
4733
4785
 
4734
4786
 
4735
4787
  <code class="ruby"> end</code>
4736
4788
  </li>
4737
4789
 
4738
- <li class="covered" data-hits="1" data-linenumber="110">
4790
+ <li class="covered" data-hits="1" data-linenumber="117">
4739
4791
  <span class="hits">1</span>
4740
4792
 
4741
4793
  <code class="ruby"> task :preflight =&gt; in_namespace(:config_exists)</code>
4742
4794
  </li>
4743
4795
 
4744
- <li class="never" data-hits="" data-linenumber="111">
4796
+ <li class="never" data-hits="" data-linenumber="118">
4745
4797
 
4746
4798
 
4747
4799
  <code class="ruby"></code>
4748
4800
  </li>
4749
4801
 
4750
- <li class="covered" data-hits="1" data-linenumber="112">
4802
+ <li class="covered" data-hits="1" data-linenumber="119">
4751
4803
  <span class="hits">1</span>
4752
4804
 
4753
4805
  <code class="ruby"> task :qa =&gt; in_namespace(:verify_coverage, :find_stragglers)</code>
4754
4806
  </li>
4755
4807
 
4756
- <li class="never" data-hits="" data-linenumber="113">
4808
+ <li class="never" data-hits="" data-linenumber="120">
4757
4809
 
4758
4810
 
4759
4811
  <code class="ruby"> end</code>
4760
4812
  </li>
4761
4813
 
4762
- <li class="never" data-hits="" data-linenumber="114">
4814
+ <li class="never" data-hits="" data-linenumber="121">
4763
4815
 
4764
4816
 
4765
4817
  <code class="ruby"> end</code>
4766
4818
  </li>
4767
4819
 
4768
- <li class="never" data-hits="" data-linenumber="115">
4820
+ <li class="never" data-hits="" data-linenumber="122">
4769
4821
 
4770
4822
 
4771
4823
  <code class="ruby">end</code>
@@ -5140,8 +5192,8 @@
5140
5192
  <h3>lib/corundum/tasklibs.rb</h3>
5141
5193
  <h4><span class="green">100.0 %</span> covered</h4>
5142
5194
  <div>
5143
- <b>8</b> relevant lines.
5144
- <span class="green"><b>8</b> lines covered</span> and
5195
+ <b>9</b> relevant lines.
5196
+ <span class="green"><b>9</b> lines covered</span> and
5145
5197
  <span class="red"><b>0</b> lines missed.</span>
5146
5198
  </div>
5147
5199
  </div>
@@ -5194,6 +5246,12 @@
5194
5246
  <li class="covered" data-hits="1" data-linenumber="8">
5195
5247
  <span class="hits">1</span>
5196
5248
 
5249
+ <code class="ruby">require 'corundum/version_control/git'</code>
5250
+ </li>
5251
+
5252
+ <li class="covered" data-hits="1" data-linenumber="9">
5253
+ <span class="hits">1</span>
5254
+
5197
5255
  <code class="ruby">require 'corundum/yardoc'</code>
5198
5256
  </li>
5199
5257
 
@@ -5204,11 +5262,11 @@
5204
5262
  <div class="source_table" id="c0e4ec2b43f19148935644be7480430e81a2d80d">
5205
5263
  <div class="header">
5206
5264
  <h3>lib/corundum/version_control.rb</h3>
5207
- <h4><span class="green">95.0 %</span> covered</h4>
5265
+ <h4><span class="green">100.0 %</span> covered</h4>
5208
5266
  <div>
5209
- <b>20</b> relevant lines.
5210
- <span class="green"><b>19</b> lines covered</span> and
5211
- <span class="red"><b>1</b> lines missed.</span>
5267
+ <b>23</b> relevant lines.
5268
+ <span class="green"><b>23</b> lines covered</span> and
5269
+ <span class="red"><b>0</b> lines missed.</span>
5212
5270
  </div>
5213
5271
  </div>
5214
5272
 
@@ -5245,8 +5303,8 @@
5245
5303
  <code class="ruby"> def default_namespace</code>
5246
5304
  </li>
5247
5305
 
5248
- <li class="missed" data-hits="0" data-linenumber="6">
5249
-
5306
+ <li class="covered" data-hits="1" data-linenumber="6">
5307
+ <span class="hits">1</span>
5250
5308
 
5251
5309
  <code class="ruby"> :version_control</code>
5252
5310
  </li>
@@ -5284,105 +5342,327 @@
5284
5342
  <li class="covered" data-hits="1" data-linenumber="12">
5285
5343
  <span class="hits">1</span>
5286
5344
 
5345
+ <code class="ruby"> setting(:gemspec_files, toolkit.files.code + toolkit.files.test)</code>
5346
+ </li>
5347
+
5348
+ <li class="covered" data-hits="1" data-linenumber="13">
5349
+ <span class="hits">1</span>
5350
+
5287
5351
  <code class="ruby"> setting(:tag, toolkit.gemspec.version.to_s)</code>
5288
5352
  </li>
5289
5353
 
5290
- <li class="never" data-hits="" data-linenumber="13">
5354
+ <li class="never" data-hits="" data-linenumber="14">
5291
5355
 
5292
5356
 
5293
5357
  <code class="ruby"> end</code>
5294
5358
  </li>
5295
5359
 
5296
- <li class="never" data-hits="" data-linenumber="14">
5360
+ <li class="never" data-hits="" data-linenumber="15">
5297
5361
 
5298
5362
 
5299
5363
  <code class="ruby"></code>
5300
5364
  </li>
5301
5365
 
5302
- <li class="covered" data-hits="1" data-linenumber="15">
5366
+ <li class="covered" data-hits="1" data-linenumber="16">
5303
5367
  <span class="hits">1</span>
5304
5368
 
5305
5369
  <code class="ruby"> def define</code>
5306
5370
  </li>
5307
5371
 
5308
- <li class="covered" data-hits="1" data-linenumber="16">
5372
+ <li class="covered" data-hits="1" data-linenumber="17">
5309
5373
  <span class="hits">1</span>
5310
5374
 
5311
5375
  <code class="ruby"> in_namespace do</code>
5312
5376
  </li>
5313
5377
 
5314
- <li class="covered" data-hits="1" data-linenumber="17">
5378
+ <li class="covered" data-hits="1" data-linenumber="18">
5315
5379
  <span class="hits">1</span>
5316
5380
 
5317
5381
  <code class="ruby"> task :not_tagged</code>
5318
5382
  </li>
5319
5383
 
5320
- <li class="covered" data-hits="1" data-linenumber="18">
5384
+ <li class="covered" data-hits="1" data-linenumber="19">
5321
5385
  <span class="hits">1</span>
5322
5386
 
5323
- <code class="ruby"> task :is_checked_in</code>
5387
+ <code class="ruby"> task :gemspec_files_added</code>
5324
5388
  </li>
5325
5389
 
5326
- <li class="covered" data-hits="1" data-linenumber="19">
5390
+ <li class="covered" data-hits="1" data-linenumber="20">
5391
+ <span class="hits">1</span>
5392
+
5393
+ <code class="ruby"> task :workspace_committed</code>
5394
+ </li>
5395
+
5396
+ <li class="covered" data-hits="1" data-linenumber="21">
5397
+ <span class="hits">1</span>
5398
+
5399
+ <code class="ruby"> task :is_checked_in =&gt; %w{gemspec_files_added workspace_committed}</code>
5400
+ </li>
5401
+
5402
+ <li class="covered" data-hits="1" data-linenumber="22">
5327
5403
  <span class="hits">1</span>
5328
5404
 
5329
5405
  <code class="ruby"> task :tag</code>
5330
5406
  </li>
5331
5407
 
5332
- <li class="covered" data-hits="1" data-linenumber="20">
5408
+ <li class="covered" data-hits="1" data-linenumber="23">
5333
5409
  <span class="hits">1</span>
5334
5410
 
5335
5411
  <code class="ruby"> task :check_in =&gt; :tag</code>
5336
5412
  </li>
5337
5413
 
5338
- <li class="never" data-hits="" data-linenumber="21">
5414
+ <li class="never" data-hits="" data-linenumber="24">
5339
5415
 
5340
5416
 
5341
5417
  <code class="ruby"> end</code>
5342
5418
  </li>
5343
5419
 
5344
- <li class="never" data-hits="" data-linenumber="22">
5420
+ <li class="never" data-hits="" data-linenumber="25">
5345
5421
 
5346
5422
 
5347
5423
  <code class="ruby"></code>
5348
5424
  </li>
5349
5425
 
5350
- <li class="covered" data-hits="1" data-linenumber="23">
5426
+ <li class="covered" data-hits="1" data-linenumber="26">
5351
5427
  <span class="hits">1</span>
5352
5428
 
5353
5429
  <code class="ruby"> task :preflight =&gt; in_namespace(:not_tagged)</code>
5354
5430
  </li>
5355
5431
 
5356
- <li class="covered" data-hits="1" data-linenumber="24">
5432
+ <li class="covered" data-hits="1" data-linenumber="27">
5357
5433
  <span class="hits">1</span>
5358
5434
 
5359
5435
  <code class="ruby"> task :build =&gt; in_namespace(:is_checked_in)</code>
5360
5436
  </li>
5361
5437
 
5362
- <li class="covered" data-hits="1" data-linenumber="25">
5438
+ <li class="covered" data-hits="1" data-linenumber="28">
5363
5439
  <span class="hits">1</span>
5364
5440
 
5365
5441
  <code class="ruby"> in_namespace(:tag, :check_in).each do |taskname|</code>
5366
5442
  </li>
5367
5443
 
5368
- <li class="covered" data-hits="2" data-linenumber="26">
5444
+ <li class="covered" data-hits="2" data-linenumber="29">
5369
5445
  <span class="hits">2</span>
5370
5446
 
5371
5447
  <code class="ruby"> task taskname =&gt; build_finished_file</code>
5372
5448
  </li>
5373
5449
 
5374
- <li class="never" data-hits="" data-linenumber="27">
5450
+ <li class="never" data-hits="" data-linenumber="30">
5375
5451
 
5376
5452
 
5377
5453
  <code class="ruby"> end</code>
5378
5454
  </li>
5379
5455
 
5380
- <li class="covered" data-hits="1" data-linenumber="28">
5456
+ <li class="covered" data-hits="1" data-linenumber="31">
5381
5457
  <span class="hits">1</span>
5382
5458
 
5383
5459
  <code class="ruby"> task :release =&gt; in_namespace(:tag, :check_in)</code>
5384
5460
  </li>
5385
5461
 
5462
+ <li class="never" data-hits="" data-linenumber="32">
5463
+
5464
+
5465
+ <code class="ruby"> end</code>
5466
+ </li>
5467
+
5468
+ <li class="never" data-hits="" data-linenumber="33">
5469
+
5470
+
5471
+ <code class="ruby"> end</code>
5472
+ </li>
5473
+
5474
+ <li class="never" data-hits="" data-linenumber="34">
5475
+
5476
+
5477
+ <code class="ruby">end</code>
5478
+ </li>
5479
+
5480
+ </ol>
5481
+ </pre>
5482
+ </div>
5483
+
5484
+ <div class="source_table" id="9d2f811d8f8df106d5632369df2fd635327854f1">
5485
+ <div class="header">
5486
+ <h3>lib/corundum/version_control/git.rb</h3>
5487
+ <h4><span class="red">12.5 %</span> covered</h4>
5488
+ <div>
5489
+ <b>64</b> relevant lines.
5490
+ <span class="green"><b>8</b> lines covered</span> and
5491
+ <span class="red"><b>56</b> lines missed.</span>
5492
+ </div>
5493
+ </div>
5494
+
5495
+ <pre>
5496
+ <ol>
5497
+
5498
+ <li class="covered" data-hits="1" data-linenumber="1">
5499
+ <span class="hits">1</span>
5500
+
5501
+ <code class="ruby">require 'corundum/version_control'</code>
5502
+ </li>
5503
+
5504
+ <li class="never" data-hits="" data-linenumber="2">
5505
+
5506
+
5507
+ <code class="ruby"></code>
5508
+ </li>
5509
+
5510
+ <li class="covered" data-hits="1" data-linenumber="3">
5511
+ <span class="hits">1</span>
5512
+
5513
+ <code class="ruby">module Corundum</code>
5514
+ </li>
5515
+
5516
+ <li class="covered" data-hits="1" data-linenumber="4">
5517
+ <span class="hits">1</span>
5518
+
5519
+ <code class="ruby"> class Git &lt; VersionControl</code>
5520
+ </li>
5521
+
5522
+ <li class="covered" data-hits="1" data-linenumber="5">
5523
+ <span class="hits">1</span>
5524
+
5525
+ <code class="ruby"> def default_configuration(*args)</code>
5526
+ </li>
5527
+
5528
+ <li class="missed" data-hits="0" data-linenumber="6">
5529
+
5530
+
5531
+ <code class="ruby"> super</code>
5532
+ </li>
5533
+
5534
+ <li class="missed" data-hits="0" data-linenumber="7">
5535
+
5536
+
5537
+ <code class="ruby"> setting(:branch, nil)</code>
5538
+ </li>
5539
+
5540
+ <li class="never" data-hits="" data-linenumber="8">
5541
+
5542
+
5543
+ <code class="ruby"> end</code>
5544
+ </li>
5545
+
5546
+ <li class="never" data-hits="" data-linenumber="9">
5547
+
5548
+
5549
+ <code class="ruby"></code>
5550
+ </li>
5551
+
5552
+ <li class="covered" data-hits="1" data-linenumber="10">
5553
+ <span class="hits">1</span>
5554
+
5555
+ <code class="ruby"> def resolve_configuration</code>
5556
+ </li>
5557
+
5558
+ <li class="missed" data-hits="0" data-linenumber="11">
5559
+
5560
+
5561
+ <code class="ruby"> @branch ||= guess_branch</code>
5562
+ </li>
5563
+
5564
+ <li class="never" data-hits="" data-linenumber="12">
5565
+
5566
+
5567
+ <code class="ruby"> end</code>
5568
+ </li>
5569
+
5570
+ <li class="never" data-hits="" data-linenumber="13">
5571
+
5572
+
5573
+ <code class="ruby"></code>
5574
+ </li>
5575
+
5576
+ <li class="never" data-hits="" data-linenumber="14">
5577
+
5578
+
5579
+ <code class="ruby"></code>
5580
+ </li>
5581
+
5582
+ <li class="covered" data-hits="1" data-linenumber="15">
5583
+ <span class="hits">1</span>
5584
+
5585
+ <code class="ruby"> def git_command(*args)</code>
5586
+ </li>
5587
+
5588
+ <li class="missed" data-hits="0" data-linenumber="16">
5589
+
5590
+
5591
+ <code class="ruby"> result = &quot;&quot;</code>
5592
+ </li>
5593
+
5594
+ <li class="missed" data-hits="0" data-linenumber="17">
5595
+
5596
+
5597
+ <code class="ruby"> pid = nil</code>
5598
+ </li>
5599
+
5600
+ <li class="missed" data-hits="0" data-linenumber="18">
5601
+
5602
+
5603
+ <code class="ruby"> command = &quot;git --no-pager #{args.join(&quot; &quot;)}&quot;</code>
5604
+ </li>
5605
+
5606
+ <li class="missed" data-hits="0" data-linenumber="19">
5607
+
5608
+
5609
+ <code class="ruby"> puts command if verbose</code>
5610
+ </li>
5611
+
5612
+ <li class="missed" data-hits="0" data-linenumber="20">
5613
+
5614
+
5615
+ <code class="ruby"> pipe = IO.popen(command)</code>
5616
+ </li>
5617
+
5618
+ <li class="missed" data-hits="0" data-linenumber="21">
5619
+
5620
+
5621
+ <code class="ruby"> pid = pipe.pid</code>
5622
+ </li>
5623
+
5624
+ <li class="missed" data-hits="0" data-linenumber="22">
5625
+
5626
+
5627
+ <code class="ruby"> Process::wait(pid)</code>
5628
+ </li>
5629
+
5630
+ <li class="missed" data-hits="0" data-linenumber="23">
5631
+
5632
+
5633
+ <code class="ruby"> result = pipe.read</code>
5634
+ </li>
5635
+
5636
+ <li class="missed" data-hits="0" data-linenumber="24">
5637
+
5638
+
5639
+ <code class="ruby"> pipe.close</code>
5640
+ </li>
5641
+
5642
+ <li class="missed" data-hits="0" data-linenumber="25">
5643
+
5644
+
5645
+ <code class="ruby"> unless $?.exitstatus == 0</code>
5646
+ </li>
5647
+
5648
+ <li class="missed" data-hits="0" data-linenumber="26">
5649
+
5650
+
5651
+ <code class="ruby"> fail &quot;Git exited with status #{$?.exitstatus}: \n#{result}&quot;</code>
5652
+ </li>
5653
+
5654
+ <li class="never" data-hits="" data-linenumber="27">
5655
+
5656
+
5657
+ <code class="ruby"> end</code>
5658
+ </li>
5659
+
5660
+ <li class="missed" data-hits="0" data-linenumber="28">
5661
+
5662
+
5663
+ <code class="ruby"> return result.split(&quot;\n&quot;)</code>
5664
+ </li>
5665
+
5386
5666
  <li class="never" data-hits="" data-linenumber="29">
5387
5667
 
5388
5668
 
@@ -5392,10 +5672,454 @@
5392
5672
  <li class="never" data-hits="" data-linenumber="30">
5393
5673
 
5394
5674
 
5675
+ <code class="ruby"></code>
5676
+ </li>
5677
+
5678
+ <li class="covered" data-hits="1" data-linenumber="31">
5679
+ <span class="hits">1</span>
5680
+
5681
+ <code class="ruby"> def guess_branch</code>
5682
+ </li>
5683
+
5684
+ <li class="missed" data-hits="0" data-linenumber="32">
5685
+
5686
+
5687
+ <code class="ruby"> puts &quot;Guessing branch - configure Git &gt; branch&quot;</code>
5688
+ </li>
5689
+
5690
+ <li class="missed" data-hits="0" data-linenumber="33">
5691
+
5692
+
5693
+ <code class="ruby"> branch = git_command(&quot;branch&quot;).grep(/^\*/).sub(/\*\s*/,&quot;&quot;).chomp</code>
5694
+ </li>
5695
+
5696
+ <li class="missed" data-hits="0" data-linenumber="34">
5697
+
5698
+
5699
+ <code class="ruby"> puts &quot; Guessed: #{branch}&quot;</code>
5700
+ </li>
5701
+
5702
+ <li class="missed" data-hits="0" data-linenumber="35">
5703
+
5704
+
5705
+ <code class="ruby"> return branch</code>
5706
+ </li>
5707
+
5708
+ <li class="never" data-hits="" data-linenumber="36">
5709
+
5710
+
5711
+ <code class="ruby"> end</code>
5712
+ </li>
5713
+
5714
+ <li class="never" data-hits="" data-linenumber="37">
5715
+
5716
+
5717
+ <code class="ruby"></code>
5718
+ </li>
5719
+
5720
+ <li class="covered" data-hits="1" data-linenumber="38">
5721
+ <span class="hits">1</span>
5722
+
5723
+ <code class="ruby"> def define</code>
5724
+ </li>
5725
+
5726
+ <li class="missed" data-hits="0" data-linenumber="39">
5727
+
5728
+
5729
+ <code class="ruby"> super</code>
5730
+ </li>
5731
+
5732
+ <li class="never" data-hits="" data-linenumber="40">
5733
+
5734
+
5735
+ <code class="ruby"></code>
5736
+ </li>
5737
+
5738
+ <li class="missed" data-hits="0" data-linenumber="41">
5739
+
5740
+
5741
+ <code class="ruby"> in_namespace do</code>
5742
+ </li>
5743
+
5744
+ <li class="missed" data-hits="0" data-linenumber="42">
5745
+
5746
+
5747
+ <code class="ruby"> task :on_branch do</code>
5748
+ </li>
5749
+
5750
+ <li class="missed" data-hits="0" data-linenumber="43">
5751
+
5752
+
5753
+ <code class="ruby"> current_branch = git_command(&quot;branch&quot;).grep(/^\*/).first.sub(/\*\s*/,&quot;&quot;).chomp</code>
5754
+ </li>
5755
+
5756
+ <li class="missed" data-hits="0" data-linenumber="44">
5757
+
5758
+
5759
+ <code class="ruby"> unless current_branch == branch</code>
5760
+ </li>
5761
+
5762
+ <li class="missed" data-hits="0" data-linenumber="45">
5763
+
5764
+
5765
+ <code class="ruby"> fail &quot;Current branch \&quot;#{current_branch}\&quot; is not #{branch}&quot;</code>
5766
+ </li>
5767
+
5768
+ <li class="never" data-hits="" data-linenumber="46">
5769
+
5770
+
5771
+ <code class="ruby"> end</code>
5772
+ </li>
5773
+
5774
+ <li class="never" data-hits="" data-linenumber="47">
5775
+
5776
+
5777
+ <code class="ruby"> end</code>
5778
+ </li>
5779
+
5780
+ <li class="never" data-hits="" data-linenumber="48">
5781
+
5782
+
5783
+ <code class="ruby"></code>
5784
+ </li>
5785
+
5786
+ <li class="missed" data-hits="0" data-linenumber="49">
5787
+
5788
+
5789
+ <code class="ruby"> task :not_tagged =&gt; :on_branch do</code>
5790
+ </li>
5791
+
5792
+ <li class="missed" data-hits="0" data-linenumber="50">
5793
+
5794
+
5795
+ <code class="ruby"> tags = git_command(&quot;tag&quot;, &quot;-l&quot;, tag)</code>
5796
+ </li>
5797
+
5798
+ <li class="missed" data-hits="0" data-linenumber="51">
5799
+
5800
+
5801
+ <code class="ruby"> unless tags.empty?</code>
5802
+ </li>
5803
+
5804
+ <li class="missed" data-hits="0" data-linenumber="52">
5805
+
5806
+
5807
+ <code class="ruby"> fail &quot;Tag #{tag} already exists in branch #{branch}&quot;</code>
5808
+ </li>
5809
+
5810
+ <li class="never" data-hits="" data-linenumber="53">
5811
+
5812
+
5813
+ <code class="ruby"> end</code>
5814
+ </li>
5815
+
5816
+ <li class="never" data-hits="" data-linenumber="54">
5817
+
5818
+
5819
+ <code class="ruby"> end</code>
5820
+ </li>
5821
+
5822
+ <li class="never" data-hits="" data-linenumber="55">
5823
+
5824
+
5825
+ <code class="ruby"></code>
5826
+ </li>
5827
+
5828
+ <li class="missed" data-hits="0" data-linenumber="56">
5829
+
5830
+
5831
+ <code class="ruby"> task :workspace_committed =&gt; :on_branch do</code>
5832
+ </li>
5833
+
5834
+ <li class="missed" data-hits="0" data-linenumber="57">
5835
+
5836
+
5837
+ <code class="ruby"> diffs = git_command(&quot;diff&quot;, &quot;--stat&quot;, &quot;HEAD&quot;)</code>
5838
+ </li>
5839
+
5840
+ <li class="missed" data-hits="0" data-linenumber="58">
5841
+
5842
+
5843
+ <code class="ruby"> unless diffs.empty?</code>
5844
+ </li>
5845
+
5846
+ <li class="missed" data-hits="0" data-linenumber="59">
5847
+
5848
+
5849
+ <code class="ruby"> fail &quot;Workspace not committed:\n #{diffs.join(&quot; \n&quot;)}&quot;</code>
5850
+ </li>
5851
+
5852
+ <li class="never" data-hits="" data-linenumber="60">
5853
+
5854
+
5855
+ <code class="ruby"> end</code>
5856
+ </li>
5857
+
5858
+ <li class="never" data-hits="" data-linenumber="61">
5859
+
5860
+
5861
+ <code class="ruby"> end</code>
5862
+ </li>
5863
+
5864
+ <li class="never" data-hits="" data-linenumber="62">
5865
+
5866
+
5867
+ <code class="ruby"></code>
5868
+ </li>
5869
+
5870
+ <li class="missed" data-hits="0" data-linenumber="63">
5871
+
5872
+
5873
+ <code class="ruby"> task :gemspec_files_added =&gt; :on_branch do</code>
5874
+ </li>
5875
+
5876
+ <li class="missed" data-hits="0" data-linenumber="64">
5877
+
5878
+
5879
+ <code class="ruby"> list = git_command(%w{ls-tree -r HEAD})</code>
5880
+ </li>
5881
+
5882
+ <li class="missed" data-hits="0" data-linenumber="65">
5883
+
5884
+
5885
+ <code class="ruby"> list.map! do |line|</code>
5886
+ </li>
5887
+
5888
+ <li class="missed" data-hits="0" data-linenumber="66">
5889
+
5890
+
5891
+ <code class="ruby"> line.split(/\s+/)[3]</code>
5892
+ </li>
5893
+
5894
+ <li class="never" data-hits="" data-linenumber="67">
5895
+
5896
+
5897
+ <code class="ruby"> end</code>
5898
+ </li>
5899
+
5900
+ <li class="never" data-hits="" data-linenumber="68">
5901
+
5902
+
5903
+ <code class="ruby"></code>
5904
+ </li>
5905
+
5906
+ <li class="missed" data-hits="0" data-linenumber="69">
5907
+
5908
+
5909
+ <code class="ruby"> missing = gemspec_files - list</code>
5910
+ </li>
5911
+
5912
+ <li class="missed" data-hits="0" data-linenumber="70">
5913
+
5914
+
5915
+ <code class="ruby"> unless missing.empty?</code>
5916
+ </li>
5917
+
5918
+ <li class="missed" data-hits="0" data-linenumber="71">
5919
+
5920
+
5921
+ <code class="ruby"> fail &quot;Gemspec files not in version control: #{missing.join(&quot;, &quot;)}&quot;</code>
5922
+ </li>
5923
+
5924
+ <li class="never" data-hits="" data-linenumber="72">
5925
+
5926
+
5927
+ <code class="ruby"> end</code>
5928
+ </li>
5929
+
5930
+ <li class="never" data-hits="" data-linenumber="73">
5931
+
5932
+
5933
+ <code class="ruby"> end</code>
5934
+ </li>
5935
+
5936
+ <li class="never" data-hits="" data-linenumber="74">
5937
+
5938
+
5939
+ <code class="ruby"></code>
5940
+ </li>
5941
+
5942
+ <li class="missed" data-hits="0" data-linenumber="75">
5943
+
5944
+
5945
+ <code class="ruby"> task :is_pulled do</code>
5946
+ </li>
5947
+
5948
+ <li class="missed" data-hits="0" data-linenumber="76">
5949
+
5950
+
5951
+ <code class="ruby"> fetch = git_command(&quot;fetch&quot;, &quot;--dry-run&quot;)</code>
5952
+ </li>
5953
+
5954
+ <li class="missed" data-hits="0" data-linenumber="77">
5955
+
5956
+
5957
+ <code class="ruby"> unless fetch.empty?</code>
5958
+ </li>
5959
+
5960
+ <li class="missed" data-hits="0" data-linenumber="78">
5961
+
5962
+
5963
+ <code class="ruby"> fail &quot;Remote branch has unpulled changes&quot;</code>
5964
+ </li>
5965
+
5966
+ <li class="never" data-hits="" data-linenumber="79">
5967
+
5968
+
5969
+ <code class="ruby"> end</code>
5970
+ </li>
5971
+
5972
+ <li class="never" data-hits="" data-linenumber="80">
5973
+
5974
+
5975
+ <code class="ruby"></code>
5976
+ </li>
5977
+
5978
+ <li class="missed" data-hits="0" data-linenumber="81">
5979
+
5980
+
5981
+ <code class="ruby"> remote = git_command(&quot;config&quot;, &quot;--get&quot;, &quot;branch.#{branch}.remote&quot;).first</code>
5982
+ </li>
5983
+
5984
+ <li class="missed" data-hits="0" data-linenumber="82">
5985
+
5986
+
5987
+ <code class="ruby"> merge = git_command(&quot;config&quot;, &quot;--get&quot;, &quot;branch.#{branch}.merge&quot;).first.split(&quot;/&quot;).last</code>
5988
+ </li>
5989
+
5990
+ <li class="never" data-hits="" data-linenumber="83">
5991
+
5992
+
5993
+ <code class="ruby"></code>
5994
+ </li>
5995
+
5996
+ <li class="missed" data-hits="0" data-linenumber="84">
5997
+
5998
+
5999
+ <code class="ruby"> ancestor = git_command(&quot;merge-base&quot;, branch, &quot;#{remote}/#{merge}&quot;).first</code>
6000
+ </li>
6001
+
6002
+ <li class="missed" data-hits="0" data-linenumber="85">
6003
+
6004
+
6005
+ <code class="ruby"> remote_rev = File::read(&quot;.git/refs/remotes/#{remote}/#{merge}&quot;).chomp</code>
6006
+ </li>
6007
+
6008
+ <li class="never" data-hits="" data-linenumber="86">
6009
+
6010
+
6011
+ <code class="ruby"></code>
6012
+ </li>
6013
+
6014
+ <li class="missed" data-hits="0" data-linenumber="87">
6015
+
6016
+
6017
+ <code class="ruby"> unless ancestor == remote_rev</code>
6018
+ </li>
6019
+
6020
+ <li class="missed" data-hits="0" data-linenumber="88">
6021
+
6022
+
6023
+ <code class="ruby"> fail &quot;Unmerged changes with remote branch #{remote}/#{merge}&quot;</code>
6024
+ </li>
6025
+
6026
+ <li class="never" data-hits="" data-linenumber="89">
6027
+
6028
+
6029
+ <code class="ruby"> end</code>
6030
+ </li>
6031
+
6032
+ <li class="never" data-hits="" data-linenumber="90">
6033
+
6034
+
6035
+ <code class="ruby"> end</code>
6036
+ </li>
6037
+
6038
+ <li class="missed" data-hits="0" data-linenumber="91">
6039
+
6040
+
6041
+ <code class="ruby"> task :is_checked_in =&gt; :is_pulled</code>
6042
+ </li>
6043
+
6044
+ <li class="never" data-hits="" data-linenumber="92">
6045
+
6046
+
6047
+ <code class="ruby"></code>
6048
+ </li>
6049
+
6050
+ <li class="missed" data-hits="0" data-linenumber="93">
6051
+
6052
+
6053
+ <code class="ruby"> task :tag =&gt; :on_branch do</code>
6054
+ </li>
6055
+
6056
+ <li class="missed" data-hits="0" data-linenumber="94">
6057
+
6058
+
6059
+ <code class="ruby"> git_command(&quot;tag&quot;, tag)</code>
6060
+ </li>
6061
+
6062
+ <li class="never" data-hits="" data-linenumber="95">
6063
+
6064
+
6065
+ <code class="ruby"> end</code>
6066
+ </li>
6067
+
6068
+ <li class="never" data-hits="" data-linenumber="96">
6069
+
6070
+
6071
+ <code class="ruby"></code>
6072
+ </li>
6073
+
6074
+ <li class="missed" data-hits="0" data-linenumber="97">
6075
+
6076
+
6077
+ <code class="ruby"> task :push =&gt; :on_branch do</code>
6078
+ </li>
6079
+
6080
+ <li class="missed" data-hits="0" data-linenumber="98">
6081
+
6082
+
6083
+ <code class="ruby"> git_command(&quot;push&quot;)</code>
6084
+ </li>
6085
+
6086
+ <li class="never" data-hits="" data-linenumber="99">
6087
+
6088
+
6089
+ <code class="ruby"> end</code>
6090
+ </li>
6091
+
6092
+ <li class="never" data-hits="" data-linenumber="100">
6093
+
6094
+
6095
+ <code class="ruby"></code>
6096
+ </li>
6097
+
6098
+ <li class="missed" data-hits="0" data-linenumber="101">
6099
+
6100
+
6101
+ <code class="ruby"> task :check_in =&gt; [:push]</code>
6102
+ </li>
6103
+
6104
+ <li class="never" data-hits="" data-linenumber="102">
6105
+
6106
+
6107
+ <code class="ruby"> end</code>
6108
+ </li>
6109
+
6110
+ <li class="never" data-hits="" data-linenumber="103">
6111
+
6112
+
6113
+ <code class="ruby"> end</code>
6114
+ </li>
6115
+
6116
+ <li class="never" data-hits="" data-linenumber="104">
6117
+
6118
+
5395
6119
  <code class="ruby"> end</code>
5396
6120
  </li>
5397
6121
 
5398
- <li class="never" data-hits="" data-linenumber="31">
6122
+ <li class="never" data-hits="" data-linenumber="105">
5399
6123
 
5400
6124
 
5401
6125
  <code class="ruby">end</code>
@@ -5408,11 +6132,11 @@
5408
6132
  <div class="source_table" id="58abe8fc8bf9e6883cd935a00513d6746935b12c">
5409
6133
  <div class="header">
5410
6134
  <h3>lib/corundum/version_control/monotone.rb</h3>
5411
- <h4><span class="yellow">85.14 %</span> covered</h4>
6135
+ <h4><span class="red">68.04 %</span> covered</h4>
5412
6136
  <div>
5413
- <b>74</b> relevant lines.
5414
- <span class="green"><b>63</b> lines covered</span> and
5415
- <span class="red"><b>11</b> lines missed.</span>
6137
+ <b>97</b> relevant lines.
6138
+ <span class="green"><b>66</b> lines covered</span> and
6139
+ <span class="red"><b>31</b> lines missed.</span>
5416
6140
  </div>
5417
6141
  </div>
5418
6142
 
@@ -5452,43 +6176,43 @@
5452
6176
  <li class="covered" data-hits="1" data-linenumber="6">
5453
6177
  <span class="hits">1</span>
5454
6178
 
5455
- <code class="ruby"> def default_namespace</code>
6179
+ <code class="ruby"> def default_configuration(*args)</code>
5456
6180
  </li>
5457
6181
 
5458
6182
  <li class="covered" data-hits="1" data-linenumber="7">
5459
6183
  <span class="hits">1</span>
5460
6184
 
5461
- <code class="ruby"> :monotone</code>
6185
+ <code class="ruby"> super</code>
5462
6186
  </li>
5463
6187
 
5464
- <li class="never" data-hits="" data-linenumber="8">
5465
-
6188
+ <li class="covered" data-hits="1" data-linenumber="8">
6189
+ <span class="hits">1</span>
5466
6190
 
5467
- <code class="ruby"> end</code>
6191
+ <code class="ruby"> setting(:branch, nil)</code>
5468
6192
  </li>
5469
6193
 
5470
6194
  <li class="never" data-hits="" data-linenumber="9">
5471
6195
 
5472
6196
 
5473
- <code class="ruby"></code>
6197
+ <code class="ruby"> end</code>
5474
6198
  </li>
5475
6199
 
5476
- <li class="covered" data-hits="1" data-linenumber="10">
5477
- <span class="hits">1</span>
6200
+ <li class="never" data-hits="" data-linenumber="10">
5478
6201
 
5479
- <code class="ruby"> def default_configuration(*args)</code>
6202
+
6203
+ <code class="ruby"></code>
5480
6204
  </li>
5481
6205
 
5482
6206
  <li class="covered" data-hits="1" data-linenumber="11">
5483
6207
  <span class="hits">1</span>
5484
6208
 
5485
- <code class="ruby"> super</code>
6209
+ <code class="ruby"> def resolve_configuration</code>
5486
6210
  </li>
5487
6211
 
5488
6212
  <li class="covered" data-hits="1" data-linenumber="12">
5489
6213
  <span class="hits">1</span>
5490
6214
 
5491
- <code class="ruby"> setting(:branch, nil)</code>
6215
+ <code class="ruby"> @branch ||= guess_branch</code>
5492
6216
  </li>
5493
6217
 
5494
6218
  <li class="never" data-hits="" data-linenumber="13">
@@ -5506,61 +6230,61 @@
5506
6230
  <li class="covered" data-hits="1" data-linenumber="15">
5507
6231
  <span class="hits">1</span>
5508
6232
 
5509
- <code class="ruby"> def resolve_configuration</code>
6233
+ <code class="ruby"> def mtn_automate(cmd, *args)</code>
5510
6234
  </li>
5511
6235
 
5512
- <li class="covered" data-hits="1" data-linenumber="16">
5513
- <span class="hits">1</span>
6236
+ <li class="covered" data-hits="2" data-linenumber="16">
6237
+ <span class="hits">2</span>
5514
6238
 
5515
- <code class="ruby"> @branch ||= guess_branch</code>
6239
+ <code class="ruby"> command = &quot;mtn automate #{cmd} #{args.join(&quot; &quot;)}&quot;</code>
5516
6240
  </li>
5517
6241
 
5518
- <li class="never" data-hits="" data-linenumber="17">
5519
-
6242
+ <li class="covered" data-hits="2" data-linenumber="17">
6243
+ <span class="hits">2</span>
5520
6244
 
5521
- <code class="ruby"> end</code>
6245
+ <code class="ruby"> puts command if verbose</code>
5522
6246
  </li>
5523
6247
 
5524
- <li class="never" data-hits="" data-linenumber="18">
5525
-
6248
+ <li class="covered" data-hits="2" data-linenumber="18">
6249
+ <span class="hits">2</span>
5526
6250
 
5527
- <code class="ruby"></code>
6251
+ <code class="ruby"> pipe = IO.popen(command)</code>
5528
6252
  </li>
5529
6253
 
5530
- <li class="covered" data-hits="1" data-linenumber="19">
5531
- <span class="hits">1</span>
6254
+ <li class="covered" data-hits="2" data-linenumber="19">
6255
+ <span class="hits">2</span>
5532
6256
 
5533
- <code class="ruby"> def mtn_automate(cmd, *args)</code>
6257
+ <code class="ruby"> pid = pipe.pid</code>
5534
6258
  </li>
5535
6259
 
5536
6260
  <li class="covered" data-hits="2" data-linenumber="20">
5537
6261
  <span class="hits">2</span>
5538
6262
 
5539
- <code class="ruby"> result = &quot;&quot;</code>
6263
+ <code class="ruby"> Process.wait(pid)</code>
5540
6264
  </li>
5541
6265
 
5542
6266
  <li class="covered" data-hits="2" data-linenumber="21">
5543
6267
  <span class="hits">2</span>
5544
6268
 
5545
- <code class="ruby"> command = &quot;mtn automate #{cmd} #{args.join(&quot; &quot;)}&quot;</code>
6269
+ <code class="ruby"> result = pipe.read</code>
5546
6270
  </li>
5547
6271
 
5548
6272
  <li class="covered" data-hits="2" data-linenumber="22">
5549
6273
  <span class="hits">2</span>
5550
6274
 
5551
- <code class="ruby"> puts command if verbose</code>
6275
+ <code class="ruby"> pipe.close</code>
5552
6276
  </li>
5553
6277
 
5554
6278
  <li class="covered" data-hits="2" data-linenumber="23">
5555
6279
  <span class="hits">2</span>
5556
6280
 
5557
- <code class="ruby"> IO.popen(command) do |pipe|</code>
6281
+ <code class="ruby"> unless $?.exitstatus == 0</code>
5558
6282
  </li>
5559
6283
 
5560
- <li class="covered" data-hits="2" data-linenumber="24">
5561
- <span class="hits">2</span>
6284
+ <li class="missed" data-hits="0" data-linenumber="24">
6285
+
5562
6286
 
5563
- <code class="ruby"> result = pipe.read</code>
6287
+ <code class="ruby"> fail &quot;Monotone failed with exit status #{$?.exitstatus}: \n#{result}&quot;</code>
5564
6288
  </li>
5565
6289
 
5566
6290
  <li class="never" data-hits="" data-linenumber="25">
@@ -5572,7 +6296,7 @@
5572
6296
  <li class="covered" data-hits="2" data-linenumber="26">
5573
6297
  <span class="hits">2</span>
5574
6298
 
5575
- <code class="ruby"> result</code>
6299
+ <code class="ruby"> return result</code>
5576
6300
  </li>
5577
6301
 
5578
6302
  <li class="never" data-hits="" data-linenumber="27">
@@ -5956,208 +6680,400 @@
5956
6680
  <li class="covered" data-hits="1" data-linenumber="90">
5957
6681
  <span class="hits">1</span>
5958
6682
 
6683
+ <code class="ruby"> def stanzas(first_item, items)</code>
6684
+ </li>
6685
+
6686
+ <li class="missed" data-hits="0" data-linenumber="91">
6687
+
6688
+
6689
+ <code class="ruby"> stanzas = []</code>
6690
+ </li>
6691
+
6692
+ <li class="missed" data-hits="0" data-linenumber="92">
6693
+
6694
+
6695
+ <code class="ruby"> current_stanza = {}</code>
6696
+ </li>
6697
+
6698
+ <li class="missed" data-hits="0" data-linenumber="93">
6699
+
6700
+
6701
+ <code class="ruby"> items.each do |name, value|</code>
6702
+ </li>
6703
+
6704
+ <li class="missed" data-hits="0" data-linenumber="94">
6705
+
6706
+
6707
+ <code class="ruby"> if name == first_item</code>
6708
+ </li>
6709
+
6710
+ <li class="missed" data-hits="0" data-linenumber="95">
6711
+
6712
+
6713
+ <code class="ruby"> current_stanza = {}</code>
6714
+ </li>
6715
+
6716
+ <li class="missed" data-hits="0" data-linenumber="96">
6717
+
6718
+
6719
+ <code class="ruby"> stanzas &lt;&lt; current_stanza</code>
6720
+ </li>
6721
+
6722
+ <li class="never" data-hits="" data-linenumber="97">
6723
+
6724
+
6725
+ <code class="ruby"> end</code>
6726
+ </li>
6727
+
6728
+ <li class="missed" data-hits="0" data-linenumber="98">
6729
+
6730
+
6731
+ <code class="ruby"> current_stanza[name] = value</code>
6732
+ </li>
6733
+
6734
+ <li class="never" data-hits="" data-linenumber="99">
6735
+
6736
+
6737
+ <code class="ruby"> end</code>
6738
+ </li>
6739
+
6740
+ <li class="missed" data-hits="0" data-linenumber="100">
6741
+
6742
+
6743
+ <code class="ruby"> return stanzas</code>
6744
+ </li>
6745
+
6746
+ <li class="never" data-hits="" data-linenumber="101">
6747
+
6748
+
6749
+ <code class="ruby"> end</code>
6750
+ </li>
6751
+
6752
+ <li class="never" data-hits="" data-linenumber="102">
6753
+
6754
+
6755
+ <code class="ruby"></code>
6756
+ </li>
6757
+
6758
+ <li class="covered" data-hits="1" data-linenumber="103">
6759
+ <span class="hits">1</span>
6760
+
5959
6761
  <code class="ruby"> def define</code>
5960
6762
  </li>
5961
6763
 
5962
- <li class="covered" data-hits="1" data-linenumber="91">
6764
+ <li class="covered" data-hits="1" data-linenumber="104">
5963
6765
  <span class="hits">1</span>
5964
6766
 
5965
6767
  <code class="ruby"> super</code>
5966
6768
  </li>
5967
6769
 
5968
- <li class="never" data-hits="" data-linenumber="92">
6770
+ <li class="never" data-hits="" data-linenumber="105">
5969
6771
 
5970
6772
 
5971
6773
  <code class="ruby"></code>
5972
6774
  </li>
5973
6775
 
5974
- <li class="covered" data-hits="1" data-linenumber="93">
6776
+ <li class="covered" data-hits="1" data-linenumber="106">
5975
6777
  <span class="hits">1</span>
5976
6778
 
5977
6779
  <code class="ruby"> in_namespace do</code>
5978
6780
  </li>
5979
6781
 
5980
- <li class="covered" data-hits="1" data-linenumber="94">
6782
+ <li class="covered" data-hits="1" data-linenumber="107">
6783
+ <span class="hits">1</span>
6784
+
6785
+ <code class="ruby"> task :on_branch do</code>
6786
+ </li>
6787
+
6788
+ <li class="missed" data-hits="0" data-linenumber="108">
6789
+
6790
+
6791
+ <code class="ruby"> branches = parse_certs(mtn_automate(&quot;certs&quot;, base_revision))[&quot;branch&quot;] || []</code>
6792
+ </li>
6793
+
6794
+ <li class="missed" data-hits="0" data-linenumber="109">
6795
+
6796
+
6797
+ <code class="ruby"> unless branches.include?(branch)</code>
6798
+ </li>
6799
+
6800
+ <li class="missed" data-hits="0" data-linenumber="110">
6801
+
6802
+
6803
+ <code class="ruby"> fail &quot;Not on branch #{branch}&quot;</code>
6804
+ </li>
6805
+
6806
+ <li class="never" data-hits="" data-linenumber="111">
6807
+
6808
+
6809
+ <code class="ruby"> end</code>
6810
+ </li>
6811
+
6812
+ <li class="never" data-hits="" data-linenumber="112">
6813
+
6814
+
6815
+ <code class="ruby"> end</code>
6816
+ </li>
6817
+
6818
+ <li class="never" data-hits="" data-linenumber="113">
6819
+
6820
+
6821
+ <code class="ruby"></code>
6822
+ </li>
6823
+
6824
+ <li class="covered" data-hits="1" data-linenumber="114">
5981
6825
  <span class="hits">1</span>
5982
6826
 
5983
6827
  <code class="ruby"> task :not_tagged do</code>
5984
6828
  </li>
5985
6829
 
5986
- <li class="missed" data-hits="0" data-linenumber="95">
6830
+ <li class="missed" data-hits="0" data-linenumber="115">
5987
6831
 
5988
6832
 
5989
6833
  <code class="ruby"> items = parse_basic_io(mtn_automate(&quot;tags&quot;, branch))</code>
5990
6834
  </li>
5991
6835
 
5992
- <li class="missed" data-hits="0" data-linenumber="96">
6836
+ <li class="missed" data-hits="0" data-linenumber="116">
5993
6837
 
5994
6838
 
5995
6839
  <code class="ruby"> tags = items.find{|pair| pair[0] == &quot;tag&quot; &amp;&amp; pair[1] == tag}</code>
5996
6840
  </li>
5997
6841
 
5998
- <li class="missed" data-hits="0" data-linenumber="97">
6842
+ <li class="missed" data-hits="0" data-linenumber="117">
5999
6843
 
6000
6844
 
6001
6845
  <code class="ruby"> unless tags.nil?</code>
6002
6846
  </li>
6003
6847
 
6004
- <li class="missed" data-hits="0" data-linenumber="98">
6848
+ <li class="missed" data-hits="0" data-linenumber="118">
6005
6849
 
6006
6850
 
6007
6851
  <code class="ruby"> fail &quot;Tag #{tag} already exists in branch #{branch}&quot;</code>
6008
6852
  </li>
6009
6853
 
6010
- <li class="never" data-hits="" data-linenumber="99">
6854
+ <li class="never" data-hits="" data-linenumber="119">
6011
6855
 
6012
6856
 
6013
6857
  <code class="ruby"> end</code>
6014
6858
  </li>
6015
6859
 
6016
- <li class="never" data-hits="" data-linenumber="100">
6860
+ <li class="never" data-hits="" data-linenumber="120">
6017
6861
 
6018
6862
 
6019
6863
  <code class="ruby"> end</code>
6020
6864
  </li>
6021
6865
 
6022
- <li class="never" data-hits="" data-linenumber="101">
6866
+ <li class="never" data-hits="" data-linenumber="121">
6023
6867
 
6024
6868
 
6025
6869
  <code class="ruby"></code>
6026
6870
  </li>
6027
6871
 
6028
- <li class="covered" data-hits="1" data-linenumber="102">
6872
+ <li class="covered" data-hits="1" data-linenumber="122">
6029
6873
  <span class="hits">1</span>
6030
6874
 
6031
- <code class="ruby"> task :is_committed do</code>
6875
+ <code class="ruby"> task :workspace_committed =&gt; :on_branch do</code>
6032
6876
  </li>
6033
6877
 
6034
- <li class="missed" data-hits="0" data-linenumber="103">
6878
+ <li class="missed" data-hits="0" data-linenumber="123">
6035
6879
 
6036
6880
 
6037
6881
  <code class="ruby"> items = parse_basic_io(mtn_automate(&quot;inventory&quot;))</code>
6038
6882
  </li>
6039
6883
 
6040
- <li class="missed" data-hits="0" data-linenumber="104">
6884
+ <li class="missed" data-hits="0" data-linenumber="124">
6041
6885
 
6042
6886
 
6043
6887
  <code class="ruby"> changed = items.find{|pair| pair[0] == &quot;changes&quot;}</code>
6044
6888
  </li>
6045
6889
 
6046
- <li class="missed" data-hits="0" data-linenumber="105">
6890
+ <li class="missed" data-hits="0" data-linenumber="125">
6047
6891
 
6048
6892
 
6049
6893
  <code class="ruby"> unless changed.nil?</code>
6050
6894
  </li>
6051
6895
 
6052
- <li class="missed" data-hits="0" data-linenumber="106">
6896
+ <li class="missed" data-hits="0" data-linenumber="126">
6053
6897
 
6054
6898
 
6055
6899
  <code class="ruby"> fail &quot;Uncommitted changes exist in workspace&quot;</code>
6056
6900
  </li>
6057
6901
 
6058
- <li class="never" data-hits="" data-linenumber="107">
6902
+ <li class="never" data-hits="" data-linenumber="127">
6059
6903
 
6060
6904
 
6061
6905
  <code class="ruby"> end</code>
6062
6906
  </li>
6063
6907
 
6064
- <li class="never" data-hits="" data-linenumber="108">
6908
+ <li class="never" data-hits="" data-linenumber="128">
6065
6909
 
6066
6910
 
6067
6911
  <code class="ruby"> end</code>
6068
6912
  </li>
6069
6913
 
6070
- <li class="never" data-hits="" data-linenumber="109">
6914
+ <li class="never" data-hits="" data-linenumber="129">
6071
6915
 
6072
6916
 
6073
6917
  <code class="ruby"></code>
6074
6918
  </li>
6075
6919
 
6076
- <li class="covered" data-hits="1" data-linenumber="110">
6920
+ <li class="covered" data-hits="1" data-linenumber="130">
6077
6921
  <span class="hits">1</span>
6078
6922
 
6079
- <code class="ruby"> task :tag do</code>
6923
+ <code class="ruby"> task :gemspec_files_added =&gt; :on_branch do</code>
6080
6924
  </li>
6081
6925
 
6082
- <li class="missed" data-hits="0" data-linenumber="111">
6926
+ <li class="missed" data-hits="0" data-linenumber="131">
6083
6927
 
6084
6928
 
6085
- <code class="ruby"> mtn_automate(&quot;cert&quot;, base_revision, &quot;tag&quot;, tag)</code>
6929
+ <code class="ruby"> items = stanzas(&quot;path&quot;, parse_basic_io(mtn_automate(&quot;inventory&quot;)))</code>
6086
6930
  </li>
6087
6931
 
6088
- <li class="never" data-hits="" data-linenumber="112">
6932
+ <li class="missed" data-hits="0" data-linenumber="132">
6933
+
6934
+
6935
+ <code class="ruby"> items.delete_if{|item| item[&quot;status&quot;] == &quot;unknown&quot;}</code>
6936
+ </li>
6937
+
6938
+ <li class="missed" data-hits="0" data-linenumber="133">
6939
+
6940
+
6941
+ <code class="ruby"> known_paths = items.each_with_object({}) do |item, hash|</code>
6942
+ </li>
6943
+
6944
+ <li class="missed" data-hits="0" data-linenumber="134">
6945
+
6946
+
6947
+ <code class="ruby"> hash[item[&quot;path&quot;]] = true</code>
6948
+ </li>
6949
+
6950
+ <li class="never" data-hits="" data-linenumber="135">
6951
+
6952
+
6953
+ <code class="ruby"> end</code>
6954
+ </li>
6955
+
6956
+ <li class="never" data-hits="" data-linenumber="136">
6957
+
6958
+
6959
+ <code class="ruby"></code>
6960
+ </li>
6961
+
6962
+ <li class="missed" data-hits="0" data-linenumber="137">
6963
+
6964
+
6965
+ <code class="ruby"> files = gemspec_files.dup</code>
6966
+ </li>
6967
+
6968
+ <li class="missed" data-hits="0" data-linenumber="138">
6969
+
6970
+
6971
+ <code class="ruby"> files.delete_if{|path| known_paths[path]}</code>
6972
+ </li>
6973
+
6974
+ <li class="missed" data-hits="0" data-linenumber="139">
6975
+
6976
+
6977
+ <code class="ruby"> unless files.empty?</code>
6978
+ </li>
6979
+
6980
+ <li class="missed" data-hits="0" data-linenumber="140">
6981
+
6982
+
6983
+ <code class="ruby"> fail &quot;Gemspec files not in version control: #{files.join(&quot; &quot;)}&quot;</code>
6984
+ </li>
6985
+
6986
+ <li class="never" data-hits="" data-linenumber="141">
6987
+
6988
+
6989
+ <code class="ruby"> end</code>
6990
+ </li>
6991
+
6992
+ <li class="never" data-hits="" data-linenumber="142">
6089
6993
 
6090
6994
 
6091
6995
  <code class="ruby"> end</code>
6092
6996
  </li>
6093
6997
 
6094
- <li class="never" data-hits="" data-linenumber="113">
6998
+ <li class="never" data-hits="" data-linenumber="143">
6095
6999
 
6096
7000
 
6097
7001
  <code class="ruby"></code>
6098
7002
  </li>
6099
7003
 
6100
- <li class="covered" data-hits="1" data-linenumber="114">
7004
+ <li class="covered" data-hits="1" data-linenumber="144">
6101
7005
  <span class="hits">1</span>
6102
7006
 
6103
- <code class="ruby"> task :sync do</code>
7007
+ <code class="ruby"> task :tag =&gt; :on_branch do</code>
6104
7008
  </li>
6105
7009
 
6106
- <li class="missed" data-hits="0" data-linenumber="115">
7010
+ <li class="missed" data-hits="0" data-linenumber="145">
6107
7011
 
6108
7012
 
6109
- <code class="ruby"> mtn_automate(&quot;sync&quot;)</code>
7013
+ <code class="ruby"> mtn_automate(&quot;cert&quot;, base_revision, &quot;tag&quot;, tag)</code>
6110
7014
  </li>
6111
7015
 
6112
- <li class="never" data-hits="" data-linenumber="116">
7016
+ <li class="never" data-hits="" data-linenumber="146">
6113
7017
 
6114
7018
 
6115
7019
  <code class="ruby"> end</code>
6116
7020
  </li>
6117
7021
 
6118
- <li class="never" data-hits="" data-linenumber="117">
7022
+ <li class="never" data-hits="" data-linenumber="147">
6119
7023
 
6120
7024
 
6121
7025
  <code class="ruby"></code>
6122
7026
  </li>
6123
7027
 
6124
- <li class="covered" data-hits="1" data-linenumber="118">
7028
+ <li class="covered" data-hits="1" data-linenumber="148">
6125
7029
  <span class="hits">1</span>
6126
7030
 
6127
- <code class="ruby"> task :check_in =&gt; %w{commit sync}</code>
7031
+ <code class="ruby"> task :sync do</code>
6128
7032
  </li>
6129
7033
 
6130
- <li class="never" data-hits="" data-linenumber="119">
7034
+ <li class="missed" data-hits="0" data-linenumber="149">
7035
+
7036
+
7037
+ <code class="ruby"> mtn_automate(&quot;sync&quot;)</code>
7038
+ </li>
7039
+
7040
+ <li class="never" data-hits="" data-linenumber="150">
7041
+
7042
+
7043
+ <code class="ruby"> end</code>
7044
+ </li>
7045
+
7046
+ <li class="never" data-hits="" data-linenumber="151">
6131
7047
 
6132
7048
 
6133
7049
  <code class="ruby"></code>
6134
7050
  </li>
6135
7051
 
6136
- <li class="covered" data-hits="1" data-linenumber="120">
7052
+ <li class="covered" data-hits="1" data-linenumber="152">
6137
7053
  <span class="hits">1</span>
6138
7054
 
6139
- <code class="ruby"> task :is_checked_in =&gt; [:is_committed]</code>
7055
+ <code class="ruby"> task :check_in =&gt; [:sync]</code>
6140
7056
  </li>
6141
7057
 
6142
- <li class="never" data-hits="" data-linenumber="121">
7058
+ <li class="never" data-hits="" data-linenumber="153">
6143
7059
 
6144
7060
 
6145
7061
  <code class="ruby"> end</code>
6146
7062
  </li>
6147
7063
 
6148
- <li class="never" data-hits="" data-linenumber="122">
7064
+ <li class="never" data-hits="" data-linenumber="154">
6149
7065
 
6150
7066
 
6151
7067
  <code class="ruby"> end</code>
6152
7068
  </li>
6153
7069
 
6154
- <li class="never" data-hits="" data-linenumber="123">
7070
+ <li class="never" data-hits="" data-linenumber="155">
6155
7071
 
6156
7072
 
6157
7073
  <code class="ruby"> end</code>
6158
7074
  </li>
6159
7075
 
6160
- <li class="never" data-hits="" data-linenumber="124">
7076
+ <li class="never" data-hits="" data-linenumber="156">
6161
7077
 
6162
7078
 
6163
7079
  <code class="ruby">end</code>