minitest-reporters 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e6b7a770ddd1f72abb68531badb27cb13fc38189c0f638d91b7244c5a2856c9
4
- data.tar.gz: 44b074935fd563c3be78833b59a5aba4c0faad662b5adb6d531f4adc7180bd62
3
+ metadata.gz: 54837f288718fddac0abe8cda8051bc027844c09cd5bf142c9d371fd1bf79c3a
4
+ data.tar.gz: 243d9e2a0ae21700e2e32220151e5f677416843774ff4cf6c9bbd793530fe300
5
5
  SHA512:
6
- metadata.gz: 9cee23ccb7b443ef4fefea6a8420e3452d171d0c544b6835c1442658616a5db513182ba1dc77731259050fc2431b47e318ff0c116d4a20d7a592bba100b9837e
7
- data.tar.gz: 216c4f9cabcb7d43304266c3bbb83bf033ad84686bc7258f8c6b6f5dd9970fdc6fc66655bf76e94f27728bd0afb924ef030e29fc8a9a75753f0f879487f9a47a
6
+ metadata.gz: f2cf7754ee755a2cec74031d8bc0fdbc800cea71175547ee4d522dabde0ee369e236115ea3bdc8f784b384cd5035a2dbd963b1b87d1bf2aeed8905f5b742d0f8
7
+ data.tar.gz: 6528208716e43124e05a0d5d6661a4662bf2db90b1652693a5ed04bbbbaa72149fc5e2d3625741ea5abd0a77696e43d1cd8b620c7bedf8b89cbfe1635c606c14
@@ -0,0 +1,35 @@
1
+ name: Tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby-version:
13
+ - head
14
+ - '3.1'
15
+ - '3.0'
16
+ - '2.7'
17
+ - '2.6'
18
+ - '2.5'
19
+ - '2.4'
20
+ - '2.3'
21
+ - '2.2'
22
+ - '2.1'
23
+ - '2.0'
24
+ - jruby-head
25
+ - jruby-9.3
26
+ - jruby-9.2
27
+ steps:
28
+ - uses: actions/checkout@v2
29
+ - name: Set up Ruby ${{ matrix.ruby-version }}
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby-version }}
33
+ bundler-cache: true # 'bundle install' and cache
34
+ - name: Run tests
35
+ run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  ---
2
- #AllCops:
3
- # DisabledByDefault: true
2
+ AllCops:
3
+ NewCops: enable
4
+
5
+ inherit_from: .rubocop_todo.yml
4
6
 
5
7
  Layout:
6
8
  Enabled: true
@@ -15,22 +17,15 @@ Metrics:
15
17
  Severity: refactor
16
18
  Enabled: false
17
19
 
18
- Metrics/LineLength:
20
+ Layout/LineLength:
19
21
  Severity: convention
20
- Max: 130
21
22
 
22
23
  Naming:
23
24
  Enabled: true
24
25
 
25
- Naming/UncommunicativeMethodParamName:
26
+ Naming/MethodParameterName:
26
27
  MinNameLength: 1
27
28
 
28
- Performance:
29
- Enabled: true
30
-
31
- Rails:
32
- Enabled: false
33
-
34
29
  Security:
35
30
  Enabled: true
36
31
 
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,514 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2022-03-28 02:29:37 UTC using RuboCop version 1.26.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # This cop supports safe auto-correction (--auto-correct).
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'minitest-reporters.gemspec'
16
+
17
+ # Offense count: 1
18
+ # This cop supports safe auto-correction (--auto-correct).
19
+ # Configuration parameters: Include.
20
+ # Include: **/*.gemspec
21
+ Gemspec/RequireMFA:
22
+ Exclude:
23
+ - 'minitest-reporters.gemspec'
24
+
25
+ # Offense count: 1
26
+ # Configuration parameters: Include.
27
+ # Include: **/*.gemspec
28
+ Gemspec/RequiredRubyVersion:
29
+ Exclude:
30
+ - 'minitest-reporters.gemspec'
31
+
32
+ # Offense count: 7
33
+ # This cop supports safe auto-correction (--auto-correct).
34
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
35
+ # SupportedStyles: with_first_argument, with_fixed_indentation
36
+ Layout/ArgumentAlignment:
37
+ Exclude:
38
+ - 'lib/minitest/reporters/junit_reporter.rb'
39
+
40
+ # Offense count: 1
41
+ # This cop supports safe auto-correction (--auto-correct).
42
+ # Configuration parameters: EnforcedStyleAlignWith.
43
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
44
+ Layout/BlockAlignment:
45
+ Exclude:
46
+ - 'lib/minitest/reporters/junit_reporter.rb'
47
+
48
+ # Offense count: 1
49
+ # This cop supports safe auto-correction (--auto-correct).
50
+ Layout/ClosingParenthesisIndentation:
51
+ Exclude:
52
+ - 'test/unit/minitest/junit_reporter_test.rb'
53
+
54
+ # Offense count: 2
55
+ # This cop supports safe auto-correction (--auto-correct).
56
+ Layout/ElseAlignment:
57
+ Exclude:
58
+ - 'lib/minitest/reporters/default_reporter.rb'
59
+
60
+ # Offense count: 8
61
+ # This cop supports safe auto-correction (--auto-correct).
62
+ Layout/EmptyLineAfterGuardClause:
63
+ Exclude:
64
+ - 'lib/minitest/extensible_backtrace_filter.rb'
65
+ - 'lib/minitest/minitest_reporter_plugin.rb'
66
+ - 'lib/minitest/reporters/ansi.rb'
67
+ - 'lib/minitest/reporters/default_reporter.rb'
68
+ - 'lib/minitest/reporters/html_reporter.rb'
69
+ - 'lib/minitest/reporters/progress_reporter.rb'
70
+
71
+ # Offense count: 1
72
+ # This cop supports safe auto-correction (--auto-correct).
73
+ Layout/EmptyLineAfterMagicComment:
74
+ Exclude:
75
+ - 'minitest-reporters.gemspec'
76
+
77
+ # Offense count: 7
78
+ # This cop supports safe auto-correction (--auto-correct).
79
+ # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
80
+ Layout/EmptyLineBetweenDefs:
81
+ Exclude:
82
+ - 'lib/minitest/reporters/base_reporter.rb'
83
+ - 'test/fixtures/sample_test.rb'
84
+ - 'test/integration/reporters/progress_reporter_test.rb'
85
+
86
+ # Offense count: 1
87
+ # This cop supports safe auto-correction (--auto-correct).
88
+ # Configuration parameters: AllowAliasSyntax, AllowedMethods.
89
+ # AllowedMethods: alias_method, public, protected, private
90
+ Layout/EmptyLinesAroundAttributeAccessor:
91
+ Exclude:
92
+ - 'lib/minitest/reporters/base_reporter.rb'
93
+
94
+ # Offense count: 1
95
+ # This cop supports safe auto-correction (--auto-correct).
96
+ # Configuration parameters: EnforcedStyle.
97
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
98
+ Layout/EmptyLinesAroundClassBody:
99
+ Exclude:
100
+ - 'test/integration/reporters/mean_time_reporter_test.rb'
101
+
102
+ # Offense count: 1
103
+ # This cop supports safe auto-correction (--auto-correct).
104
+ # Configuration parameters: EnforcedStyleAlignWith, Severity.
105
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
106
+ Layout/EndAlignment:
107
+ Exclude:
108
+ - 'lib/minitest/reporters/default_reporter.rb'
109
+
110
+ # Offense count: 4
111
+ # This cop supports safe auto-correction (--auto-correct).
112
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
113
+ Layout/ExtraSpacing:
114
+ Exclude:
115
+ - 'test/unit/minitest/mean_time_reporter_unit_test.rb'
116
+
117
+ # Offense count: 1
118
+ # This cop supports safe auto-correction (--auto-correct).
119
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
120
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
121
+ Layout/FirstArgumentIndentation:
122
+ Exclude:
123
+ - 'test/unit/minitest/junit_reporter_test.rb'
124
+
125
+ # Offense count: 1
126
+ # This cop supports safe auto-correction (--auto-correct).
127
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
128
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
129
+ Layout/FirstArrayElementIndentation:
130
+ Exclude:
131
+ - 'test/fixtures/junit_filename_bug_example_test.rb'
132
+
133
+ # Offense count: 25
134
+ # This cop supports safe auto-correction (--auto-correct).
135
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
136
+ # SupportedHashRocketStyles: key, separator, table
137
+ # SupportedColonStyles: key, separator, table
138
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
139
+ Layout/HashAlignment:
140
+ Exclude:
141
+ - 'lib/minitest/reporters/html_reporter.rb'
142
+ - 'lib/minitest/reporters/junit_reporter.rb'
143
+ - 'lib/minitest/reporters/mean_time_reporter.rb'
144
+ - 'lib/minitest/reporters/progress_reporter.rb'
145
+
146
+ # Offense count: 1
147
+ # This cop supports safe auto-correction (--auto-correct).
148
+ # Configuration parameters: IndentationWidth, EnforcedStyle.
149
+ # SupportedStyles: spaces, tabs
150
+ Layout/IndentationStyle:
151
+ Exclude:
152
+ - 'lib/minitest/reporters/version.rb'
153
+
154
+ # Offense count: 3
155
+ # This cop supports safe auto-correction (--auto-correct).
156
+ # Configuration parameters: Width, IgnoredPatterns.
157
+ Layout/IndentationWidth:
158
+ Exclude:
159
+ - 'lib/minitest/reporters/default_reporter.rb'
160
+ - 'lib/minitest/reporters/junit_reporter.rb'
161
+ - 'lib/minitest/reporters/version.rb'
162
+
163
+ # Offense count: 1
164
+ # This cop supports safe auto-correction (--auto-correct).
165
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
166
+ # SupportedStyles: aligned, indented
167
+ Layout/LineEndStringConcatenationIndentation:
168
+ Exclude:
169
+ - 'lib/minitest/reporters/mean_time_reporter.rb'
170
+
171
+ # Offense count: 1
172
+ # This cop supports safe auto-correction (--auto-correct).
173
+ # Configuration parameters: EnforcedStyle.
174
+ # SupportedStyles: symmetrical, new_line, same_line
175
+ Layout/MultilineHashBraceLayout:
176
+ Exclude:
177
+ - 'test/unit/minitest/reporters_test.rb'
178
+
179
+ # Offense count: 1
180
+ # This cop supports safe auto-correction (--auto-correct).
181
+ # Configuration parameters: EnforcedStyle.
182
+ # SupportedStyles: symmetrical, new_line, same_line
183
+ Layout/MultilineMethodCallBraceLayout:
184
+ Exclude:
185
+ - 'test/unit/minitest/reporters_test.rb'
186
+
187
+ # Offense count: 1
188
+ # This cop supports safe auto-correction (--auto-correct).
189
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
190
+ # SupportedStyles: space, no_space
191
+ # SupportedStylesForEmptyBraces: space, no_space
192
+ Layout/SpaceBeforeBlockBraces:
193
+ Exclude:
194
+ - 'minitest-reporters.gemspec'
195
+
196
+ # Offense count: 2
197
+ # This cop supports safe auto-correction (--auto-correct).
198
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
199
+ # SupportedStyles: space, no_space, compact
200
+ # SupportedStylesForEmptyBrackets: space, no_space
201
+ Layout/SpaceInsideArrayLiteralBrackets:
202
+ Exclude:
203
+ - 'test/unit/minitest/minitest_reporter_plugin_test.rb'
204
+
205
+ # Offense count: 5
206
+ # This cop supports safe auto-correction (--auto-correct).
207
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
208
+ # SupportedStyles: space, no_space
209
+ # SupportedStylesForEmptyBraces: space, no_space
210
+ Layout/SpaceInsideBlockBraces:
211
+ Exclude:
212
+ - 'test/unit/minitest/mean_time_reporter_unit_test.rb'
213
+
214
+ # Offense count: 2
215
+ # This cop supports safe auto-correction (--auto-correct).
216
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
217
+ # SupportedStyles: space, no_space, compact
218
+ # SupportedStylesForEmptyBraces: space, no_space
219
+ Layout/SpaceInsideHashLiteralBraces:
220
+ Exclude:
221
+ - 'test/unit/minitest/reporters_test.rb'
222
+
223
+ # Offense count: 4
224
+ # This cop supports safe auto-correction (--auto-correct).
225
+ # Configuration parameters: EnforcedStyle.
226
+ # SupportedStyles: final_newline, final_blank_line
227
+ Layout/TrailingEmptyLines:
228
+ Exclude:
229
+ - 'test/fixtures/progress_detailed_skip_test.rb'
230
+ - 'test/fixtures/progress_test.rb'
231
+ - 'test/fixtures/sample_test.rb'
232
+ - 'test/unit/minitest/spec_reporter_test.rb'
233
+
234
+ # Offense count: 4
235
+ # This cop supports safe auto-correction (--auto-correct).
236
+ # Configuration parameters: AllowInHeredoc.
237
+ Layout/TrailingWhitespace:
238
+ Exclude:
239
+ - 'lib/minitest/reporters/default_reporter.rb'
240
+ - 'test/unit/minitest/reporters_test.rb'
241
+
242
+ # Offense count: 2
243
+ # This cop supports safe auto-correction (--auto-correct).
244
+ Lint/AmbiguousOperatorPrecedence:
245
+ Exclude:
246
+ - 'lib/minitest/relative_position.rb'
247
+ - 'lib/minitest/reporters/base_reporter.rb'
248
+
249
+ # Offense count: 1
250
+ # Configuration parameters: AllowSafeAssignment.
251
+ Lint/AssignmentInCondition:
252
+ Exclude:
253
+ - 'lib/minitest/reporters/base_reporter.rb'
254
+
255
+ # Offense count: 1
256
+ Lint/DuplicateMethods:
257
+ Exclude:
258
+ - 'test/gallery/bad_test.rb'
259
+
260
+ # Offense count: 1
261
+ Lint/MissingSuper:
262
+ Exclude:
263
+ - 'lib/minitest/minitest_reporter_plugin.rb'
264
+
265
+ # Offense count: 1
266
+ # Configuration parameters: IgnoredPatterns.
267
+ # SupportedStyles: snake_case, camelCase
268
+ Naming/MethodName:
269
+ EnforcedStyle: snake_case
270
+ Exclude:
271
+ - 'test/unit/minitest/reporters_test.rb'
272
+
273
+ # Offense count: 2
274
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
275
+ # SupportedStyles: snake_case, normalcase, non_integer
276
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
277
+ Naming/VariableNumber:
278
+ Exclude:
279
+ - 'test/unit/minitest/reporters_test.rb'
280
+
281
+ # Offense count: 1
282
+ Security/Eval:
283
+ Exclude:
284
+ - 'test/fixtures/junit_filename_bug_example_test.rb'
285
+
286
+ # Offense count: 2
287
+ # This cop supports safe auto-correction (--auto-correct).
288
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
289
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
290
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
291
+ # FunctionalMethods: let, let!, subject, watch
292
+ # IgnoredMethods: lambda, proc, it
293
+ Style/BlockDelimiters:
294
+ Exclude:
295
+ - 'lib/minitest/minitest_reporter_plugin.rb'
296
+
297
+ # Offense count: 2
298
+ # This cop supports safe auto-correction (--auto-correct).
299
+ # Configuration parameters: AllowOnConstant.
300
+ Style/CaseEquality:
301
+ Exclude:
302
+ - 'lib/minitest/minitest_reporter_plugin.rb'
303
+
304
+ # Offense count: 1
305
+ # This cop supports safe auto-correction (--auto-correct).
306
+ # Configuration parameters: IgnoredMethods.
307
+ # IgnoredMethods: ==, equal?, eql?
308
+ Style/ClassEqualityComparison:
309
+ Exclude:
310
+ - 'lib/minitest/minitest_reporter_plugin.rb'
311
+
312
+ # Offense count: 1
313
+ Style/DocumentDynamicEvalDefinition:
314
+ Exclude:
315
+ - 'test/fixtures/junit_filename_bug_example_test.rb'
316
+
317
+ # Offense count: 1
318
+ # This cop supports safe auto-correction (--auto-correct).
319
+ Style/EmptyCaseCondition:
320
+ Exclude:
321
+ - 'lib/minitest/reporters/default_reporter.rb'
322
+
323
+ # Offense count: 1
324
+ # This cop supports safe auto-correction (--auto-correct).
325
+ Style/Encoding:
326
+ Exclude:
327
+ - 'minitest-reporters.gemspec'
328
+
329
+ # Offense count: 1
330
+ # This cop supports safe auto-correction (--auto-correct).
331
+ Style/EvalWithLocation:
332
+ Exclude:
333
+ - 'test/fixtures/junit_filename_bug_example_test.rb'
334
+
335
+ # Offense count: 6
336
+ # This cop supports safe auto-correction (--auto-correct).
337
+ Style/ExpandPathArguments:
338
+ Exclude:
339
+ - 'minitest-reporters.gemspec'
340
+ - 'test/integration/reporters/junit_reporter_test.rb'
341
+ - 'test/integration/reporters/progress_reporter_test.rb'
342
+
343
+ # Offense count: 1
344
+ # This cop supports safe auto-correction (--auto-correct).
345
+ Style/FileWrite:
346
+ Exclude:
347
+ - 'lib/minitest/reporters/html_reporter.rb'
348
+
349
+ # Offense count: 36
350
+ # This cop supports safe auto-correction (--auto-correct).
351
+ # Configuration parameters: EnforcedStyle.
352
+ # SupportedStyles: always, always_true, never
353
+ Style/FrozenStringLiteralComment:
354
+ Enabled: false
355
+
356
+ # Offense count: 1
357
+ # This cop supports safe auto-correction (--auto-correct).
358
+ Style/GlobalStdStream:
359
+ Exclude:
360
+ - 'test/unit/minitest/minitest_reporter_plugin_test.rb'
361
+
362
+ # Offense count: 7
363
+ # Configuration parameters: MinBodyLength.
364
+ Style/GuardClause:
365
+ Exclude:
366
+ - 'lib/minitest/reporters.rb'
367
+ - 'lib/minitest/reporters/base_reporter.rb'
368
+ - 'lib/minitest/reporters/default_reporter.rb'
369
+ - 'lib/minitest/reporters/progress_reporter.rb'
370
+ - 'lib/minitest/reporters/spec_reporter.rb'
371
+
372
+ # Offense count: 1
373
+ # This cop supports safe auto-correction (--auto-correct).
374
+ # Configuration parameters: AllowSplatArgument.
375
+ Style/HashConversion:
376
+ Exclude:
377
+ - 'lib/minitest/reporters/mean_time_reporter.rb'
378
+
379
+ # Offense count: 1
380
+ Style/MultilineBlockChain:
381
+ Exclude:
382
+ - 'lib/minitest/reporters/mean_time_reporter.rb'
383
+
384
+ # Offense count: 2
385
+ # This cop supports safe auto-correction (--auto-correct).
386
+ # Configuration parameters: AllowedMethods.
387
+ # AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
388
+ Style/NestedParenthesizedCalls:
389
+ Exclude:
390
+ - 'lib/minitest/reporters/rubymine_reporter.rb'
391
+
392
+ # Offense count: 8
393
+ # This cop supports unsafe auto-correction (--auto-correct-all).
394
+ # Configuration parameters: EnforcedStyle, IgnoredMethods.
395
+ # SupportedStyles: predicate, comparison
396
+ Style/NumericPredicate:
397
+ Exclude:
398
+ - 'spec/**/*'
399
+ - 'lib/minitest/reporters/default_reporter.rb'
400
+ - 'lib/minitest/reporters/html_reporter.rb'
401
+ - 'lib/minitest/reporters/progress_reporter.rb'
402
+
403
+ # Offense count: 2
404
+ # Configuration parameters: AllowedMethods.
405
+ # AllowedMethods: respond_to_missing?
406
+ Style/OptionalBooleanParameter:
407
+ Exclude:
408
+ - 'lib/minitest/reporters/base_reporter.rb'
409
+ - 'lib/minitest/reporters/junit_reporter.rb'
410
+
411
+ # Offense count: 2
412
+ # This cop supports safe auto-correction (--auto-correct).
413
+ # Configuration parameters: PreferredDelimiters.
414
+ Style/PercentLiteralDelimiters:
415
+ Exclude:
416
+ - 'minitest-reporters.gemspec'
417
+
418
+ # Offense count: 1
419
+ # This cop supports safe auto-correction (--auto-correct).
420
+ Style/PerlBackrefs:
421
+ Exclude:
422
+ - 'lib/minitest/minitest_reporter_plugin.rb'
423
+
424
+ # Offense count: 2
425
+ # This cop supports safe auto-correction (--auto-correct).
426
+ Style/RedundantPercentQ:
427
+ Exclude:
428
+ - 'minitest-reporters.gemspec'
429
+
430
+ # Offense count: 1
431
+ # This cop supports safe auto-correction (--auto-correct).
432
+ Style/RedundantSelf:
433
+ Exclude:
434
+ - 'lib/minitest/extensible_backtrace_filter.rb'
435
+
436
+ # Offense count: 2
437
+ # This cop supports safe auto-correction (--auto-correct).
438
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
439
+ # SupportedStyles: slashes, percent_r, mixed
440
+ Style/RegexpLiteral:
441
+ Exclude:
442
+ - 'lib/minitest/extensible_backtrace_filter.rb'
443
+ - 'lib/minitest/minitest_reporter_plugin.rb'
444
+
445
+ # Offense count: 1
446
+ # This cop supports safe auto-correction (--auto-correct).
447
+ # Configuration parameters: EnforcedStyle.
448
+ # SupportedStyles: implicit, explicit
449
+ Style/RescueStandardError:
450
+ Exclude:
451
+ - 'test/unit/minitest/spec_reporter_test.rb'
452
+
453
+ # Offense count: 5
454
+ # This cop supports safe auto-correction (--auto-correct).
455
+ # Configuration parameters: EnforcedStyle.
456
+ # SupportedStyles: only_raise, only_fail, semantic
457
+ Style/SignalException:
458
+ Exclude:
459
+ - 'lib/minitest/reporters/mean_time_reporter.rb'
460
+ - 'test/fixtures/mean_time_test.rb'
461
+
462
+ # Offense count: 1
463
+ # This cop supports safe auto-correction (--auto-correct).
464
+ # Configuration parameters: RequireEnglish.
465
+ # SupportedStyles: use_perl_names, use_english_names
466
+ Style/SpecialGlobalVars:
467
+ EnforcedStyle: use_perl_names
468
+
469
+ # Offense count: 1
470
+ # This cop supports safe auto-correction (--auto-correct).
471
+ # Configuration parameters: EnforcedStyle.
472
+ # SupportedStyles: single_quotes, double_quotes
473
+ Style/StringLiteralsInInterpolation:
474
+ Exclude:
475
+ - 'lib/minitest/reporters/default_reporter.rb'
476
+
477
+ # Offense count: 2
478
+ # This cop supports safe auto-correction (--auto-correct).
479
+ # Configuration parameters: MinSize.
480
+ # SupportedStyles: percent, brackets
481
+ Style/SymbolArray:
482
+ EnforcedStyle: brackets
483
+
484
+ # Offense count: 2
485
+ # This cop supports safe auto-correction (--auto-correct).
486
+ # Configuration parameters: EnforcedStyleForMultiline.
487
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
488
+ Style/TrailingCommaInArrayLiteral:
489
+ Exclude:
490
+ - 'Rakefile'
491
+
492
+ # Offense count: 5
493
+ # This cop supports safe auto-correction (--auto-correct).
494
+ Style/WhenThen:
495
+ Exclude:
496
+ - 'lib/minitest/reporters/default_reporter.rb'
497
+
498
+ # Offense count: 10
499
+ # This cop supports safe auto-correction (--auto-correct).
500
+ # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
501
+ # SupportedStyles: percent, brackets
502
+ Style/WordArray:
503
+ Exclude:
504
+ - 'Rakefile'
505
+ - 'test/fixtures/junit_filename_bug_example_test.rb'
506
+ - 'test/unit/minitest/extensible_backtrace_filter_test.rb'
507
+ - 'test/unit/minitest/mean_time_reporter_unit_test.rb'
508
+
509
+ # Offense count: 3
510
+ # This cop supports safe auto-correction (--auto-correct).
511
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
512
+ # URISchemes: http, https
513
+ Layout/LineLength:
514
+ Max: 141
data/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
- ### [dev](https://github.com/kern/minitest-reporters/compare/v1.5.0...master)
1
+ ### [dev](https://github.com/kern/minitest-reporters/compare/v1.6.0...master)
2
+
3
+ ### [1.6.0](https://github.com/kern/minitest-reporters/compare/v1.5.0...v1.6.0)
4
+
5
+ * Switched to Github actions [#324](https://github.com/minitest-reporters/minitest-reporters/pull/324) [petergoldstein](https://github.com/petergoldstein)
6
+ * Fixed misspelled method name in HTML reporter (`percent_skipps` -> `percent_skips`) [#326](https://github.com/minitest-reporters/minitest-reporters/pull/326) contributed by [andyw8](https://github.com/andyw8)
7
+ * Removed deprecated call to `Object#=~` [#318](https://github.com/minitest-reporters/minitest-reporters/pull/318) contributed by [etiennebarrie](https://github.com/etiennebarrie)
8
+ * Added option `print_failure_summary` to `SpecReporter` which causes failures and errors to print at the end of the test suite instead of inline
9
+ as they happen [#306](https://github.com/minitest-reporters/minitest-reporters/pull/306) contributed by [picandocodigo](https://github.com/picandocodigo)
2
10
 
3
11
  ### [1.5.0](https://github.com/kern/minitest-reporters/compare/v1.4.3...v1.5.0)
4
12
 
data/README.md CHANGED
@@ -1,11 +1,9 @@
1
1
  [gem]: https://rubygems.org/gems/minitest-reporters
2
- [travis]: https://travis-ci.org/kern/minitest-reporters
3
2
 
4
3
  # minitest-reporters - create customizable Minitest output formats
5
4
 
6
5
  [![Gem Version](https://badge.fury.io/rb/minitest-reporters.svg)][gem]
7
- [![Build Status](https://secure.travis-ci.org/kern/minitest-reporters.png)][travis]
8
- [![Windows build status](https://ci.appveyor.com/api/projects/status/3pugsxatwcldgyjd/branch/master?svg=true)](https://ci.appveyor.com/project/os97673/minitest-reporters/branch/master)
6
+ [![Build Status](https://github.com/minitest-reporters/minitest-reporters/actions/workflows/ci.yml/badge.svg?event=push&branch=master)](https://github.com/minitest-reporters/minitest-reporters/actions?query=event%3Apush+branch%3Amaster)
9
7
 
10
8
  Death to haphazard monkey-patching! Extend Minitest through simple hooks.
11
9
 
@@ -130,8 +128,8 @@ The [Test Anything Protocol](https://testanything.org) is a specification for ou
130
128
 
131
129
  ## Resources ##
132
130
 
133
- * [GitHub Repository](https://github.com/CapnKernul/minitest-reporters)
134
- * [Documentation](http://www.rubydoc.info/github/kern/minitest-reporters/master)
131
+ * [GitHub Repository](https://github.com/minitest-reporters/minitest-reporters/)
132
+ * [Documentation](https://www.rubydoc.info/github/minitest-reporters/minitest-reporters)
135
133
 
136
134
  ## License ##
137
135
 
@@ -41,7 +41,7 @@ module Minitest
41
41
  # stolen from minitest self.run
42
42
  def total_count(options)
43
43
  filter = options[:filter] || '/./'
44
- filter = Regexp.new $1 if filter =~ /\/(.*)\//
44
+ filter = Regexp.new $1 if filter.is_a?(String) && filter =~ %r%/(.*)/%
45
45
 
46
46
  Minitest::Runnable.runnables.map { |runnable|
47
47
  runnable.runnable_methods.find_all { |m|
@@ -28,14 +28,17 @@ module Minitest
28
28
 
29
29
  # The percentage of tests that passed, calculated in a way that avoids rounding errors
30
30
  def percent_passes
31
- 100 - percent_skipps - percent_errors_failures
31
+ 100 - percent_skips - percent_errors_failures
32
32
  end
33
33
 
34
34
  # The percentage of tests that were skipped
35
- def percent_skipps
35
+ def percent_skips
36
36
  (skips / count.to_f * 100).to_i
37
37
  end
38
38
 
39
+ # Keeping old method name with typo for backwards compatibility in custom templates (for now)
40
+ alias_method :percent_skipps, :percent_skips
41
+
39
42
  # The percentage of tests that failed
40
43
  def percent_errors_failures
41
44
  ((errors + failures) / count.to_f * 100).to_i
@@ -10,6 +10,16 @@ module Minitest
10
10
  include ANSI::Code
11
11
  include RelativePosition
12
12
 
13
+ # The constructor takes an `options` hash
14
+ # @param options [Hash]
15
+ # @option options print_failure_summary [Boolean] wether to print the errors at the bottom of the
16
+ # report or inline as they happen.
17
+ #
18
+ def initialize(options = {})
19
+ super
20
+ @print_failure_summary = options[:print_failure_summary]
21
+ end
22
+
13
23
  def start
14
24
  super
15
25
  puts('Started with run options %s' % options[:args])
@@ -18,6 +28,17 @@ module Minitest
18
28
 
19
29
  def report
20
30
  super
31
+ if @print_failure_summary
32
+ failed_test_groups = tests.reject { |test| test.failures.empty? }
33
+ .sort_by { |test| [test_class(test).to_s, test.name] }
34
+ .group_by { |test| test_class(test).to_s }
35
+ unless failed_test_groups.empty?
36
+ print(red('Failures and errors:'))
37
+
38
+ failed_test_groups.each { |name, tests| print_failure(name, tests) }
39
+ end
40
+ end
41
+
21
42
  puts('Finished in %.5fs' % total_time)
22
43
  print('%d tests, %d assertions, ' % [count, assertions])
23
44
  color = failures.zero? && errors.zero? ? :green : :red
@@ -29,7 +50,7 @@ module Minitest
29
50
  def record(test)
30
51
  super
31
52
  record_print_status(test)
32
- record_print_failures_if_any(test)
53
+ record_print_failures_if_any(test) unless @print_failure_summary
33
54
  end
34
55
 
35
56
  protected
@@ -42,12 +63,14 @@ module Minitest
42
63
  puts
43
64
  end
44
65
 
45
- def record_print_status(test)
46
- test_name = test.name.gsub(/^test_: /, 'test:')
47
- print pad_test(test_name)
48
- print_colored_status(test)
49
- print(" (%.2fs)" % test.time) unless test.time.nil?
66
+ def print_failure(name, tests)
50
67
  puts
68
+ puts name
69
+ tests.each do |test|
70
+ record_print_status(test)
71
+ print_info(test.failure, test.error?)
72
+ puts
73
+ end
51
74
  end
52
75
 
53
76
  def record_print_failures_if_any(test)
@@ -56,6 +79,14 @@ module Minitest
56
79
  puts
57
80
  end
58
81
  end
82
+
83
+ def record_print_status(test)
84
+ test_name = test.name.gsub(/^test_: /, 'test:')
85
+ print pad_test(test_name)
86
+ print_colored_status(test)
87
+ print(" (%.2fs)" % test.time) unless test.time.nil?
88
+ puts
89
+ end
59
90
  end
60
91
  end
61
92
  end
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Reporters
3
- VERSION = '1.5.0'.freeze
3
+ VERSION = '1.6.0'.freeze
4
4
  end
5
5
  end
@@ -34,8 +34,8 @@
34
34
  <div class="progress-bar progress-bar-danger" style="width: <%= percent_errors_failures %>%">
35
35
  <%= '%d' % percent_errors_failures %>% failed
36
36
  </div>
37
- <div class="progress-bar progress-bar-warning" style="width: <%= percent_skipps %>%">
38
- <%= '%d' % percent_skipps %>% skipped
37
+ <div class="progress-bar progress-bar-warning" style="width: <%= percent_skips %>%">
38
+ <%= '%d' % percent_skips %>% skipped
39
39
  </div>
40
40
  </div>
41
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-reporters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-15 00:00:00.000000000 Z
11
+ date: 2023-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -115,10 +115,11 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".github/workflows/ci.yml"
118
119
  - ".gitignore"
119
120
  - ".rubocop.yml"
121
+ - ".rubocop_todo.yml"
120
122
  - ".ruby-gemset"
121
- - ".travis.yml"
122
123
  - ".yardopts"
123
124
  - CHANGELOG.md
124
125
  - Gemfile
@@ -185,8 +186,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
186
  - !ruby/object:Gem::Version
186
187
  version: '0'
187
188
  requirements: []
188
- rubygems_version: 3.3.3
189
+ rubygems_version: 3.3.7
189
190
  signing_key:
190
191
  specification_version: 4
191
192
  summary: Create customizable Minitest output formats
192
- test_files: []
193
+ test_files:
194
+ - test/fixtures/junit_filename_bug_example_test.rb
195
+ - test/fixtures/mean_time_test.rb
196
+ - test/fixtures/progress_detailed_skip_test.rb
197
+ - test/fixtures/progress_test.rb
198
+ - test/fixtures/sample_test.rb
199
+ - test/fixtures/spec_test.rb
200
+ - test/gallery/bad_test.rb
201
+ - test/gallery/good_test.rb
202
+ - test/integration/reporters/junit_reporter_test.rb
203
+ - test/integration/reporters/mean_time_reporter_test.rb
204
+ - test/integration/reporters/progress_reporter_test.rb
205
+ - test/test_helper.rb
206
+ - test/unit/minitest/extensible_backtrace_filter_test.rb
207
+ - test/unit/minitest/junit_reporter_test.rb
208
+ - test/unit/minitest/mean_time_reporter_unit_test.rb
209
+ - test/unit/minitest/minitest_reporter_plugin_test.rb
210
+ - test/unit/minitest/reporters_test.rb
211
+ - test/unit/minitest/spec_reporter_test.rb
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- script: 'rake test'
2
- before_install:
3
- - gem install bundler gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
4
- - gem install bundler -v '< 2'
5
- rvm:
6
- - 2
7
- - 2.6
8
- - 2.5
9
- - 2.4
10
- - 2.3
11
- - 2.2
12
- - 2.1
13
- - 2.0
14
- - 1.9.3
15
- - jruby