slather 1.8.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.travis.yml +1 -0
  4. data/CHANGELOG.md +21 -1
  5. data/README.md +15 -10
  6. data/README_Images/test_scheme.png +0 -0
  7. data/Rakefile +6 -0
  8. data/bin/slather +45 -6
  9. data/lib/slather/coverage_file.rb +37 -90
  10. data/lib/slather/coverage_info.rb +84 -0
  11. data/lib/slather/coverage_service/cobertura_xml_output.rb +10 -6
  12. data/lib/slather/coverage_service/coveralls.rb +5 -1
  13. data/lib/slather/coverage_service/gutter_json_output.rb +12 -8
  14. data/lib/slather/coverage_service/hardcover.rb +5 -1
  15. data/lib/slather/coverage_service/html_output.rb +32 -19
  16. data/lib/slather/coverage_service/simple_output.rb +5 -1
  17. data/lib/slather/{coveralls_coverage_file.rb → coveralls_coverage.rb} +1 -1
  18. data/lib/slather/profdata_coverage_file.rb +130 -0
  19. data/lib/slather/project.rb +191 -27
  20. data/lib/slather/version.rb +1 -1
  21. data/lib/slather.rb +9 -1
  22. data/slather.gemspec +4 -4
  23. data/spec/fixtures/cobertura.xml +56 -79
  24. data/spec/fixtures/fixtures/Fixtures.swift +15 -0
  25. data/spec/fixtures/fixtures/other_fixtures.m +23 -0
  26. data/spec/fixtures/fixtures_html/Branches.m.html +244 -258
  27. data/spec/fixtures/fixtures_html/BranchesTests.m.html +209 -225
  28. data/spec/fixtures/fixtures_html/fixtures.m.html +134 -148
  29. data/spec/fixtures/fixtures_html/fixturesTests.m.html +199 -213
  30. data/spec/fixtures/fixtures_html/index.html +68 -131
  31. data/spec/fixtures/fixtures_html/peekaviewTests.m.html +189 -203
  32. data/spec/fixtures/gutter.json +1 -1
  33. data/spec/slather/coverage_file_spec.rb +20 -12
  34. data/spec/slather/coverage_service/cobertura_xml_spec.rb +7 -3
  35. data/spec/slather/coverage_service/coveralls_spec.rb +61 -20
  36. data/spec/slather/coverage_service/gutter_json_spec.rb +6 -2
  37. data/spec/slather/coverage_service/hardcover_spec.rb +33 -3
  38. data/spec/slather/coverage_service/html_output_spec.rb +48 -7
  39. data/spec/slather/coverage_service/simple_output_spec.rb +12 -13
  40. data/spec/slather/profdata_coverage_spec.rb +128 -0
  41. data/spec/slather/project_spec.rb +222 -49
  42. data/spec/spec_helper.rb +28 -2
  43. metadata +58 -46
  44. data/spec/fixtures/fixtures_html/Empty.m.html +0 -30
  45. data/spec/fixtures/fixtures_html/fixtures_cpp.cpp.html +0 -30
  46. data/spec/fixtures/fixtures_html/fixtures_m.m.html +0 -30
  47. data/spec/fixtures/fixtures_html/fixtures_mm.mm.html +0 -30
  48. data/spec/fixtures/fixtures_html/peekaview.m.html +0 -190
@@ -1,261 +1,247 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
2
  <html>
3
- <head>
4
- <title>Branches.m - Slather</title>
5
- <link href="../../../assets/slather.css" media="all" rel="stylesheet">
6
- </head>
7
- <body>
8
- <header>
9
- <div class="row">
10
- <a href="index.html"><img src="../../../docs/logo.jpg" alt="Slather logo"></a>
11
- </div>
12
- </header>
13
-
14
- <div class="row">
15
- <div id="reports">
16
- <h2 class="cov_title">
17
- <span>Coverage for "Branches.m" : </span><span class="cov_low">50.00%</span>
18
- </h2>
19
- <h4 class="cov_subtitle">(10 of 20 relevant lines covered)</h4>
20
- <h4 class="cov_filepath">spec/fixtures/fixtures/more_files/Branches.m</h4>
21
- <table class="source_code">
22
- <tr class="never">
23
- <td class="num">1</td>
24
- <td class="src"><pre><code>//</code></pre></td>
25
- <td class="coverage"></td>
26
- </tr>
27
- <tr class="never">
28
- <td class="num">2</td>
29
- <td class="src"><pre><code>// Branches.m</code></pre></td>
30
- <td class="coverage"></td>
31
- </tr>
32
- <tr class="never">
33
- <td class="num">3</td>
34
- <td class="src"><pre><code>// fixtures</code></pre></td>
35
- <td class="coverage"></td>
36
- </tr>
37
- <tr class="never">
38
- <td class="num">4</td>
39
- <td class="src"><pre><code>//</code></pre></td>
40
- <td class="coverage"></td>
41
- </tr>
42
- <tr class="never">
43
- <td class="num">5</td>
44
- <td class="src"><pre><code>// Created by Julian Krumow on 11.10.14.</code></pre></td>
45
- <td class="coverage"></td>
46
- </tr>
47
- <tr class="never">
48
- <td class="num">6</td>
49
- <td class="src"><pre><code>// Copyright (c) 2014 marklarr. All rights reserved.</code></pre></td>
50
- <td class="coverage"></td>
51
- </tr>
52
- <tr class="never">
53
- <td class="num">7</td>
54
- <td class="src"><pre><code>//</code></pre></td>
55
- <td class="coverage"></td>
56
- </tr>
57
- <tr class="never">
58
- <td class="num">8</td>
59
- <td class="src"><pre><code></code></pre></td>
60
- <td class="coverage"></td>
61
- </tr>
62
- <tr class="never">
63
- <td class="num">9</td>
64
- <td class="src"><pre><code>#import "Branches.h"</code></pre></td>
65
- <td class="coverage"></td>
66
- </tr>
67
- <tr class="never">
68
- <td class="num">10</td>
69
- <td class="src"><pre><code></code></pre></td>
70
- <td class="coverage"></td>
71
- </tr>
72
- <tr class="never">
73
- <td class="num">11</td>
74
- <td class="src"><pre><code>@implementation Branches</code></pre></td>
75
- <td class="coverage"></td>
76
- </tr>
77
- <tr class="never">
78
- <td class="num">12</td>
79
- <td class="src"><pre><code></code></pre></td>
80
- <td class="coverage"></td>
81
- </tr>
82
- <tr class="covered">
83
- <td class="num">13</td>
84
- <td class="src"><pre><code>- (void)branches:(BOOL)goIf skipBranches:(BOOL)skipBranches</code></pre></td>
85
- <td class="coverage">2x</td>
86
- </tr>
87
- <tr class="never">
88
- <td class="num">14</td>
89
- <td class="src"><pre><code>{</code></pre></td>
90
- <td class="coverage"></td>
91
- </tr>
92
- <tr class="covered">
93
- <td class="num">15</td>
94
- <td class="src"><pre><code> if (goIf) {</code></pre></td>
95
- <td class="coverage">2x</td>
96
- </tr>
97
- <tr class="covered">
98
- <td class="num">16</td>
99
- <td class="src"><pre><code> NSLog(@"foo.");</code></pre></td>
100
- <td class="coverage">1x</td>
101
- </tr>
102
- <tr class="never">
103
- <td class="num">17</td>
104
- <td class="src"><pre><code> </code></pre></td>
105
- <td class="coverage"></td>
106
- </tr>
107
- <tr class="covered">
108
- <td class="num">18</td>
109
- <td class="src"><pre><code> if (!skipBranches) {</code></pre></td>
110
- <td class="coverage">1x</td>
111
- </tr>
112
- <tr class="missed">
113
- <td class="num">19</td>
114
- <td class="src"><pre><code> NSLog(@"not skipped.");</code></pre></td>
115
- <td class="coverage">!</td>
116
- </tr>
117
- <tr class="missed">
118
- <td class="num">20</td>
119
- <td class="src"><pre><code> }</code></pre></td>
120
- <td class="coverage">!</td>
121
- </tr>
122
- <tr class="covered">
123
- <td class="num">21</td>
124
- <td class="src"><pre><code> } else {</code></pre></td>
125
- <td class="coverage">1x</td>
126
- </tr>
127
- <tr class="covered">
128
- <td class="num">22</td>
129
- <td class="src"><pre><code> NSLog(@"bar.");</code></pre></td>
130
- <td class="coverage">1x</td>
131
- </tr>
132
- <tr class="never">
133
- <td class="num">23</td>
134
- <td class="src"><pre><code> }</code></pre></td>
135
- <td class="coverage"></td>
136
- </tr>
137
- <tr class="never">
138
- <td class="num">24</td>
139
- <td class="src"><pre><code> </code></pre></td>
140
- <td class="coverage"></td>
141
- </tr>
142
- <tr class="covered">
143
- <td class="num">25</td>
144
- <td class="src"><pre><code> int i = 5;</code></pre></td>
145
- <td class="coverage">2x</td>
146
- </tr>
147
- <tr class="covered">
148
- <td class="num">26</td>
149
- <td class="src"><pre><code> if (i == 5) {</code></pre></td>
150
- <td class="coverage">2x</td>
151
- </tr>
152
- <tr class="covered">
153
- <td class="num">27</td>
154
- <td class="src"><pre><code> return;</code></pre></td>
155
- <td class="coverage">2x</td>
156
- </tr>
157
- <tr class="never">
158
- <td class="num">28</td>
159
- <td class="src"><pre><code> }</code></pre></td>
160
- <td class="coverage"></td>
161
- </tr>
162
- <tr class="missed">
163
- <td class="num">29</td>
164
- <td class="src"><pre><code> switch (i) {</code></pre></td>
165
- <td class="coverage">!</td>
166
- </tr>
167
- <tr class="never">
168
- <td class="num">30</td>
169
- <td class="src"><pre><code> case 0:</code></pre></td>
170
- <td class="coverage"></td>
171
- </tr>
172
- <tr class="missed">
173
- <td class="num">31</td>
174
- <td class="src"><pre><code> NSLog(@"0");</code></pre></td>
175
- <td class="coverage">!</td>
176
- </tr>
177
- <tr class="missed">
178
- <td class="num">32</td>
179
- <td class="src"><pre><code> break;</code></pre></td>
180
- <td class="coverage">!</td>
181
- </tr>
182
- <tr class="never">
183
- <td class="num">33</td>
184
- <td class="src"><pre><code> </code></pre></td>
185
- <td class="coverage"></td>
186
- </tr>
187
- <tr class="never">
188
- <td class="num">34</td>
189
- <td class="src"><pre><code> case 1:</code></pre></td>
190
- <td class="coverage"></td>
191
- </tr>
192
- <tr class="missed">
193
- <td class="num">35</td>
194
- <td class="src"><pre><code> NSLog(@"1");</code></pre></td>
195
- <td class="coverage">!</td>
196
- </tr>
197
- <tr class="missed">
198
- <td class="num">36</td>
199
- <td class="src"><pre><code> break;</code></pre></td>
200
- <td class="coverage">!</td>
201
- </tr>
202
- <tr class="never">
203
- <td class="num">37</td>
204
- <td class="src"><pre><code> case 5:</code></pre></td>
205
- <td class="coverage"></td>
206
- </tr>
207
- <tr class="missed">
208
- <td class="num">38</td>
209
- <td class="src"><pre><code> NSLog(@"5");</code></pre></td>
210
- <td class="coverage">!</td>
211
- </tr>
212
- <tr class="missed">
213
- <td class="num">39</td>
214
- <td class="src"><pre><code> break;</code></pre></td>
215
- <td class="coverage">!</td>
216
- </tr>
217
- <tr class="never">
218
- <td class="num">40</td>
219
- <td class="src"><pre><code> default:</code></pre></td>
220
- <td class="coverage"></td>
221
- </tr>
222
- <tr class="missed">
223
- <td class="num">41</td>
224
- <td class="src"><pre><code> break;</code></pre></td>
225
- <td class="coverage">!</td>
226
- </tr>
227
- <tr class="never">
228
- <td class="num">42</td>
229
- <td class="src"><pre><code> }</code></pre></td>
230
- <td class="coverage"></td>
231
- </tr>
232
- <tr class="covered">
233
- <td class="num">43</td>
234
- <td class="src"><pre><code>}</code></pre></td>
235
- <td class="coverage">2x</td>
236
- </tr>
237
- <tr class="never">
238
- <td class="num">44</td>
239
- <td class="src"><pre><code></code></pre></td>
240
- <td class="coverage"></td>
241
- </tr>
242
- <tr class="never">
243
- <td class="num">45</td>
244
- <td class="src"><pre><code>@end</code></pre></td>
245
- <td class="coverage"></td>
246
- </tr>
247
- </table>
248
- </div>
249
- </div>
250
- <footer>
251
- <div class="row">
252
- <p><a href="https://github.com/venmo/slather">Fork me on Github</a></p>
253
- <p>&copy; 2015 Slather</p>
254
- </div>
255
- </footer>
256
-
257
- <script src="../../../assets/highlight.pack.js"></script>
258
- <script>hljs.initHighlightingOnLoad();</script>
259
-
260
- </body>
3
+ <head>
4
+ <title>Branches.m - Slather</title>
5
+ <link href="/Users/civetta/Works/Personal/slather/viteinfinite-slather/assets/slather.css" media="all" rel="stylesheet">
6
+ </head>
7
+ <body>
8
+ <header><div class="row"><a href="index.html"><img src="/Users/civetta/Works/Personal/slather/viteinfinite-slather/docs/logo.jpg" alt="Slather logo"></a></div></header><div class="row"><div id="reports">
9
+ <h2 class="cov_title">
10
+ <span>Coverage for "Branches.m" : </span><span class="cov_low">43.33%</span>
11
+ </h2>
12
+ <h4 class="cov_subtitle">(13 of 30 relevant lines covered)</h4>
13
+ <h4 class="cov_filepath">spec/fixtures/fixtures/more_files/Branches.m</h4>
14
+ <table class="source_code">
15
+ <tr class="never">
16
+ <td class="num">1</td>
17
+ <td class="src"><pre><code class="objc">//</code></pre></td>
18
+ <td class="coverage"></td>
19
+ </tr>
20
+ <tr class="never">
21
+ <td class="num">2</td>
22
+ <td class="src"><pre><code class="objc">// Branches.m</code></pre></td>
23
+ <td class="coverage"></td>
24
+ </tr>
25
+ <tr class="never">
26
+ <td class="num">3</td>
27
+ <td class="src"><pre><code class="objc">// fixtures</code></pre></td>
28
+ <td class="coverage"></td>
29
+ </tr>
30
+ <tr class="never">
31
+ <td class="num">4</td>
32
+ <td class="src"><pre><code class="objc">//</code></pre></td>
33
+ <td class="coverage"></td>
34
+ </tr>
35
+ <tr class="never">
36
+ <td class="num">5</td>
37
+ <td class="src"><pre><code class="objc">// Created by Julian Krumow on 11.10.14.</code></pre></td>
38
+ <td class="coverage"></td>
39
+ </tr>
40
+ <tr class="never">
41
+ <td class="num">6</td>
42
+ <td class="src"><pre><code class="objc">// Copyright (c) 2014 marklarr. All rights reserved.</code></pre></td>
43
+ <td class="coverage"></td>
44
+ </tr>
45
+ <tr class="never">
46
+ <td class="num">7</td>
47
+ <td class="src"><pre><code class="objc">//</code></pre></td>
48
+ <td class="coverage"></td>
49
+ </tr>
50
+ <tr class="never">
51
+ <td class="num">8</td>
52
+ <td class="src"><pre><code class="objc"></code></pre></td>
53
+ <td class="coverage"></td>
54
+ </tr>
55
+ <tr class="never">
56
+ <td class="num">9</td>
57
+ <td class="src"><pre><code class="objc">#import "Branches.h"</code></pre></td>
58
+ <td class="coverage"></td>
59
+ </tr>
60
+ <tr class="never">
61
+ <td class="num">10</td>
62
+ <td class="src"><pre><code class="objc"></code></pre></td>
63
+ <td class="coverage"></td>
64
+ </tr>
65
+ <tr class="never">
66
+ <td class="num">11</td>
67
+ <td class="src"><pre><code class="objc">@implementation Branches</code></pre></td>
68
+ <td class="coverage"></td>
69
+ </tr>
70
+ <tr class="never">
71
+ <td class="num">12</td>
72
+ <td class="src"><pre><code class="objc"></code></pre></td>
73
+ <td class="coverage"></td>
74
+ </tr>
75
+ <tr class="never">
76
+ <td class="num">13</td>
77
+ <td class="src"><pre><code class="objc">- (void)branches:(BOOL)goIf skipBranches:(BOOL)skipBranches</code></pre></td>
78
+ <td class="coverage"></td>
79
+ </tr>
80
+ <tr class="covered">
81
+ <td class="num">14</td>
82
+ <td class="src"><pre><code class="objc">{</code></pre></td>
83
+ <td class="coverage">2x</td>
84
+ </tr>
85
+ <tr class="covered">
86
+ <td class="num">15</td>
87
+ <td class="src"><pre><code class="objc"> if (goIf) {</code></pre></td>
88
+ <td class="coverage">2x</td>
89
+ </tr>
90
+ <tr class="covered">
91
+ <td class="num">16</td>
92
+ <td class="src"><pre><code class="objc"> NSLog(@"foo.");</code></pre></td>
93
+ <td class="coverage">1x</td>
94
+ </tr>
95
+ <tr class="covered">
96
+ <td class="num">17</td>
97
+ <td class="src"><pre><code class="objc"> </code></pre></td>
98
+ <td class="coverage">1x</td>
99
+ </tr>
100
+ <tr class="covered">
101
+ <td class="num">18</td>
102
+ <td class="src"><pre><code class="objc"> if (!skipBranches) {</code></pre></td>
103
+ <td class="coverage">1x</td>
104
+ </tr>
105
+ <tr class="missed">
106
+ <td class="num">19</td>
107
+ <td class="src"><pre><code class="objc"> NSLog(@"not skipped.");</code></pre></td>
108
+ <td class="coverage">!</td>
109
+ </tr>
110
+ <tr class="missed">
111
+ <td class="num">20</td>
112
+ <td class="src"><pre><code class="objc"> }</code></pre></td>
113
+ <td class="coverage">!</td>
114
+ </tr>
115
+ <tr class="covered">
116
+ <td class="num">21</td>
117
+ <td class="src"><pre><code class="objc"> } else {</code></pre></td>
118
+ <td class="coverage">1x</td>
119
+ </tr>
120
+ <tr class="covered">
121
+ <td class="num">22</td>
122
+ <td class="src"><pre><code class="objc"> NSLog(@"bar.");</code></pre></td>
123
+ <td class="coverage">1x</td>
124
+ </tr>
125
+ <tr class="covered">
126
+ <td class="num">23</td>
127
+ <td class="src"><pre><code class="objc"> }</code></pre></td>
128
+ <td class="coverage">1x</td>
129
+ </tr>
130
+ <tr class="covered">
131
+ <td class="num">24</td>
132
+ <td class="src"><pre><code class="objc"> </code></pre></td>
133
+ <td class="coverage">2x</td>
134
+ </tr>
135
+ <tr class="covered">
136
+ <td class="num">25</td>
137
+ <td class="src"><pre><code class="objc"> int i = 5;</code></pre></td>
138
+ <td class="coverage">2x</td>
139
+ </tr>
140
+ <tr class="covered">
141
+ <td class="num">26</td>
142
+ <td class="src"><pre><code class="objc"> if (i == 5) {</code></pre></td>
143
+ <td class="coverage">2x</td>
144
+ </tr>
145
+ <tr class="covered">
146
+ <td class="num">27</td>
147
+ <td class="src"><pre><code class="objc"> return;</code></pre></td>
148
+ <td class="coverage">2x</td>
149
+ </tr>
150
+ <tr class="covered">
151
+ <td class="num">28</td>
152
+ <td class="src"><pre><code class="objc"> }</code></pre></td>
153
+ <td class="coverage">2x</td>
154
+ </tr>
155
+ <tr class="missed">
156
+ <td class="num">29</td>
157
+ <td class="src"><pre><code class="objc"> switch (i) {</code></pre></td>
158
+ <td class="coverage">!</td>
159
+ </tr>
160
+ <tr class="missed">
161
+ <td class="num">30</td>
162
+ <td class="src"><pre><code class="objc"> case 0:</code></pre></td>
163
+ <td class="coverage">!</td>
164
+ </tr>
165
+ <tr class="missed">
166
+ <td class="num">31</td>
167
+ <td class="src"><pre><code class="objc"> NSLog(@"0");</code></pre></td>
168
+ <td class="coverage">!</td>
169
+ </tr>
170
+ <tr class="missed">
171
+ <td class="num">32</td>
172
+ <td class="src"><pre><code class="objc"> break;</code></pre></td>
173
+ <td class="coverage">!</td>
174
+ </tr>
175
+ <tr class="missed">
176
+ <td class="num">33</td>
177
+ <td class="src"><pre><code class="objc"> </code></pre></td>
178
+ <td class="coverage">!</td>
179
+ </tr>
180
+ <tr class="missed">
181
+ <td class="num">34</td>
182
+ <td class="src"><pre><code class="objc"> case 1:</code></pre></td>
183
+ <td class="coverage">!</td>
184
+ </tr>
185
+ <tr class="missed">
186
+ <td class="num">35</td>
187
+ <td class="src"><pre><code class="objc"> NSLog(@"1");</code></pre></td>
188
+ <td class="coverage">!</td>
189
+ </tr>
190
+ <tr class="missed">
191
+ <td class="num">36</td>
192
+ <td class="src"><pre><code class="objc"> break;</code></pre></td>
193
+ <td class="coverage">!</td>
194
+ </tr>
195
+ <tr class="missed">
196
+ <td class="num">37</td>
197
+ <td class="src"><pre><code class="objc"> case 5:</code></pre></td>
198
+ <td class="coverage">!</td>
199
+ </tr>
200
+ <tr class="missed">
201
+ <td class="num">38</td>
202
+ <td class="src"><pre><code class="objc"> NSLog(@"5");</code></pre></td>
203
+ <td class="coverage">!</td>
204
+ </tr>
205
+ <tr class="missed">
206
+ <td class="num">39</td>
207
+ <td class="src"><pre><code class="objc"> break;</code></pre></td>
208
+ <td class="coverage">!</td>
209
+ </tr>
210
+ <tr class="missed">
211
+ <td class="num">40</td>
212
+ <td class="src"><pre><code class="objc"> default:</code></pre></td>
213
+ <td class="coverage">!</td>
214
+ </tr>
215
+ <tr class="missed">
216
+ <td class="num">41</td>
217
+ <td class="src"><pre><code class="objc"> break;</code></pre></td>
218
+ <td class="coverage">!</td>
219
+ </tr>
220
+ <tr class="missed">
221
+ <td class="num">42</td>
222
+ <td class="src"><pre><code class="objc"> }</code></pre></td>
223
+ <td class="coverage">!</td>
224
+ </tr>
225
+ <tr class="missed">
226
+ <td class="num">43</td>
227
+ <td class="src"><pre><code class="objc">}</code></pre></td>
228
+ <td class="coverage">!</td>
229
+ </tr>
230
+ <tr class="never">
231
+ <td class="num">44</td>
232
+ <td class="src"><pre><code class="objc"></code></pre></td>
233
+ <td class="coverage"></td>
234
+ </tr>
235
+ <tr class="never">
236
+ <td class="num">45</td>
237
+ <td class="src"><pre><code class="objc">@end</code></pre></td>
238
+ <td class="coverage"></td>
239
+ </tr>
240
+ </table>
241
+ </div></div>
242
+ <footer><div class="row">
243
+ <p><a href="https://github.com/venmo/slather">Fork me on Github</a></p>
244
+ <p>&copy; 2016 Slather</p>
245
+ </div></footer><script src="/Users/civetta/Works/Personal/slather/viteinfinite-slather/assets/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script>
246
+ </body>
261
247
  </html>