New Upstream Release - ruby-minitest-reporters

Ready changes

Summary

Merged new upstream version: 1.6.0 (was: 1.5.0).

Resulting package

Built on 2023-03-15T02:55 (took 2m0s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases ruby-minitest-reporters

Lintian Result

Diff

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..2d86f36
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,35 @@
+name: Tests
+
+on: [push, pull_request]
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        ruby-version:
+          - head
+          - '3.1'
+          - '3.0'
+          - '2.7'
+          - '2.6'
+          - '2.5'
+          - '2.4'
+          - '2.3'
+          - '2.2'
+          - '2.1'
+          - '2.0'
+          - jruby-head
+          - jruby-9.3
+          - jruby-9.2
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Ruby ${{ matrix.ruby-version }}
+      uses: ruby/setup-ruby@v1
+      with:
+        ruby-version: ${{ matrix.ruby-version }}
+        bundler-cache: true # 'bundle install' and cache
+    - name: Run tests
+      run: bundle exec rake
diff --git a/.gitignore b/.gitignore
index 6137695..e29547a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@ pkg
 test/tmp
 test/version_tmp
 test/reports
+test/html_reports
 tmp
 pkg
 *.gem
@@ -23,4 +24,5 @@ doc/
 Gemfile.lock
 .idea/
 .ruby-version
+vendor
 
diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644
index 0000000..a12ab7e
--- /dev/null
+++ b/.rubocop.yml
@@ -0,0 +1,72 @@
+---
+AllCops:
+  NewCops: enable
+
+inherit_from: .rubocop_todo.yml
+
+Layout:
+  Enabled: true
+
+Layout/MultilineOperationIndentation:
+  EnforcedStyle: indented
+
+Lint:
+  Enabled: true
+
+Metrics:
+  Severity: refactor
+  Enabled: false
+
+Layout/LineLength:
+  Severity: convention
+
+Naming:
+  Enabled: true
+
+Naming/MethodParameterName:
+  MinNameLength: 1
+
+Security:
+  Enabled: true
+
+#todo: enable
+Style:
+  Enabled: true
+
+Style/FormatStringToken:
+  Enabled: false
+
+Style/IfUnlessModifier:
+  Enabled: false
+
+#todo: enable
+Style/StringLiterals:
+  Enabled: false
+
+Style/TrailingCommaInHashLiteral:
+  EnforcedStyleForMultiline: comma
+
+#todo: enable
+Style/HashSyntax:
+  Enabled: false
+
+#todo: enable
+Style/FormatString:
+  Enabled: false
+
+#todo: enable
+Style/ClassVars:
+  Enabled: false
+
+#todo: enable
+Style/Alias:
+  Enabled: false
+
+Style/Documentation:
+  Enabled: false
+
+Bundler:
+  Enabled: true
+
+Gemspec:
+  Enabled: true
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
new file mode 100644
index 0000000..a9ff167
--- /dev/null
+++ b/.rubocop_todo.yml
@@ -0,0 +1,514 @@
+# This configuration was generated by
+# `rubocop --auto-gen-config`
+# on 2022-03-28 02:29:37 UTC using RuboCop version 1.26.1.
+# The point is for the user to remove these configuration records
+# one by one as the offenses are removed from the code base.
+# Note that changes in the inspected code, or installation of new
+# versions of RuboCop, may require this file to be generated again.
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
+# Include: **/*.gemspec
+Gemspec/OrderedDependencies:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: Include.
+# Include: **/*.gemspec
+Gemspec/RequireMFA:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 1
+# Configuration parameters: Include.
+# Include: **/*.gemspec
+Gemspec/RequiredRubyVersion:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 7
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: with_first_argument, with_fixed_indentation
+Layout/ArgumentAlignment:
+  Exclude:
+    - 'lib/minitest/reporters/junit_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyleAlignWith.
+# SupportedStylesAlignWith: either, start_of_block, start_of_line
+Layout/BlockAlignment:
+  Exclude:
+    - 'lib/minitest/reporters/junit_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Layout/ClosingParenthesisIndentation:
+  Exclude:
+    - 'test/unit/minitest/junit_reporter_test.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+Layout/ElseAlignment:
+  Exclude:
+    - 'lib/minitest/reporters/default_reporter.rb'
+
+# Offense count: 8
+# This cop supports safe auto-correction (--auto-correct).
+Layout/EmptyLineAfterGuardClause:
+  Exclude:
+    - 'lib/minitest/extensible_backtrace_filter.rb'
+    - 'lib/minitest/minitest_reporter_plugin.rb'
+    - 'lib/minitest/reporters/ansi.rb'
+    - 'lib/minitest/reporters/default_reporter.rb'
+    - 'lib/minitest/reporters/html_reporter.rb'
+    - 'lib/minitest/reporters/progress_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Layout/EmptyLineAfterMagicComment:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 7
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
+Layout/EmptyLineBetweenDefs:
+  Exclude:
+    - 'lib/minitest/reporters/base_reporter.rb'
+    - 'test/fixtures/sample_test.rb'
+    - 'test/integration/reporters/progress_reporter_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowAliasSyntax, AllowedMethods.
+# AllowedMethods: alias_method, public, protected, private
+Layout/EmptyLinesAroundAttributeAccessor:
+  Exclude:
+    - 'lib/minitest/reporters/base_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
+Layout/EmptyLinesAroundClassBody:
+  Exclude:
+    - 'test/integration/reporters/mean_time_reporter_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyleAlignWith, Severity.
+# SupportedStylesAlignWith: keyword, variable, start_of_line
+Layout/EndAlignment:
+  Exclude:
+    - 'lib/minitest/reporters/default_reporter.rb'
+
+# Offense count: 4
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
+Layout/ExtraSpacing:
+  Exclude:
+    - 'test/unit/minitest/mean_time_reporter_unit_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
+Layout/FirstArgumentIndentation:
+  Exclude:
+    - 'test/unit/minitest/junit_reporter_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: special_inside_parentheses, consistent, align_brackets
+Layout/FirstArrayElementIndentation:
+  Exclude:
+    - 'test/fixtures/junit_filename_bug_example_test.rb'
+
+# Offense count: 25
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
+# SupportedHashRocketStyles: key, separator, table
+# SupportedColonStyles: key, separator, table
+# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
+Layout/HashAlignment:
+  Exclude:
+    - 'lib/minitest/reporters/html_reporter.rb'
+    - 'lib/minitest/reporters/junit_reporter.rb'
+    - 'lib/minitest/reporters/mean_time_reporter.rb'
+    - 'lib/minitest/reporters/progress_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: IndentationWidth, EnforcedStyle.
+# SupportedStyles: spaces, tabs
+Layout/IndentationStyle:
+  Exclude:
+    - 'lib/minitest/reporters/version.rb'
+
+# Offense count: 3
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: Width, IgnoredPatterns.
+Layout/IndentationWidth:
+  Exclude:
+    - 'lib/minitest/reporters/default_reporter.rb'
+    - 'lib/minitest/reporters/junit_reporter.rb'
+    - 'lib/minitest/reporters/version.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: aligned, indented
+Layout/LineEndStringConcatenationIndentation:
+  Exclude:
+    - 'lib/minitest/reporters/mean_time_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: symmetrical, new_line, same_line
+Layout/MultilineHashBraceLayout:
+  Exclude:
+    - 'test/unit/minitest/reporters_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: symmetrical, new_line, same_line
+Layout/MultilineMethodCallBraceLayout:
+  Exclude:
+    - 'test/unit/minitest/reporters_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
+# SupportedStyles: space, no_space
+# SupportedStylesForEmptyBraces: space, no_space
+Layout/SpaceBeforeBlockBraces:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
+# SupportedStyles: space, no_space, compact
+# SupportedStylesForEmptyBrackets: space, no_space
+Layout/SpaceInsideArrayLiteralBrackets:
+  Exclude:
+    - 'test/unit/minitest/minitest_reporter_plugin_test.rb'
+
+# Offense count: 5
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
+# SupportedStyles: space, no_space
+# SupportedStylesForEmptyBraces: space, no_space
+Layout/SpaceInsideBlockBraces:
+  Exclude:
+    - 'test/unit/minitest/mean_time_reporter_unit_test.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
+# SupportedStyles: space, no_space, compact
+# SupportedStylesForEmptyBraces: space, no_space
+Layout/SpaceInsideHashLiteralBraces:
+  Exclude:
+    - 'test/unit/minitest/reporters_test.rb'
+
+# Offense count: 4
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: final_newline, final_blank_line
+Layout/TrailingEmptyLines:
+  Exclude:
+    - 'test/fixtures/progress_detailed_skip_test.rb'
+    - 'test/fixtures/progress_test.rb'
+    - 'test/fixtures/sample_test.rb'
+    - 'test/unit/minitest/spec_reporter_test.rb'
+
+# Offense count: 4
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowInHeredoc.
+Layout/TrailingWhitespace:
+  Exclude:
+    - 'lib/minitest/reporters/default_reporter.rb'
+    - 'test/unit/minitest/reporters_test.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+Lint/AmbiguousOperatorPrecedence:
+  Exclude:
+    - 'lib/minitest/relative_position.rb'
+    - 'lib/minitest/reporters/base_reporter.rb'
+
+# Offense count: 1
+# Configuration parameters: AllowSafeAssignment.
+Lint/AssignmentInCondition:
+  Exclude:
+    - 'lib/minitest/reporters/base_reporter.rb'
+
+# Offense count: 1
+Lint/DuplicateMethods:
+  Exclude:
+    - 'test/gallery/bad_test.rb'
+
+# Offense count: 1
+Lint/MissingSuper:
+  Exclude:
+    - 'lib/minitest/minitest_reporter_plugin.rb'
+
+# Offense count: 1
+# Configuration parameters: IgnoredPatterns.
+# SupportedStyles: snake_case, camelCase
+Naming/MethodName:
+  EnforcedStyle: snake_case
+  Exclude:
+    - 'test/unit/minitest/reporters_test.rb'
+
+# Offense count: 2
+# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
+# SupportedStyles: snake_case, normalcase, non_integer
+# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
+Naming/VariableNumber:
+  Exclude:
+    - 'test/unit/minitest/reporters_test.rb'
+
+# Offense count: 1
+Security/Eval:
+  Exclude:
+    - 'test/fixtures/junit_filename_bug_example_test.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
+# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
+# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
+# FunctionalMethods: let, let!, subject, watch
+# IgnoredMethods: lambda, proc, it
+Style/BlockDelimiters:
+  Exclude:
+    - 'lib/minitest/minitest_reporter_plugin.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowOnConstant.
+Style/CaseEquality:
+  Exclude:
+    - 'lib/minitest/minitest_reporter_plugin.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: IgnoredMethods.
+# IgnoredMethods: ==, equal?, eql?
+Style/ClassEqualityComparison:
+  Exclude:
+    - 'lib/minitest/minitest_reporter_plugin.rb'
+
+# Offense count: 1
+Style/DocumentDynamicEvalDefinition:
+  Exclude:
+    - 'test/fixtures/junit_filename_bug_example_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Style/EmptyCaseCondition:
+  Exclude:
+    - 'lib/minitest/reporters/default_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Style/Encoding:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Style/EvalWithLocation:
+  Exclude:
+    - 'test/fixtures/junit_filename_bug_example_test.rb'
+
+# Offense count: 6
+# This cop supports safe auto-correction (--auto-correct).
+Style/ExpandPathArguments:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+    - 'test/integration/reporters/junit_reporter_test.rb'
+    - 'test/integration/reporters/progress_reporter_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Style/FileWrite:
+  Exclude:
+    - 'lib/minitest/reporters/html_reporter.rb'
+
+# Offense count: 36
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: always, always_true, never
+Style/FrozenStringLiteralComment:
+  Enabled: false
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Style/GlobalStdStream:
+  Exclude:
+    - 'test/unit/minitest/minitest_reporter_plugin_test.rb'
+
+# Offense count: 7
+# Configuration parameters: MinBodyLength.
+Style/GuardClause:
+  Exclude:
+    - 'lib/minitest/reporters.rb'
+    - 'lib/minitest/reporters/base_reporter.rb'
+    - 'lib/minitest/reporters/default_reporter.rb'
+    - 'lib/minitest/reporters/progress_reporter.rb'
+    - 'lib/minitest/reporters/spec_reporter.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowSplatArgument.
+Style/HashConversion:
+  Exclude:
+    - 'lib/minitest/reporters/mean_time_reporter.rb'
+
+# Offense count: 1
+Style/MultilineBlockChain:
+  Exclude:
+    - 'lib/minitest/reporters/mean_time_reporter.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowedMethods.
+# 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
+Style/NestedParenthesizedCalls:
+  Exclude:
+    - 'lib/minitest/reporters/rubymine_reporter.rb'
+
+# Offense count: 8
+# This cop supports unsafe auto-correction (--auto-correct-all).
+# Configuration parameters: EnforcedStyle, IgnoredMethods.
+# SupportedStyles: predicate, comparison
+Style/NumericPredicate:
+  Exclude:
+    - 'spec/**/*'
+    - 'lib/minitest/reporters/default_reporter.rb'
+    - 'lib/minitest/reporters/html_reporter.rb'
+    - 'lib/minitest/reporters/progress_reporter.rb'
+
+# Offense count: 2
+# Configuration parameters: AllowedMethods.
+# AllowedMethods: respond_to_missing?
+Style/OptionalBooleanParameter:
+  Exclude:
+    - 'lib/minitest/reporters/base_reporter.rb'
+    - 'lib/minitest/reporters/junit_reporter.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: PreferredDelimiters.
+Style/PercentLiteralDelimiters:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Style/PerlBackrefs:
+  Exclude:
+    - 'lib/minitest/minitest_reporter_plugin.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+Style/RedundantPercentQ:
+  Exclude:
+    - 'minitest-reporters.gemspec'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+Style/RedundantSelf:
+  Exclude:
+    - 'lib/minitest/extensible_backtrace_filter.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
+# SupportedStyles: slashes, percent_r, mixed
+Style/RegexpLiteral:
+  Exclude:
+    - 'lib/minitest/extensible_backtrace_filter.rb'
+    - 'lib/minitest/minitest_reporter_plugin.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: implicit, explicit
+Style/RescueStandardError:
+  Exclude:
+    - 'test/unit/minitest/spec_reporter_test.rb'
+
+# Offense count: 5
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: only_raise, only_fail, semantic
+Style/SignalException:
+  Exclude:
+    - 'lib/minitest/reporters/mean_time_reporter.rb'
+    - 'test/fixtures/mean_time_test.rb'
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: RequireEnglish.
+# SupportedStyles: use_perl_names, use_english_names
+Style/SpecialGlobalVars:
+  EnforcedStyle: use_perl_names
+
+# Offense count: 1
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: single_quotes, double_quotes
+Style/StringLiteralsInInterpolation:
+  Exclude:
+    - 'lib/minitest/reporters/default_reporter.rb'
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: MinSize.
+# SupportedStyles: percent, brackets
+Style/SymbolArray:
+  EnforcedStyle: brackets
+
+# Offense count: 2
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyleForMultiline.
+# SupportedStylesForMultiline: comma, consistent_comma, no_comma
+Style/TrailingCommaInArrayLiteral:
+  Exclude:
+    - 'Rakefile'
+
+# Offense count: 5
+# This cop supports safe auto-correction (--auto-correct).
+Style/WhenThen:
+  Exclude:
+    - 'lib/minitest/reporters/default_reporter.rb'
+
+# Offense count: 10
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
+# SupportedStyles: percent, brackets
+Style/WordArray:
+  Exclude:
+    - 'Rakefile'
+    - 'test/fixtures/junit_filename_bug_example_test.rb'
+    - 'test/unit/minitest/extensible_backtrace_filter_test.rb'
+    - 'test/unit/minitest/mean_time_reporter_unit_test.rb'
+
+# Offense count: 3
+# This cop supports safe auto-correction (--auto-correct).
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
+# URISchemes: http, https
+Layout/LineLength:
+  Max: 141
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 4141024..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-script: 'rake test'
-rvm:
-  - 2.2
-  - 2.1
-  - 2.0.0
-  - 1.9.3
-  - jruby-19mode
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..773505c
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,140 @@
+### [dev](https://github.com/kern/minitest-reporters/compare/v1.6.0...master)
+
+### [1.6.0](https://github.com/kern/minitest-reporters/compare/v1.5.0...v1.6.0)
+
+* Switched to Github actions [#324](https://github.com/minitest-reporters/minitest-reporters/pull/324) [petergoldstein](https://github.com/petergoldstein)
+* 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)
+* Removed deprecated call to `Object#=~` [#318](https://github.com/minitest-reporters/minitest-reporters/pull/318) contributed by [etiennebarrie](https://github.com/etiennebarrie)
+* Added option `print_failure_summary` to `SpecReporter` which causes failures and errors to print at the end of the test suite instead of inline
+  as they happen [#306](https://github.com/minitest-reporters/minitest-reporters/pull/306) contributed by [picandocodigo](https://github.com/picandocodigo)
+
+### [1.5.0](https://github.com/kern/minitest-reporters/compare/v1.4.3...v1.5.0)
+
+* Added support for environment variables to define the output location of HTML reports. [#311](https://github.com/minitest-reporters/minitest-reporters/pull/311) contributed by [estebanbouza](https://github.com/estebanbouza)
+* Fixed ProgressReporter accuracy on skipped tests while `detailed_skip` is disabled [#312](https://github.com/minitest-reporters/minitest-reporters/pull/312) contributed by [seven1m](https://github.com/seven1m)
+* Added `file` attribute to `<testcase>` tags in JUnitReporter for CircleCI compatibility [#313](https://github.com/minitest-reporters/minitest-reporters/pull/313) contributed by [nbudin](https://github.com/nbudin)
+* Added timestamp option to JUnitReporter [#316] (https://github.com/minitest-reporters/minitest-reporters/pull/316) contributed by [sipani909](https://github.com/sipani909)
+
+### [1.4.3](https://github.com/kern/minitest-reporters/compare/v1.4.2...v1.4.3)
+
+* fixed rare compatability issue between JUnitReporter and older versions of Minitest [#272](https://github.com/minitest-reporters/minitest-reporters/pull/272) contributed by [chakrit](https://github.com/chakrit)
+* fixed JUnitReporter to use a relative file path if a file path is absolute [#305](https://github.com/minitest-reporters/minitest-reporters/issues/305)
+* fixed MeanTimeReporter to reset by deleting previous run file [#296](https://github.com/kern/minitest-reporters/pull/296) contributed by [AnythonyClark](https://github.com/AnthonyClark)
+* removed debug output from ProgressReporter [#301](https://github.com/kern/minitest-reporters/pull/301) contributed by [wvanbergen](https://github.com/wvanbergen)
+
+### [1.4.2](https://github.com/kern/minitest-reporters/compare/v1.4.1...v1.4.2) (2019-10-26)
+
+* fixed DelegateReporter to delegate prerecord() [#294](https://github.com/kern/minitest-reporters/pull/294) contributed by [mame](https://github.com/mame)
+
+### [1.4.1](https://github.com/kern/minitest-reporters/compare/v1.4....v1.4.1) (2019-10-10)
+
+* fixed Time.current replaced with Time.now in HTML reporter's remplate [#293](https://github.com/kern/minitest-reporters/issues/293)
+
+### [1.4.0](https://github.com/kern/minitest-reporters/compare/v1.4.0.beta1...v1.4.0) (2019-10-06)
+
+* travis updated to include ruby 2.6 ([#292](https://github.com/kern/minitest-reporters/pull/292) contributed by [pvalena](https://github.com/pvalena))
+* location option added to DefaultReporter [#288](https://github.com/kern/minitest-reporters/pull/288) contributed by [bmo](https://github.com/bmo)
+* Date and time added to HTML report [#287](https://github.com/kern/minitest-reporters/pull/287) contributed by [cderche](https://github.com/cderche)
+
+### [1.4.0.beta1](https://github.com/kern/minitest-reporters/compare/v1.3.8...v1.4.0.beta1) (2019-08-28)
+
+* JUnitReporter changed to be compatible with the spec [#286](https://github.com/kern/minitest-reporters/pull/286) contributed by [dylanahsmith](https://github.com/dylanahsmith)
+
+### [1.3.8](https://github.com/kern/minitest-reporters/compare/v1.3.7...v1.3.8) (2019-08-14)
+
+* Fixed default ProgressReporter regression from [#278](https://github.com/kern/minitest-reporters/pull/278); fix [#284](https://github.com/kern/minitest-reporters/pull/284) contributed by [bobmaerten](https://github.com/bobmaerten)
+
+### [1.3.7](https://github.com/kern/minitest-reporters/compare/v1.3.6...v1.3.7) (2019-08-14)
+
+* added ability to specify output dir of JUnitReporter through ENV [#277](https://github.com/kern/minitest-reporters/pull/277) countributed by [KevinSjoberg](https://github.com/KevinSjoberg)
+* Added verbose functionality to ProgressReporter [#278](https://github.com/kern/minitest-reporters/pull/278) contributed by [senhalil](https://github.com/senhalil)
+
+### [1.3.6](https://github.com/kern/minitest-reporters/compare/v1.3.5...v1.3.6) (2019-01-16)
+
+* fixed possible null pointer in #after_suite [#274](https://github.com/kern/minitest-reporters/pull/274)
+  contributed by [casperisfine](https://github.com/casperisfine)
+
+### [1.3.5](https://github.com/kern/minitest-reporters/compare/v1.3.5.beta1...v1.3.5) (2018-09-30)
+
+### [1.3.5.beta1](https://github.com/kern/minitest-reporters/compare/v1.3.4...v1.3.5.beta1)
+
+* additional fix for reporting slowest suites by DefaultReporter [#270](https://github.com/kern/minitest-reporters/issues/270)
+
+### [1.3.4](https://github.com/kern/minitest-reporters/compare/v1.3.3...v1.3.4)
+
+* fixed the way DefaultReporter reports slowest suites [#270](https://github.com/kern/minitest-reporters/issues/270)
+
+### [1.3.3](https://github.com/kern/minitest-reporters/compare/v1.3.2...v1.3.3)
+
+* fixed problem with default report paths for MeanTimeReporter [#269](https://github.com/kern/minitest-reporters/pull/269)
+  contributed by [duonoid](https://github.com/duonoid)
+
+### [1.3.2](https://github.com/kern/minitest-reporters/compare/v1.3.2.beta2...v1.3.2)
+
+### [1.3.2.beta2](https://github.com/kern/minitest-reporters/compare/v1.3.2.beta1...v1.3.2.beta2)
+
+* fixed the way JUnitReporter calculates relative path [#258](https://github.com/kern/minitest-reporters/issues/258)
+
+### [1.3.2.beta1](https://github.com/kern/minitest-reporters/compare/v1.3.1...v1.3.2.beta1)
+
+* SpecReporter do not print exception name any more (unless it is an test error) [#264](https://github.com/kern/minitest-reporters/issues/264)
+* Fixed loading error caused by fix for [#265](https://github.com/kern/minitest-reporters/pull/265)
+  see [#267](https://github.com/kern/minitest-reporters/issues/267) and
+  [#268](https://github.com/kern/minitest-reporters/pull/268) for more details.
+
+### [1.3.1](https://github.com/kern/minitest-reporters/compare/v1.3.1.beta1...v1.3.1)
+
+### [1.3.1.beta1](https://github.com/kern/minitest-reporters/compare/v1.3.0...v1.3.1.beta1)
+
+* Fixed time reporting [#265](https://github.com/kern/minitest-reporters/pull/265) contributed by [brendandeere](https://github.com/brendandeere)
+
+### [1.3.0](https://github.com/kern/minitest-reporters/compare/v1.3.0.beta3...v1.3.0)
+
+### [1.3.0.beta3](https://github.com/kern/minitest-reporters/compare/v1.3.0.beta2...v1.3.0.beta3)
+
+* [#261](https://github.com/kern/minitest-reporters/issues/261) fixed by [#262](https://github.com/kern/minitest-reporters/pull/262) contributed by [trabulmonkee](https://github.com/trabulmonkee)
+
+### [1.3.0.beta2](https://github.com/kern/minitest-reporters/compare/v1.3.0.beta1...v1.3.0.beta2)
+
+* JUnit reporter fixed to comply with JUnit spec ([#257](https://github.com/kern/minitest-reporters/issues/257), [#260](https://github.com/kern/minitest-reporters/pull/260) contributed by [brettwgreen](https://github.com/brettwgreen))
+
+### [1.3.0.beta1](https://github.com/kern/minitest-reporters/compare/v1.2.0...v1.3.0.beta1)
+
+* MINITEST_REPORTER env variable can be used to override reporter [#256](https://github.com/kern/minitest-reporters/pull/256) (contributed by [brettwgreen](https://github.com/brettwgreen))
+
+### [1.2.0](https://github.com/kern/minitest-reporters/compare/v1.2.0.beta3...v1.2.0)
+
+### [1.2.0.beta3](https://github.com/kern/minitest-reporters/compare/v1.2.0.beta2...v1.2.0.beta3)
+
+* junit reporter changed to support mintest >= 5.11 [#252](https://github.com/kern/minitest-reporters/pull/252) (contributed by [Kevinrob](https://github.com/Kevinrob))
+* all reporters changed to be compatible with minitest >= 5.11 (if not - report a bug ;)
+
+### [1.2.0.beta2](https://github.com/kern/minitest-reporters/compare/v1.2.0.beta1...v1.2.0.beta2)
+
+* fixed uninitialized time in junit reporter [#251](https://github.com/kern/minitest-reporters/issues/251)
+* format option added to progress reporter [#240](https://github.com/kern/minitest-reporters/pull/240) (contributed by [jorgesmu](https://github.com/jorgesmu))
+* improved output of junit reporter [#245](https://github.com/kern/minitest-reporters/pull/245) (contributed by [jules2689](https://github.com/jules2689))
+
+### [1.2.0.beta1](https://github.com/kern/minitest-reporters/compare/v1.1.19...v1.2.0.beta1)
+
+* SpecReporter regression for Minitest 5.11.1 fixed [#250](https://github.com/kern/minitest-reporters/pull/250) (contrinuted by [mbround18](https://github.com/mbround18))
+
+### [1.1.19](https://github.com/kern/minitest-reporters/compare/v1.1.18...v1.1.19)
+
+* Reverted [#236](https://github.com/kern/minitest-reporters/pull/236) (it creates too many problems)
+
+### [1.1.18](https://github.com/kern/minitest-reporters/compare/v1.1.17...v1.1.18)
+
+* Fixed problem with Rails 5.1.3 [#230](https://github.com/kern/minitest-reporters/issues/230) by [#236](https://github.com/kern/minitest-reporters/pull/236) (contributed by [samcday](https://github.com/samcday))
+
+### [1.1.17](https://github.com/kern/minitest-reporters/compare/v1.1.16...v1.1.17)
+
+* Fixed tests' counting [#232](https://github.com/kern/minitest-reporters/pull/232) (contributed by [adaedra](https://github.com/adaedra))
+
+### [1.1.16](https://github.com/kern/minitest-reporters/compare/v1.1.15...v1.1.16)
+
+* reverted fix for [#231](https://github.com/kern/minitest-reporters/pull/231) to fix[#233](https://github.com/kern/minitest-reporters/pull/233)
+
+## [1.1.15](https://github.com/kern/minitest-reporters/compare/v1.1.14...v1.1.15)
+
+* Fixed problem with handling SIGINFO [#231](https://github.com/kern/minitest-reporters/pull/231) (contributed by [joshpencheon](https://github.com/joshpencheon))
diff --git a/LICENSE b/LICENSE
index 042141c..a5621fe 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011 Alexander Kern
+Copyright (c) 2018 Alexander Kern
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index c04d4eb..5085132 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
 [gem]: https://rubygems.org/gems/minitest-reporters
-[travis]: https://travis-ci.org/kern/minitest-reporters
 
 # minitest-reporters - create customizable Minitest output formats
+
 [![Gem Version](https://badge.fury.io/rb/minitest-reporters.svg)][gem]
-[![Build Status](https://secure.travis-ci.org/kern/minitest-reporters.png)][travis]
+[![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)
 
 Death to haphazard monkey-patching! Extend Minitest through simple hooks.
 
@@ -34,6 +34,25 @@ Want to use multiple reporters?
 Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new, Minitest::Reporters::JUnitReporter.new]
 ```
 
+If TextMate, TeamCity, RubyMine or VIM presence is detected, the reporter will be automatically chosen,
+regardless of any reporters passed to the `use!` method.
+
+To override this behavior, you may set the ENV variable MINITEST_REPORTER:
+
+```sh
+export MINITEST_REPORTER=JUnitReporter
+```
+
+Detection of those systems is based on presence of certain ENV variables and are evaluated in the following order:
+
+```
+ MINITEST_REPORTER => use reporter indicated in env variable
+ TM_PID => use RubyMateReporter
+ RM_INFO => use RubyMineReporter
+ TEAMCITY_VERSION => use RubyMineReporter
+ VIM => disable all Reporters
+```
+
 The following reporters are provided:
 
 ```ruby
@@ -43,6 +62,8 @@ Minitest::Reporters::ProgressReporter # => Fuubar-like output with a progress ba
 Minitest::Reporters::RubyMateReporter # => Simple reporter designed for RubyMate
 Minitest::Reporters::RubyMineReporter # => Reporter designed for RubyMine IDE and TeamCity CI server
 Minitest::Reporters::JUnitReporter    # => JUnit test reporter designed for JetBrains TeamCity
+Minitest::Reporters::MeanTimeReporter # => Produces a report summary showing the slowest running tests
+Minitest::Reporters::HtmlReporter     # => Generates an HTML report of the test results
 ```
 
 Options can be passed to these reporters at construction-time, e.g. to force
@@ -82,17 +103,21 @@ happening if you see overly long or otherwise unexpected backtraces.)
 
 To avoid that, you must manually tell minitest-reporters which filter to use. In Rails,
 do this in `test_helper.rb`:
-
+```ruby
     Minitest::Reporters.use!(
       Minitest::Reporters::DefaultReporter.new,
       ENV,
       Minitest.backtrace_filter
     )
-
+```
 The third parameter to `.use!`, in this case `Minitest.backtrace_filter`, should be a
 filter object. In the above example, you're telling minitest-reporters to use the filter
 that Rails has already set.
 
+**Test Anything Protocol (TAP)**
+
+The [Test Anything Protocol](https://testanything.org) is a specification for outputting test results in an implementation-agnostic manner so that various tools can read the output. If you need to produce TAP-compliant output for Minitest results, see this [blog post](https://dev.to/davidwessman/rails-minitest-results-output-in-tap-format-for-heroku-ci-46d3) and [gist](https://gist.github.com/davidwessman/09a13840a8a80080e3842ac3051714c7) by [@davidwessman](https://github.com/davidwessman).
+
 ## Note on Patches/Pull Requests ##
 
 * Fork the project.
@@ -103,9 +128,9 @@ that Rails has already set.
 
 ## Resources ##
 
-* [GitHub Repository](https://github.com/CapnKernul/minitest-reporters)
-* [Documentation](http://rubydoc.info/github/CapnKernul/minitest-reporters)
+* [GitHub Repository](https://github.com/minitest-reporters/minitest-reporters/)
+* [Documentation](https://www.rubydoc.info/github/minitest-reporters/minitest-reporters)
 
 ## License ##
 
-Minitest-reporters is licensed under the MIT License. See `LICENSE` for details.
+Minitest-reporters is licensed under the MIT License. See [LICENSE](LICENSE) for details.
diff --git a/Rakefile b/Rakefile
index ca9d8aa..df9276b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,6 @@
 require "bundler/gem_tasks"
 require "rake/testtask"
+require 'rubocop/rake_task'
 
 task :default => :test
 Rake::TestTask.new do |t|
@@ -35,7 +36,8 @@ task :gallery do
     "RubyMateReporter",
     "SpecReporter",
     "RubyMineReporter",
-    "HtmlReporter"
+    "HtmlReporter",
+    "MeanTimeReporter",
   ].each do |reporter|
     puts
     puts "-" * 72
@@ -50,3 +52,19 @@ task :gallery do
     sh "cat test/reports/*" if reporter == "JUnitReporter"
   end
 end
+
+task :reset_statistics do
+  require 'minitest/reporters/mean_time_reporter'
+  Minitest::Reporters::MeanTimeReporter.reset_statistics!
+  puts "The mean time reporter statistics have been reset."
+  exit 0
+end
+
+desc 'Run RuboCop on the lib directory'
+RuboCop::RakeTask.new(:rubocop) do |task|
+  task.patterns = ['lib/**/*.rb']
+  # only show the files with failures
+  task.formatters = ['clang']
+  # don't abort rake on failure
+  task.fail_on_error = false
+end
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..7da0fea
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,22 @@
+---
+version: '#{build}'
+cache:
+  - vendor/bundle
+environment:
+  matrix:
+    - RUBY_VERSION: 25-x64
+    - RUBY_VERSION: 24-x64
+
+install:
+  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
+  - bundle install
+
+build: off
+
+before_test:
+  - ruby -v
+  - gem -v
+  - bundle -v
+
+test_script:
+  - bundle exec rake test
diff --git a/assets/mean_time_reporter.png b/assets/mean_time_reporter.png
new file mode 100644
index 0000000..213a68c
Binary files /dev/null and b/assets/mean_time_reporter.png differ
diff --git a/debian/changelog b/debian/changelog
index 4a6dfbc..50c7c6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-ruby-minitest-reporters (1.0.19-3) UNRELEASED; urgency=medium
+ruby-minitest-reporters (1.6.0-1) UNRELEASED; urgency=medium
 
   * Set debhelper-compat version in Build-Depends.
   * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
@@ -11,8 +11,10 @@ ruby-minitest-reporters (1.0.19-3) UNRELEASED; urgency=medium
   * Update standards version to 4.5.1, no changes needed.
   * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository-Browse.
   * Update standards version to 4.6.2, no changes needed.
+  * New upstream release.
+  * New upstream release.
 
- -- Debian Janitor <janitor@jelmer.uk>  Thu, 19 Mar 2020 06:55:33 +0000
+ -- Debian Janitor <janitor@jelmer.uk>  Wed, 15 Mar 2023 02:53:28 -0000
 
 ruby-minitest-reporters (1.0.19-2) unstable; urgency=medium
 
diff --git a/debian/patches/0002-Drop-git-usage-in-gemspec.patch b/debian/patches/0002-Drop-git-usage-in-gemspec.patch
index f20ba6d..ad09850 100644
--- a/debian/patches/0002-Drop-git-usage-in-gemspec.patch
+++ b/debian/patches/0002-Drop-git-usage-in-gemspec.patch
@@ -6,13 +6,13 @@ Subject: Drop git usage in gemspec
  minitest-reporters.gemspec | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
 
-diff --git a/minitest-reporters.gemspec b/minitest-reporters.gemspec
-index 09de582..8c8ed60 100644
---- a/minitest-reporters.gemspec
-+++ b/minitest-reporters.gemspec
-@@ -23,8 +23,7 @@ Gem::Specification.new do |s|
-   s.add_development_dependency 'maruku'
+Index: ruby-minitest-reporters.git/minitest-reporters.gemspec
+===================================================================
+--- ruby-minitest-reporters.git.orig/minitest-reporters.gemspec
++++ ruby-minitest-reporters.git/minitest-reporters.gemspec
+@@ -24,8 +24,7 @@ Gem::Specification.new do |s|
    s.add_development_dependency 'rake'
+   s.add_development_dependency 'rubocop'
  
 -  s.files         = `git ls-files`.split("\n")
 -  s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
diff --git a/debian/patches/emove-bundler.patch b/debian/patches/emove-bundler.patch
index 0e76c54..f715d26 100644
--- a/debian/patches/emove-bundler.patch
+++ b/debian/patches/emove-bundler.patch
@@ -1,7 +1,7 @@
-Index: ruby-minitest-reporters-1.0.19/test/test_helper.rb
+Index: ruby-minitest-reporters.git/test/test_helper.rb
 ===================================================================
---- ruby-minitest-reporters-1.0.19.orig/test/test_helper.rb
-+++ ruby-minitest-reporters-1.0.19/test/test_helper.rb
+--- ruby-minitest-reporters.git.orig/test/test_helper.rb
++++ ruby-minitest-reporters.git/test/test_helper.rb
 @@ -1,4 +1,3 @@
 -require "bundler/setup"
  require "minitest/autorun"
diff --git a/lib/minitest/minitest_reporter_plugin.rb b/lib/minitest/minitest_reporter_plugin.rb
index e72cdc4..9549a9f 100644
--- a/lib/minitest/minitest_reporter_plugin.rb
+++ b/lib/minitest/minitest_reporter_plugin.rb
@@ -1,33 +1,82 @@
 module Minitest
-  class << self
-    def plugin_minitest_reporter_init(options)
-      if defined?(Minitest::Reporters) && Minitest::Reporters.reporters
-        reporter.reporters = Minitest::Reporters.reporters + guard_reporter
-        reporter.reporters.each do |reporter|
-          reporter.io = options[:io]
-          reporter.add_defaults(options.merge(:total_count => total_count(options))) if reporter.respond_to? :add_defaults
+  module Reporters
+    class DelegateReporter < Minitest::AbstractReporter
+      def initialize(reporters, options = {})
+        @reporters = reporters
+        @options = options
+        @all_reporters = nil
+      end
+
+      def io
+        all_reporters.first.io unless all_reporters.empty?
+        @options[:io]
+      end
+
+      def start
+        all_reporters.each(&:start)
+      end
+
+      def prerecord(klass, name)
+        all_reporters.each do |reporter|
+          reporter.prerecord klass, name
         end
       end
-    end
 
-    private
+      def record(result)
+        all_reporters.each do |reporter|
+          reporter.record result
+        end
+      end
 
-    # stolen from minitest self.run
-    def total_count(options)
-      filter = options[:filter] || '/./'
-      filter = Regexp.new $1 if filter =~ /\/(.*)\//
+      def report
+        all_reporters.each(&:report)
+      end
 
-      Minitest::Runnable.runnables.map(&:runnable_methods).flatten.find_all { |m|
-        filter === m || filter === "#{self}##{m}"
-      }.size
-    end
+      def passed?
+        all_reporters.all?(&:passed?)
+      end
+
+      private
 
-    def guard_reporter
-      guards = Array(reporter.reporters.detect { |r| r.class.name == "Guard::Minitest::Reporter" })
-      return guards unless ENV['RM_INFO']
+      # stolen from minitest self.run
+      def total_count(options)
+        filter = options[:filter] || '/./'
+        filter = Regexp.new $1 if filter.is_a?(String) && filter =~ %r%/(.*)/%
 
-      warn 'RM_INFO is set thus guard reporter has been dropped' unless guards.empty?
-      []
+        Minitest::Runnable.runnables.map { |runnable|
+          runnable.runnable_methods.find_all { |m|
+            filter === m || filter === "#{runnable}##{m}"
+          }.size
+        }.inject(:+)
+      end
+
+      def all_reporters
+        @all_reporters ||= init_all_reporters
+      end
+
+      def init_all_reporters
+        return @reporters unless defined?(Minitest::Reporters.reporters) && Minitest::Reporters.reporters
+        (Minitest::Reporters.reporters + guard_reporter(@reporters)).each do |reporter|
+          reporter.io = @options[:io]
+          if reporter.respond_to?(:add_defaults)
+            reporter.add_defaults(@options.merge(:total_count => total_count(@options)))
+          end
+        end
+      end
+
+      def guard_reporter(reporters)
+        guards = Array(reporters.detect { |r| r.class.name == "Guard::Minitest::Reporter" })
+        return guards unless ENV['RM_INFO']
+
+        warn 'RM_INFO is set thus guard reporter has been dropped' unless guards.empty?
+        []
+      end
+    end
+  end
+
+  class << self
+    def plugin_minitest_reporter_init(options)
+      reporter.reporters = [Minitest::Reporters::DelegateReporter.new(reporter.reporters, options)]
     end
   end
 end
diff --git a/lib/minitest/reporters.rb b/lib/minitest/reporters.rb
index 0e72e4d..5d34bc4 100644
--- a/lib/minitest/reporters.rb
+++ b/lib/minitest/reporters.rb
@@ -16,14 +16,18 @@ module Minitest
     autoload :RubyMineReporter, "minitest/reporters/rubymine_reporter"
     autoload :JUnitReporter, "minitest/reporters/junit_reporter"
     autoload :HtmlReporter, "minitest/reporters/html_reporter"
+    autoload :MeanTimeReporter, "minitest/reporters/mean_time_reporter"
 
     class << self
       attr_accessor :reporters
     end
 
-    def self.use!(console_reporters = ProgressReporter.new, env = ENV, backtrace_filter = ExtensibleBacktraceFilter.default_filter)
+    def self.use!(console_reporters = ProgressReporter.new, env = ENV, backtrace_filter = nil)
       use_runner!(console_reporters, env)
-      Minitest.backtrace_filter = backtrace_filter
+      if backtrace_filter.nil? && !defined?(::Rails)
+        backtrace_filter = ExtensibleBacktraceFilter.default_filter
+      end
+      Minitest.backtrace_filter = backtrace_filter unless backtrace_filter.nil?
 
       unless defined?(@@loaded)
         use_around_test_hooks!
@@ -39,7 +43,7 @@ module Minitest
     def self.use_around_test_hooks!
       Minitest::Test.class_eval do
         def run_with_hooks(*args)
-          if defined?(Minitest::Reporters) && reporters = Minitest::Reporters.reporters
+          if defined?(Minitest::Reporters) && (reporters = Minitest::Reporters.reporters)
             reporters.each { |r| r.before_test(self) }
             result = run_without_hooks(*args)
             reporters.each { |r| r.after_test(self) }
@@ -55,7 +59,9 @@ module Minitest
     end
 
     def self.choose_reporters(console_reporters, env)
-      if env["TM_PID"]
+      if env["MINITEST_REPORTER"]
+        [Minitest::Reporters.const_get(env["MINITEST_REPORTER"]).new]
+      elsif env["TM_PID"]
         [RubyMateReporter.new]
       elsif env["RM_INFO"] || env["TEAMCITY_VERSION"]
         [RubyMineReporter.new]
@@ -64,6 +70,18 @@ module Minitest
       end
     end
 
+    def self.clock_time
+      if minitest_version >= 561
+        Minitest.clock_time
+      else
+        Time.now
+      end
+    end
+
+    def self.minitest_version
+      Minitest::VERSION.delete('.').to_i
+    end
+
     def self.use_old_activesupport_fix!
       if defined?(ActiveSupport::VERSION) && ActiveSupport::VERSION::MAJOR < 4
         require "minitest/old_activesupport_fix"
diff --git a/lib/minitest/reporters/ansi.rb b/lib/minitest/reporters/ansi.rb
index b5c2e98..d2cb2b2 100644
--- a/lib/minitest/reporters/ansi.rb
+++ b/lib/minitest/reporters/ansi.rb
@@ -2,8 +2,8 @@ module Minitest
   module Reporters
     module ANSI
       module Code
-
         def self.color?
+          return false if ENV['MINITEST_REPORTERS_MONO']
           color_terminal = ENV['TERM'].to_s.downcase.include?("color")
           $stdout.tty? || color_terminal
         end
@@ -18,7 +18,7 @@ module Minitest
             block_given? ? yield : s
           end
 
-          %w[ red green yellow blue magenta cyan white ].each do |color|
+          %w[red green yellow blue magenta cyan white].each do |color|
             alias_method color, :black
           end
 
diff --git a/lib/minitest/reporters/base_reporter.rb b/lib/minitest/reporters/base_reporter.rb
index 421487a..f9ee660 100644
--- a/lib/minitest/reporters/base_reporter.rb
+++ b/lib/minitest/reporters/base_reporter.rb
@@ -1,9 +1,31 @@
 module Minitest
   module Reporters
+    class Suite
+      attr_reader :name
+      def initialize(name)
+        @name = name
+      end
+
+      def ==(other)
+        name == other.name
+      end
+
+      def eql?(other)
+        self == other
+      end
+
+      def hash
+        name.hash
+      end
+
+      def to_s
+        name.to_s
+      end
+    end
     class BaseReporter < Minitest::StatisticsReporter
       attr_accessor :tests
 
-      def initialize(options={})
+      def initialize(options = {})
         super($stdout, options)
         self.tests = []
       end
@@ -14,11 +36,14 @@ module Minitest
 
       # called by our own before hooks
       def before_test(test)
-        last_test = tests.last
-        if last_test.class != test.class
-          after_suite(last_test.class) if last_test
-          before_suite(test.class)
-        end
+        last_test = test_class(tests.last)
+
+        suite_changed = last_test.nil? || last_test.name != test.class.name
+
+        return unless suite_changed
+
+        after_suite(last_test) if last_test
+        before_suite(test_class(test))
       end
 
       def record(test)
@@ -27,21 +52,20 @@ module Minitest
       end
 
       # called by our own after hooks
-      def after_test(test)
-      end
+      def after_test(_test); end
 
       def report
         super
-        after_suite(tests.last.class)
+        if last_suite = test_class(tests.last)
+          after_suite(last_suite)
+        end
       end
 
       protected
 
-      def after_suite(test)
-      end
+      def after_suite(test); end
 
-      def before_suite(test)
-      end
+      def before_suite(test); end
 
       def result(test)
         if test.error?
@@ -55,18 +79,29 @@ module Minitest
         end
       end
 
+      def test_class(result)
+        # Minitest broke API between 5.10 and 5.11 this gets around Result object
+        if result.nil?
+          nil
+        elsif result.respond_to? :klass
+          Suite.new(result.klass)
+        else
+          Suite.new(result.class.name)
+        end
+      end
+
       def print_colored_status(test)
         if test.passed?
-          print(green { pad_mark( result(test).to_s.upcase ) })
+          print(green { pad_mark(result(test).to_s.upcase) })
         elsif test.skipped?
-          print(yellow { pad_mark( result(test).to_s.upcase ) })
+          print(yellow { pad_mark(result(test).to_s.upcase) })
         else
-          print(red { pad_mark( result(test).to_s.upcase ) })
+          print(red { pad_mark(result(test).to_s.upcase) })
         end
       end
 
       def total_time
-        super || Time.now - start_time
+        super || Minitest::Reporters.clock_time - start_time
       end
 
       def total_count
@@ -85,16 +120,16 @@ module Minitest
         io.print(*args)
       end
 
-      def print_info(e, name=true)
-        print "#{e.exception.class.to_s}: " if name
+      def print_info(e, name = true)
+        print "#{e.exception.class}: " if name
         e.message.each_line { |line| print_with_info_padding(line) }
 
         # When e is a Minitest::UnexpectedError, the filtered backtrace is already part of the message printed out
         # by the previous line. In that case, and that case only, skip the backtrace output.
-        unless e.is_a?(MiniTest::UnexpectedError)
-          trace = filter_backtrace(e.backtrace)
-          trace.each { |line| print_with_info_padding(line) }
-        end
+        return if e.is_a?(MiniTest::UnexpectedError)
+
+        trace = filter_backtrace(e.backtrace)
+        trace.each { |line| print_with_info_padding(line) }
       end
     end
   end
diff --git a/lib/minitest/reporters/default_reporter.rb b/lib/minitest/reporters/default_reporter.rb
index 0cc14ea..b24a106 100644
--- a/lib/minitest/reporters/default_reporter.rb
+++ b/lib/minitest/reporters/default_reporter.rb
@@ -19,11 +19,16 @@ module Minitest
         @suite_times = []
         @suite_start_times = {}
         @fast_fail = options.fetch(:fast_fail, false)
+        @show_test_location = options.fetch(:location, false)
         @options = options
       end
 
       def start
         super
+        on_start
+      end
+
+      def on_start
         puts
         puts("# Running tests with run options %s:" % options[:args])
         puts
@@ -35,7 +40,7 @@ module Minitest
       end
 
       def before_suite(suite)
-        @suite_start_times[suite] = Time.now
+        @suite_start_times[suite] = Minitest::Reporters.clock_time
         super
       end
 
@@ -48,6 +53,10 @@ module Minitest
       def record(test)
         super
 
+        on_record(test)
+      end
+
+      def on_record(test)
         print "#{"%.2f" % test.time} = " if options[:verbose]
 
         # Print the pass/skip/fail mark
@@ -79,6 +88,10 @@ module Minitest
 
       def report
         super
+        on_report
+      end
+
+      def on_report
         status_line = "Finished tests in %.6fs, %.4f tests/s, %.4f assertions/s." %
           [total_time, count / total_time, assertions / total_time]
 
@@ -101,7 +114,7 @@ module Minitest
           puts
 
           slow_tests.each do |test|
-            puts "%.6fs %s" % [test.time, "#{test.name}##{test.class}"]
+            puts "%.6fs %s#%s" % [test.time, test.name, test_class(test)]
           end
         end
 
@@ -129,11 +142,28 @@ module Minitest
         unless message.nil? || message.strip == ''
           puts
           puts colored_for(result(test), message)
+          if @show_test_location
+            location = get_source_location(test)
+            puts "\n\n#{relative_path(location[0])}:#{location[1]}"
+          end
+
         end
       end
 
       private
 
+      def relative_path(path)
+        Pathname.new(path).relative_path_from(Pathname.new(Dir.getwd))
+      end
+      
+      def get_source_location(result)
+        if result.respond_to? :klass
+          result.source_location
+        else
+          result.method(result.name).source_location
+        end
+      end
+
       def color?
         return @color if defined?(@color)
         @color = @options.fetch(:color) do
@@ -175,7 +205,6 @@ module Minitest
 
       def location(exception)
         last_before_assertion = ''
-
         exception.backtrace.reverse_each do |s|
           break if s =~ /in .(assert|refute|flunk|pass|fail|raise|must|wont)/
           last_before_assertion = s
@@ -189,12 +218,12 @@ module Minitest
 
         if test.skipped?
           if @detailed_skip
-            "Skipped:\n#{test.class}##{test.name} [#{location(e)}]:\n#{e.message}"
+            "Skipped:\n#{test_class(test)}##{test.name} [#{location(e)}]:\n#{e.message}"
           end
         elsif test.error?
-          "Error:\n#{test.class}##{test.name}:\n#{e.message}"
+          "Error:\n#{test_class(test)}##{test.name}:\n#{e.message}"
         else
-          "Failure:\n#{test.class}##{test.name} [#{test.failure.location}]\n#{e.class}: #{e.message}"
+          "Failure:\n#{test_class(test)}##{test.name} [#{test.failure.location}]\n#{e.class}: #{e.message}"
         end
       end
 
@@ -208,7 +237,7 @@ module Minitest
         if start_time.nil?
           0
         else
-          Time.now - start_time
+          Minitest::Reporters.clock_time - start_time
         end
       end
     end
diff --git a/lib/minitest/reporters/html_reporter.rb b/lib/minitest/reporters/html_reporter.rb
index 4912616..8b95ff7 100644
--- a/lib/minitest/reporters/html_reporter.rb
+++ b/lib/minitest/reporters/html_reporter.rb
@@ -5,9 +5,11 @@ require 'erb'
 module Minitest
   module Reporters
     # A reporter for generating HTML test reports
-    # This is recommended to be used with a CI server, where the report is kept as an artifact and is accessible via a shared link
+    # This is recommended to be used with a CI server, where the report is kept as an artifact and is accessible via
+    # a shared link
     #
-    # The reporter sorts the results alphabetically and then by results so that failing and skipped tests are at the top.
+    # The reporter sorts the results alphabetically and then by results
+    # so that failing and skipped tests are at the top.
     #
     # When using Minitest Specs, the number prefix is dropped from the name of the test so that it reads well
     #
@@ -16,7 +18,6 @@ module Minitest
     # The report is generated using ERB. A custom ERB template can be provided but it is not required
     # The default ERB template uses JQuery and Bootstrap, both of these are included by referencing the CDN sites
     class HtmlReporter < BaseReporter
-
       # The title of the report
       attr_reader :title
 
@@ -27,17 +28,20 @@ module Minitest
 
       # The percentage of tests that passed, calculated in a way that avoids rounding errors
       def percent_passes
-        100 - percent_skipps - percent_errors_failures
+        100 - percent_skips - percent_errors_failures
       end
 
       # The percentage of tests that were skipped
-      def percent_skipps
-        (skips/count.to_f * 100).to_i
+      def percent_skips
+        (skips / count.to_f * 100).to_i
       end
 
+      # Keeping old method name with typo for backwards compatibility in custom templates (for now)
+      alias_method :percent_skipps, :percent_skips
+
       # The percentage of tests that failed
       def percent_errors_failures
-        ((errors+failures)/count.to_f * 100).to_i
+        ((errors + failures) / count.to_f * 100).to_i
       end
 
       # Trims off the number prefix on test names when using Minitest Specs
@@ -52,14 +56,16 @@ module Minitest
       # :reports_dir - the directory the reports should be written to, defaults to 'test/html_reports'
       # :erb_template - the path to a custom ERB template, defaults to the supplied ERB template
       # :mode - Useful for debugging, :terse suppresses errors and is the default, :verbose lets errors bubble up
+      # :output_filename - the report's filename, defaults to 'index.html'
       def initialize(args = {})
         super({})
 
         defaults = {
-            :title        => 'Test Results',
-            :erb_template => "#{File.dirname(__FILE__)}/../templates/index.html.erb",
-            :reports_dir  => 'test/html_reports',
-            :mode         => :safe
+          :title           => 'Test Results',
+          :erb_template    => "#{File.dirname(__FILE__)}/../templates/index.html.erb",
+          :reports_dir     => ENV['MINITEST_HTML_REPORTS_DIR'] || 'test/html_reports',
+          :mode            => :safe,
+          :output_filename => ENV['MINITEST_HTML_REPORTS_FILENAME'] || 'index.html',
         }
 
         settings = defaults.merge(args)
@@ -67,13 +73,18 @@ module Minitest
         @mode = settings[:mode]
         @title = settings[:title]
         @erb_template = settings[:erb_template]
+        @output_filename = settings[:output_filename]
         reports_dir = settings[:reports_dir]
 
         @reports_path = File.absolute_path(reports_dir)
+      end
+
+      def start
+        super
 
         puts "Emptying #{@reports_path}"
-        FileUtils.remove_dir(@reports_path) if File.exists?(@reports_path)
         FileUtils.mkdir_p(@reports_path)
+        File.delete(html_file) if File.exist?(html_file)
       end
 
       # Called by the framework to generate the report
@@ -82,11 +93,10 @@ module Minitest
 
         begin
           puts "Writing HTML reports to #{@reports_path}"
-          html_file = @reports_path + "/index.html"
           erb_str = File.read(@erb_template)
           renderer = ERB.new(erb_str)
 
-          tests_by_suites = tests.group_by(&:class) # taken from the JUnit reporter
+          tests_by_suites = tests.group_by { |test| test_class(test) } # taken from the JUnit reporter
 
           suites = tests_by_suites.map do |suite, tests|
             suite_summary = summarize_suite(suite, tests)
@@ -101,6 +111,7 @@ module Minitest
             f.write(result)
           end
 
+        # rubocop:disable Lint/RescueException
         rescue Exception => e
           puts 'There was an error writing the HTML report'
           puts 'This may have been caused by cancelling the test run'
@@ -108,11 +119,15 @@ module Minitest
           puts 'Use mode => :terse in the HTML reporters constructor to see less detail' if @mode != :terse
           raise e if @mode != :terse
         end
-
+        # rubocop:enable Lint/RescueException
       end
 
       private
 
+      def html_file
+        "#{@reports_path}/#{@output_filename}"
+      end
+
       def compare_suites_by_name(suite_a, suite_b)
         suite_a[:name] <=> suite_b[:name]
       end
@@ -201,11 +216,11 @@ module Minitest
       def total_time_to_hms
         return ('%.2fs' % total_time) if total_time < 1
 
-        hours = total_time / (60 * 60)
-        minutes = ((total_time / 60) % 60).to_s.rjust(2,'0')
-        seconds = (total_time % 60).to_s.rjust(2,'0')
+        hours = (total_time / (60 * 60)).round
+        minutes = ((total_time / 60) % 60).round.to_s.rjust(2, '0')
+        seconds = (total_time % 60).round.to_s.rjust(2, '0')
 
-        "#{ hours }h#{ minutes }m#{ seconds }s"
+        "#{hours}h#{minutes}m#{seconds}s"
       end
     end
   end
diff --git a/lib/minitest/reporters/junit_reporter.rb b/lib/minitest/reporters/junit_reporter.rb
index 00585a9..8fff56f 100644
--- a/lib/minitest/reporters/junit_reporter.rb
+++ b/lib/minitest/reporters/junit_reporter.rb
@@ -1,5 +1,10 @@
+# frozen_string_literal: true
+
 require 'builder'
 require 'fileutils'
+require 'pathname'
+require 'time'
+
 module Minitest
   module Reporters
     # A reporter for writing JUnit test reports
@@ -9,44 +14,108 @@ module Minitest
     # Also inspired by Marc Seeger's attempt at producing a JUnitReporter (see https://github.com/rb2k/minitest-reporters/commit/e13d95b5f884453a9c77f62bc5cba3fa1df30ef5)
     # Also inspired by minitest-ci (see https://github.com/bhenderson/minitest-ci)
     class JUnitReporter < BaseReporter
-      def initialize(reports_dir = "test/reports", empty = true)
+      DEFAULT_REPORTS_DIR = "test/reports"
+
+      attr_reader :reports_path
+
+      def initialize(reports_dir = DEFAULT_REPORTS_DIR, empty = true, options = {})
         super({})
-        @reports_path = File.absolute_path(reports_dir)
+        @reports_path = File.absolute_path(ENV.fetch("MINITEST_REPORTERS_REPORTS_DIR", reports_dir))
+        @single_file = options[:single_file]
+        @base_path = options[:base_path] || Dir.pwd
+        @timestamp_report = options[:include_timestamp]
 
-        if empty
-          puts "Emptying #{@reports_path}"
-          FileUtils.remove_dir(@reports_path) if File.exists?(@reports_path)
-          FileUtils.mkdir_p(@reports_path)
-        end
+        return unless empty
+
+        puts "Emptying #{@reports_path}"
+        FileUtils.mkdir_p(@reports_path)
+        File.delete(*Dir.glob("#{@reports_path}/TEST-*.xml"))
       end
 
       def report
         super
 
         puts "Writing XML reports to #{@reports_path}"
-        suites = tests.group_by(&:class)
-
-        suites.each do |suite, tests|
-          suite_result = analyze_suite(tests)
+        suites = tests.group_by do |test|
+          test_class(test)
+        end
 
+        if @single_file
           xml = Builder::XmlMarkup.new(:indent => 2)
           xml.instruct!
-          xml.testsuite(:name => suite, :skipped => suite_result[:skip_count], :failures => suite_result[:fail_count],
-                        :errors => suite_result[:error_count], :tests => suite_result[:test_count],
-                        :assertions => suite_result[:assertion_count], :time => suite_result[:time]) do
+          xml.testsuites do
+            suites.each do |suite, tests|
+              parse_xml_for(xml, suite, tests)
+            end
+          end
+          File.open(filename_for('minitest'), "w") { |file| file << xml.target! }
+        else
+          suites.each do |suite, tests|
+            xml = Builder::XmlMarkup.new(:indent => 2)
+            xml.instruct!
+            xml.testsuites do
+              parse_xml_for(xml, suite, tests)
+            end
+            File.open(filename_for(suite), "w") { |file| file << xml.target! }
+          end
+        end
+      end
+
+      def get_relative_path(result)
+        file_path = Pathname.new(get_source_location(result).first)
+        base_path = Pathname.new(@base_path)
+
+        if file_path.absolute?
+          file_path.relative_path_from(base_path)
+        else
+          file_path
+        end
+      end
+
+      private
+
+      def get_source_location(result)
+        if result.respond_to? :source_location
+          result.source_location
+        else
+          result.method(result.name).source_location
+        end
+      end
+
+      def parse_xml_for(xml, suite, tests)
+        suite_result = analyze_suite(tests)
+        file_path = get_relative_path(tests.first)
+
+        if @timestamp_report
+          xml.testsuite(:name => suite, :filepath => file_path,
+                                    :skipped => suite_result[:skip_count], :failures => suite_result[:fail_count],
+                                    :errors => suite_result[:error_count], :tests => suite_result[:test_count],
+                                    :assertions => suite_result[:assertion_count], :time => suite_result[:time],
+                                    :timestamp => suite_result[:timestamp]) do
+            tests.each do |test|
+              lineno = get_source_location(test).last
+              xml.testcase(:name => test.name, :lineno => lineno, :classname => suite, :assertions => test.assertions,
+                           :time => test.time, :file => file_path) do
+                xml << xml_message_for(test) unless test.passed?
+              end
+            end
+          end
+        else
+         xml.testsuite(:name => suite, :filepath => file_path,
+                                    :skipped => suite_result[:skip_count], :failures => suite_result[:fail_count],
+                                    :errors => suite_result[:error_count], :tests => suite_result[:test_count],
+                                    :assertions => suite_result[:assertion_count], :time => suite_result[:time]) do
             tests.each do |test|
-              xml.testcase(:name => test.name, :classname => suite, :assertions => test.assertions,
-                           :time => test.time) do
+              lineno = get_source_location(test).last
+              xml.testcase(:name => test.name, :lineno => lineno, :classname => suite, :assertions => test.assertions,
+                           :time => test.time, :file => file_path) do
                 xml << xml_message_for(test) unless test.passed?
               end
             end
           end
-          File.open(filename_for(suite), "w") { |file| file << xml.target! }
         end
       end
 
-      private
-
       def xml_message_for(test)
         # This is a trick lifted from ci_reporter
         xml = Builder::XmlMarkup.new(:indent => 2, :margin => 2)
@@ -55,16 +124,16 @@ module Minitest
           txt.sub(/\n.*/m, '...')
         end
 
-        e = test.failure
+        failure = test.failure
 
         if test.skipped?
-          xml.skipped(:type => test.name)
+          xml.skipped(:type => failure.error.class.name)
         elsif test.error?
-          xml.error(:type => test.name, :message => xml.trunc!(e.message)) do
+          xml.error(:type => failure.error.class.name, :message => xml.trunc!(failure.message)) do
             xml.text!(message_for(test))
           end
-        elsif test.failure
-          xml.failure(:type => test.name, :message => xml.trunc!(e.message)) do
+        elsif failure
+          xml.failure(:type => failure.error.class.name, :message => xml.trunc!(failure.message)) do
             xml.text!(message_for(test))
           end
         end
@@ -90,6 +159,7 @@ module Minitest
         last_before_assertion = ''
         exception.backtrace.reverse_each do |s|
           break if s =~ /in .(assert|refute|flunk|pass|fail|raise|must|wont)/
+
           last_before_assertion = s
         end
         last_before_assertion.sub(/:in .*$/, '')
@@ -97,22 +167,29 @@ module Minitest
 
       def analyze_suite(tests)
         result = Hash.new(0)
+        result[:time] = 0
         tests.each do |test|
           result[:"#{result(test)}_count"] += 1
           result[:assertion_count] += test.assertions
           result[:test_count] += 1
           result[:time] += test.time
+          result[:timestamp] = Time.now.iso8601 if @timestamp_report
         end
         result
       end
 
       def filename_for(suite)
         file_counter = 0
-        filename = "TEST-#{suite.to_s[0..240].gsub(/[^a-zA-Z0-9]+/, '-')}.xml" #restrict max filename length, to be kind to filesystems
-        while File.exists?(File.join(@reports_path, filename)) # restrict number of tries, to avoid infinite loops
+        # restrict max filename length, to be kind to filesystems
+        suite_name = suite.to_s[0..240].gsub(/[^a-zA-Z0-9]+/, '-')
+        filename = "TEST-#{suite_name}.xml"
+        while File.exist?(File.join(@reports_path, filename)) # restrict number of tries, to avoid infinite loops
           file_counter += 1
-          filename = "TEST-#{suite}-#{file_counter}.xml"
-          puts "Too many duplicate files, overwriting earlier report #{filename}" and break if file_counter >= 99
+          filename = "TEST-#{suite_name}-#{file_counter}.xml"
+          if file_counter >= 99
+            puts "Too many duplicate files, overwriting earlier report #{filename}"
+            break
+          end
         end
         File.join(@reports_path, filename)
       end
diff --git a/lib/minitest/reporters/mean_time_reporter.rb b/lib/minitest/reporters/mean_time_reporter.rb
new file mode 100644
index 0000000..95ec16e
--- /dev/null
+++ b/lib/minitest/reporters/mean_time_reporter.rb
@@ -0,0 +1,388 @@
+require 'minitest/reporters'
+require 'tmpdir'
+require 'yaml'
+
+module Minitest
+  module Reporters
+    # This reporter creates a report providing the average (mean), minimum and
+    # maximum times for a test to run. Running this for all your tests will
+    # allow you to:
+    #
+    # 1) Identify the slowest running tests over time as potential candidates
+    #    for improvements or refactoring.
+    # 2) Identify (and fix) regressions in test run speed caused by changes to
+    #    your tests or algorithms in your code.
+    # 3) Provide an abundance of statistics to enjoy.
+    #
+    # This is achieved by creating a (configurable) 'previous runs' statistics
+    # file which is parsed at the end of each run to provide a new
+    # (configurable) report. These statistics can be reset at any time by using
+    # a simple rake task:
+    #
+    #     rake reset_statistics
+    #
+    class MeanTimeReporter < Minitest::Reporters::DefaultReporter
+      class InvalidOrder < StandardError; end
+      class InvalidSortColumn < StandardError; end
+
+      # Reset the statistics file for this reporter. Called via a rake task:
+      #
+      #     rake reset_statistics
+      #
+      # @return [Boolean]
+      def self.reset_statistics!
+        new.reset_statistics!
+      end
+
+      # @param options [Hash]
+      # @option previous_runs_filename [String] Contains the times for each test
+      #   by description. Defaults to '/tmp/minitest_reporters_previous_run'.
+      # @option report_filename [String] Contains the parsed results for the
+      #   last test run. Defaults to '/tmp/minitest_reporters_report'.
+      # @option show_count [Fixnum] The number of tests to show in the report
+      #   summary at the end of the test run. Default is 15.
+      # @option show_progress [Boolean] If true it prints pass/skip/fail marks.
+      #   Default is true.
+      # @option show_all_runs [Boolean] If true it shows all recorded suit results.
+      #   Default is true.
+      # @option sort_column [Symbol] One of :avg (default), :min, :max, :last.
+      #   Determines the column by which the report summary is sorted.
+      # @option order [Symbol] One of :desc (default), or :asc. By default the
+      #   report summary is listed slowest to fastest (:desc). :asc will order
+      #   the report summary as fastest to slowest.
+      # @return [Minitest::Reporters::MeanTimeReporter]
+      def initialize(options = {})
+        super
+
+        @all_suite_times = []
+      end
+
+      # Copies the suite times from the
+      # {Minitest::Reporters::DefaultReporter#after_suite} method, making them
+      # available to this class.
+      #
+      # @return [Hash<String => Float>]
+      def after_suite(suite)
+        super
+
+        @all_suite_times = @suite_times
+      end
+
+      # Runs the {Minitest::Reporters::DefaultReporter#report} method and then
+      # enhances it by storing the results to the 'previous_runs_filename' and
+      # outputs the parsed results to both the 'report_filename' and the
+      # terminal.
+      #
+      def report
+        super
+
+        create_or_update_previous_runs!
+
+        create_new_report!
+
+        write_to_screen!
+      end
+
+      def on_start
+        super if options[:show_progress]
+      end
+
+      def on_record(test)
+        super if options[:show_progress]
+      end
+
+      def on_report
+        super if options[:show_progress]
+      end
+
+      # Resets the 'previous runs' file, essentially removing all previous
+      # statistics gathered.
+      #
+      # @return [void]
+      def reset_statistics!
+        File.delete(previous_runs_filename) if File.exist?(previous_runs_filename)
+      end
+
+      protected
+
+      attr_accessor :all_suite_times
+
+      private
+
+      # @return [Hash<String => Float>]
+      def current_run
+        Hash[all_suite_times]
+      end
+
+      # @return [Hash] Sets default values for the filenames used by this class,
+      #   and the number of tests to output to output to the screen after each
+      #   run.
+      def defaults
+        {
+          order:                  :desc,
+          show_count:             15,
+          show_progress:          true,
+          show_all_runs:          true,
+          sort_column:            :avg,
+          previous_runs_filename: File.join(Dir.tmpdir, 'minitest_reporters_previous_run'),
+          report_filename:        File.join(Dir.tmpdir, 'minitest_reporters_report'),
+        }
+      end
+
+      # Added to the top of the report file and to the screen output.
+      #
+      # @return [String]
+      def report_title
+        "\n\e[4mMinitest Reporters: Mean Time Report\e[24m " \
+        "(Samples: #{samples}, Order: #{sort_column.inspect} " \
+        "#{order.inspect})\n"
+      end
+
+      # The report itself. Displays statistics about all runs, ideal for use
+      # with the Unix 'head' command. Listed in slowest average descending
+      # order.
+      #
+      # @return [String]
+      def report_body
+        order_sorted_body.each_with_object([]) do |result, obj|
+          rating = rate(result[:last], result[:min], result[:max])
+
+          obj << "#{avg_label} #{result[:avg].to_s.ljust(12)} " \
+                 "#{min_label} #{result[:min].to_s.ljust(12)} " \
+                 "#{max_label} #{result[:max].to_s.ljust(12)} " \
+                 "#{run_label(rating)} #{result[:last].to_s.ljust(12)} " \
+                 "#{des_label} #{result[:desc]}\n"
+        end.join
+      end
+
+      # @return [String] All of the column-sorted results sorted by the :order
+      #   option. (Defaults to :desc).
+      def order_sorted_body
+        if desc?
+          column_sorted_body.reverse
+
+        elsif asc?
+          column_sorted_body
+
+        end
+      end
+
+      # @return [Array<Hash<Symbol => String>>] All of the results sorted by
+      #   the :sort_column option. (Defaults to :avg).
+      def column_sorted_body
+        runs = options[:show_all_runs] ? previous_run : current_run
+        runs.keys.each_with_object([]) do |description, obj|
+          timings = previous_run[description]
+          size = Array(timings).size
+          sum  = Array(timings).inject { |total, x| total + x }
+          obj << {
+            avg:  (sum / size).round(9),
+            min:  Array(timings).min.round(9),
+            max:  Array(timings).max.round(9),
+            last: Array(timings).last.round(9),
+            desc: description,
+          }
+        end.sort_by { |k| k[sort_column] }
+      end
+
+      # @return [Hash]
+      def options
+        defaults.merge!(@options)
+      end
+
+      # @return [Fixnum] The number of tests to output to output to the screen
+      #   after each run.
+      def show_count
+        options[:show_count]
+      end
+
+      # @return [Hash<String => Array<Float>]
+      def previous_run
+        @previous_run ||= YAML.load_file(previous_runs_filename)
+      end
+
+      # @return [String] The path to the file which contains all the durations
+      #   for each test run. The previous runs file is in YAML format, using the
+      #   test name for the key and an array containing the time taken to run
+      #   this test for values.
+      def previous_runs_filename
+        options[:previous_runs_filename]
+      end
+
+      # Returns a boolean indicating whether a previous runs file exists.
+      #
+      # @return [Boolean]
+      def previously_ran?
+        File.exist?(previous_runs_filename)
+      end
+
+      # @return [String] The path to the file which contains the parsed test
+      #   results. The results file contains a line for each test with the
+      #   average time of the test, the minimum time the test took to run,
+      #   the maximum time the test took to run and a description of the test
+      #   (which is the test name as emitted by Minitest).
+      def report_filename
+        options[:report_filename]
+      end
+
+      # A barbaric way to find out how many runs are in the previous runs file;
+      # this method takes the first test listed, and counts its samples
+      # trusting (naively) all runs to be the same number of samples. This will
+      # produce incorrect averages when new tests are added, so it is advised
+      # to restart the statistics by removing the 'previous runs' file. A rake
+      # task is provided to make this more convenient.
+      #
+      #    rake reset_statistics
+      #
+      # @return [Fixnum]
+      def samples
+        return 1 unless previous_run.first[1].is_a?(Array)
+
+        previous_run.first[1].size
+      end
+
+      # Creates a new 'previous runs' file, or updates the existing one with
+      # the latest timings.
+      #
+      # @return [void]
+      def create_or_update_previous_runs!
+        if previously_ran?
+          current_run.each do |description, elapsed|
+            new_times = if previous_run[description.to_s]
+                          Array(previous_run[description.to_s]) << elapsed
+                        else
+                          Array(elapsed)
+                        end
+
+            previous_run.store(description.to_s, new_times)
+          end
+
+          File.write(previous_runs_filename, previous_run.to_yaml)
+
+        else
+
+          File.write(previous_runs_filename, current_run.to_yaml)
+
+        end
+      end
+
+      # Creates a new report file in the 'report_filename'. This file contains
+      # a line for each test of the following example format: (this is a single
+      # line despite explicit wrapping)
+      #
+      # Avg: 0.0555555 Min: 0.0498765 Max: 0.0612345 Last: 0.0499421
+      # Description: The test name
+      #
+      # Note however the timings are to 9 decimal places, and padded to 12
+      # characters and each label is coloured, Avg (yellow), Min (green),
+      # Max (red), Last (multi), and Description (blue). It looks pretty!
+      #
+      # The 'Last' label is special in that it will be colour coded depending
+      # on whether the last run was faster (bright green) or slower (bright red)
+      # or inconclusive (purple). This helps to identify changes on a per run
+      # basis.
+      #
+      # @return [void]
+      def create_new_report!
+        File.write(report_filename, report_title + report_body)
+      end
+
+      # Writes a number of tests (configured via the 'show_count' option) to the
+      # screen after creating the report. See '#create_new_report!' for example
+      # output information.
+      #
+      # @return [void]
+      def write_to_screen!
+        puts report_title
+        puts report_body.lines.take(show_count)
+      end
+
+      # @return [String] A yellow 'Avg:' label.
+      def avg_label
+        ANSI::Code.yellow('Avg:')
+      end
+
+      # @return [String] A blue 'Description:' label.
+      def des_label
+        ANSI::Code.blue('Description:')
+      end
+
+      # @return [String] A red 'Max:' label.
+      def max_label
+        ANSI::Code.red('Max:')
+      end
+
+      # @return [String] A green 'Min:' label.
+      def min_label
+        ANSI::Code.green('Min:')
+      end
+
+      # @param rating [Symbol] One of :faster, :slower or :inconclusive.
+      # @return [String] A purple 'Last:' label.
+      def run_label(rating)
+        case rating
+        when :faster then ANSI::Code.green('Last:')
+        when :slower then ANSI::Code.red('Last:')
+        else
+          ANSI::Code.magenta('Last:')
+        end
+      end
+
+      # @param run [Float] The last run time.
+      # @param min [Float] The minimum run time.
+      # @param max [Float] The maximum run time.
+      # @return [Symbol] One of :faster, :slower or :inconclusive.
+      def rate(run, min, max)
+        if run == min
+          :faster
+        elsif run == max
+          :slower
+        else
+          :inconclusive
+        end
+      end
+
+      # @return [Boolean] Whether the given :order option is :asc.
+      def asc?
+        order == :asc
+      end
+
+      # @return [Boolean] Whether the given :order option is :desc (default).
+      def desc?
+        order == :desc
+      end
+
+      # @raise [Minitest::Reporters::MeanTimeReporter::InvalidOrder]
+      #   When the given :order option is invalid.
+      # @return [Symbol] The :order option, or by default; :desc.
+      def order
+        orders = [:desc, :asc]
+
+        if orders.include?(options[:order])
+          options[:order]
+
+        else
+          fail Minitest::Reporters::MeanTimeReporter::InvalidOrder,
+               "`:order` option must be one of #{orders.inspect}."
+
+        end
+      end
+
+      # @raise [Minitest::Reporters::MeanTimeReporter::InvalidSortColumn]
+      #   When the given :sort_column option is invalid.
+      # @return [Symbol] The :sort_column option, or by default; :avg.
+      def sort_column
+        sort_columns = [:avg, :min, :max, :last]
+
+        if sort_columns.include?(options[:sort_column])
+          options[:sort_column]
+
+        else
+          fail Minitest::Reporters::MeanTimeReporter::InvalidSortColumn,
+               "`:sort_column` option must be one of #{sort_columns.inspect}."
+
+        end
+      end
+    end
+  end
+end
diff --git a/lib/minitest/reporters/progress_reporter.rb b/lib/minitest/reporters/progress_reporter.rb
index 17eb342..bb8acf4 100644
--- a/lib/minitest/reporters/progress_reporter.rb
+++ b/lib/minitest/reporters/progress_reporter.rb
@@ -13,20 +13,20 @@ module Minitest
       include RelativePosition
       include ANSI::Code
 
-      PROGRESS_MARK = '='
+      PROGRESS_MARK = '='.freeze
 
       def initialize(options = {})
         super
         @detailed_skip = options.fetch(:detailed_skip, true)
 
-        @progress = ProgressBar.create({
+        @progress = ProgressBar.create(
           total:          total_count,
           starting_at:    count,
           progress_mark:  green(PROGRESS_MARK),
           remainder_mark: ' ',
-          format:         '  %C/%c: [%B] %p%% %a, %e',
+          format:         options.fetch(:format, '  %C/%c: [%B] %p%% %a, %e'),
           autostart:      false
-        })
+        )
       end
 
       def start
@@ -38,9 +38,17 @@ module Minitest
         show
       end
 
+      def before_test(test)
+        super
+        if options[:verbose]
+          puts
+          puts("\n%s#%s" % [test_class(test), test.name])
+        end
+      end
+
       def record(test)
         super
-        return if test.skipped? && !@detailed_skip
+        return show if test.skipped? && !@detailed_skip
         if test.failure
           print "\e[0m\e[1000D\e[K"
           print_colored_status(test)
@@ -79,8 +87,7 @@ module Minitest
       end
 
       def print_test_with_time(test)
-        puts [test.name, test.class, total_time].inspect
-        print(" %s#%s (%.2fs)" % [test.name, test.class, total_time])
+        print(" %s#%s (%.2fs)" % [test_class(test), test.name, total_time])
       end
 
       def color
diff --git a/lib/minitest/reporters/rubymine_reporter.rb b/lib/minitest/reporters/rubymine_reporter.rb
index 5f88edb..0b120db 100644
--- a/lib/minitest/reporters/rubymine_reporter.rb
+++ b/lib/minitest/reporters/rubymine_reporter.rb
@@ -7,17 +7,19 @@ begin
   require 'teamcity/utils/runner_utils'
   require 'teamcity/utils/url_formatter'
 rescue LoadError
-  puts("====================================================================================================\n")
-  puts("RubyMine reporter works only if it test was launched using RubyMine IDE or TeamCity CI server !!!\n")
-  puts("====================================================================================================\n")
-  puts("Using default results reporter...\n")
-
   require "minitest/reporters/default_reporter"
 
   # delegate to default reporter
   module Minitest
     module Reporters
       class RubyMineReporter < DefaultReporter
+        def initialize(options = {})
+          super
+          puts("====================================================================================================\n")
+          puts("RubyMine reporter works only if it test was launched using RubyMine IDE or TeamCity CI server !!!\n")
+          puts("====================================================================================================\n")
+          puts("Using default results reporter...\n")
+        end
       end
     end
   end
@@ -46,7 +48,6 @@ else
           elsif ::Rake::TeamCity.is_in_buildserver_mode
             log(@message_factory.create_progress_message("Starting.. (#{total_count} tests)"))
           end
-
         end
 
         def report
@@ -61,9 +62,7 @@ else
 
         def record(test)
           super
-          if test.passed?
-            log(@message_factory.create_test_finished(test.name, get_time_in_ms(test.time)))
-          else
+          unless test.passed?
             with_result(test) do |exception_msg, backtrace|
               if test.skipped?
                 log(@message_factory.create_test_ignored(test.name, exception_msg, backtrace))
@@ -74,6 +73,7 @@ else
               end
             end
           end
+          log(@message_factory.create_test_finished(test.name, get_time_in_ms(test.time)))
         end
 
         alias_method :output, :io
@@ -89,8 +89,8 @@ else
 
         def before_test(test)
           super
-          fqn = "#{test.class.name}.#{test.name}"
-          log(@message_factory.create_test_started(test.name, minitest_test_location(fqn)))
+          location = test.class.instance_method(test.name).source_location
+          log(@message_factory.create_test_started(test.name, "file://#{location[0]}:#{location[1]}"))
         end
 
         #########
@@ -103,11 +103,6 @@ else
           msg
         end
 
-        def minitest_test_location(fqn)
-          return nil if (fqn.nil?)
-          "ruby_minitest_qn://#{fqn}"
-        end
-
         def with_result(test)
           exception = test.failure
           msg = exception.nil? ? "" : "#{exception.class.name}: #{exception.message}"
diff --git a/lib/minitest/reporters/spec_reporter.rb b/lib/minitest/reporters/spec_reporter.rb
index 68865e2..6434cf0 100644
--- a/lib/minitest/reporters/spec_reporter.rb
+++ b/lib/minitest/reporters/spec_reporter.rb
@@ -10,6 +10,16 @@ module Minitest
       include ANSI::Code
       include RelativePosition
 
+      # The constructor takes an `options` hash
+      # @param options [Hash]
+      # @option options print_failure_summary [Boolean] wether to print the errors at the bottom of the
+      #   report or inline as they happen.
+      #
+      def initialize(options = {})
+        super
+        @print_failure_summary = options[:print_failure_summary]
+      end
+
       def start
         super
         puts('Started with run options %s' % options[:args])
@@ -18,6 +28,17 @@ module Minitest
 
       def report
         super
+        if @print_failure_summary
+          failed_test_groups = tests.reject { |test| test.failures.empty? }
+                                    .sort_by { |test| [test_class(test).to_s, test.name] }
+                                    .group_by { |test| test_class(test).to_s }
+          unless failed_test_groups.empty?
+            print(red('Failures and errors:'))
+
+            failed_test_groups.each { |name, tests| print_failure(name, tests) }
+          end
+        end
+
         puts('Finished in %.5fs' % total_time)
         print('%d tests, %d assertions, ' % [count, assertions])
         color = failures.zero? && errors.zero? ? :green : :red
@@ -28,15 +49,8 @@ module Minitest
 
       def record(test)
         super
-        test.name.gsub!(/^test_:/, 'test:')
-        print pad_test(test.name)
-        print_colored_status(test)
-        print(" (%.2fs)" % test.time) unless test.time.nil?
-        puts
-        if !test.skipped? && test.failure
-          print_info(test.failure)
-          puts
-        end
+        record_print_status(test)
+        record_print_failures_if_any(test) unless @print_failure_summary
       end
 
       protected
@@ -45,7 +59,32 @@ module Minitest
         puts suite
       end
 
-      def after_suite(suite)
+      def after_suite(_suite)
+        puts
+      end
+
+      def print_failure(name, tests)
+        puts
+        puts name
+        tests.each do |test|
+          record_print_status(test)
+          print_info(test.failure, test.error?)
+          puts
+        end
+      end
+
+      def record_print_failures_if_any(test)
+        if !test.skipped? && test.failure
+          print_info(test.failure, test.error?)
+          puts
+        end
+      end
+
+      def record_print_status(test)
+        test_name = test.name.gsub(/^test_: /, 'test:')
+        print pad_test(test_name)
+        print_colored_status(test)
+        print(" (%.2fs)" % test.time) unless test.time.nil?
         puts
       end
     end
diff --git a/lib/minitest/reporters/version.rb b/lib/minitest/reporters/version.rb
index b0f1eb1..f770fd4 100644
--- a/lib/minitest/reporters/version.rb
+++ b/lib/minitest/reporters/version.rb
@@ -1,5 +1,5 @@
 module Minitest
   module Reporters
-    VERSION = '1.0.19'
+	VERSION = '1.6.0'.freeze
   end
 end
diff --git a/lib/minitest/templates/index.html.erb b/lib/minitest/templates/index.html.erb
index 58e17cf..77ec082 100644
--- a/lib/minitest/templates/index.html.erb
+++ b/lib/minitest/templates/index.html.erb
@@ -11,7 +11,9 @@
 <body>
 <div class="container">
     <div class="jumbotron">
-        <h1><%= title %></h1>
+        <h3><small>Generated on <%= Time.now.strftime("%b %d, %Y at %H:%M %Z") %></small></h3>
+        <h1>
+            <%= title %></h1>
         <p>
             Finished in <%= total_time_to_hms %>, <%= '%.2f tests/s' % (count / total_time) %>, <%= '%.2f assertions/s' % (assertions / total_time) %>
         </p>
@@ -32,8 +34,8 @@
             <div class="progress-bar progress-bar-danger" style="width: <%= percent_errors_failures %>%">
                 <%= '%d' % percent_errors_failures %>% failed
             </div>
-            <div class="progress-bar progress-bar-warning" style="width: <%= percent_skipps %>%">
-                <%= '%d' % percent_skipps %>% skipped
+            <div class="progress-bar progress-bar-warning" style="width: <%= percent_skips %>%">
+                <%= '%d' % percent_skips %>% skipped
             </div>
         </div>
 
@@ -80,4 +82,4 @@
     <% end %>
 </div>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/metadata.yml b/metadata.yml
deleted file mode 100644
index f3f54ca..0000000
--- a/metadata.yml
+++ /dev/null
@@ -1,179 +0,0 @@
---- !ruby/object:Gem::Specification
-name: minitest-reporters
-version: !ruby/object:Gem::Version
-  version: 1.0.19
-platform: ruby
-authors:
-- Alexander Kern
-autorequire: 
-bindir: bin
-cert_chain: []
-date: 2015-07-16 00:00:00.000000000 Z
-dependencies:
-- !ruby/object:Gem::Dependency
-  name: minitest
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '5.0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '5.0'
-- !ruby/object:Gem::Dependency
-  name: ansi
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: ruby-progressbar
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: builder
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: maruku
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: rake
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-description: Death to haphazard monkey-patching! Extend Minitest through simple hooks.
-email:
-- alex@kernul.com
-executables: []
-extensions: []
-extra_rdoc_files: []
-files:
-- ".gitignore"
-- ".ruby-gemset"
-- ".travis.yml"
-- ".yardopts"
-- Gemfile
-- LICENSE
-- README.md
-- Rakefile
-- assets/default-reporter.png
-- assets/progress-reporter.png
-- assets/spec-reporter.png
-- lib/minitest/extensible_backtrace_filter.rb
-- lib/minitest/minitest_reporter_plugin.rb
-- lib/minitest/old_activesupport_fix.rb
-- lib/minitest/relative_position.rb
-- lib/minitest/reporters.rb
-- lib/minitest/reporters/ansi.rb
-- lib/minitest/reporters/base_reporter.rb
-- lib/minitest/reporters/default_reporter.rb
-- lib/minitest/reporters/html_reporter.rb
-- lib/minitest/reporters/junit_reporter.rb
-- lib/minitest/reporters/progress_reporter.rb
-- lib/minitest/reporters/ruby_mate_reporter.rb
-- lib/minitest/reporters/rubymine_reporter.rb
-- lib/minitest/reporters/spec_reporter.rb
-- lib/minitest/reporters/version.rb
-- lib/minitest/templates/index.html.erb
-- minitest-reporters.gemspec
-- test/fixtures/junit_filename_bug_example_test.rb
-- test/fixtures/progress_detailed_skip_test.rb
-- test/fixtures/progress_test.rb
-- test/fixtures/sample_test.rb
-- test/gallery/bad_test.rb
-- test/gallery/good_test.rb
-- test/integration/reporters/junit_reporter_test.rb
-- test/integration/reporters/progress_reporter_test.rb
-- test/test_helper.rb
-- test/unit/minitest/extensible_backtrace_filter_test.rb
-- test/unit/minitest/reporters_test.rb
-- test/unit/minitest/spec_reporter_test.rb
-homepage: https://github.com/CapnKernul/minitest-reporters
-licenses: []
-metadata: {}
-post_install_message: 
-rdoc_options: []
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: 1.9.3
-required_rubygems_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: '0'
-requirements: []
-rubyforge_project: minitest-reporters
-rubygems_version: 2.4.5
-signing_key: 
-specification_version: 4
-summary: Create customizable Minitest output formats
-test_files:
-- test/fixtures/junit_filename_bug_example_test.rb
-- test/fixtures/progress_detailed_skip_test.rb
-- test/fixtures/progress_test.rb
-- test/fixtures/sample_test.rb
-- test/gallery/bad_test.rb
-- test/gallery/good_test.rb
-- test/integration/reporters/junit_reporter_test.rb
-- test/integration/reporters/progress_reporter_test.rb
-- test/test_helper.rb
-- test/unit/minitest/extensible_backtrace_filter_test.rb
-- test/unit/minitest/reporters_test.rb
-- test/unit/minitest/spec_reporter_test.rb
diff --git a/minitest-reporters.gemspec b/minitest-reporters.gemspec
index 09de582..535215d 100644
--- a/minitest-reporters.gemspec
+++ b/minitest-reporters.gemspec
@@ -11,9 +11,9 @@ Gem::Specification.new do |s|
   s.homepage    = 'https://github.com/CapnKernul/minitest-reporters'
   s.summary     = %q{Create customizable Minitest output formats}
   s.description = %q{Death to haphazard monkey-patching! Extend Minitest through simple hooks.}
+  s.license     = 'MIT'
 
   s.required_ruby_version = '>= 1.9.3'
-  s.rubyforge_project = 'minitest-reporters'
 
   s.add_dependency 'minitest', '>= 5.0'
   s.add_dependency 'ansi'
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
 
   s.add_development_dependency 'maruku'
   s.add_development_dependency 'rake'
+  s.add_development_dependency 'rubocop'
 
   s.files         = `git ls-files`.split("\n")
   s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
diff --git a/test/fixtures/junit_filename_bug_example_test.rb b/test/fixtures/junit_filename_bug_example_test.rb
index 70c16df..abf4fed 100644
--- a/test/fixtures/junit_filename_bug_example_test.rb
+++ b/test/fixtures/junit_filename_bug_example_test.rb
@@ -13,3 +13,29 @@ describe 'something/other' do
     1.must_equal 1
   end
 end
+
+describe 'something/other' do
+  it 'does something else' do
+    1.must_equal 2
+  end
+end
+
+class Eval
+  class Issue258Tset < Minitest::Test
+    def test_true
+      assert true
+    end
+
+    [
+        ["bool1", "true", "true"],
+        ["bool2", "false", "false"]
+    ].each do |a|
+      (type, expectation1, expectation2) = a
+      eval(%{
+       def test_eval_#{type}_#{expectation1}
+         assert_equal(#{expectation1}, #{expectation2})
+       end
+      })
+    end
+  end
+end
diff --git a/test/fixtures/mean_time_test.rb b/test/fixtures/mean_time_test.rb
new file mode 100644
index 0000000..2c3ab2d
--- /dev/null
+++ b/test/fixtures/mean_time_test.rb
@@ -0,0 +1,36 @@
+require 'bundler/setup'
+require 'minitest/autorun'
+require 'minitest/reporters'
+require 'minitest/reporters/mean_time_reporter'
+
+Minitest::Reporters.use! Minitest::Reporters::MeanTimeReporter.new
+
+class TestClass < Minitest::Test
+  def test_assertion
+    assert true
+  end
+
+  def test_fail
+    fail
+  end
+end
+
+class AnotherTestClass < Minitest::Test
+  def test_assertion
+    assert true
+  end
+
+  def test_fail
+    fail
+  end
+end
+
+class LastTestClass < Minitest::Test
+  def test_assertion
+    assert true
+  end
+
+  def test_fail
+    fail
+  end
+end
diff --git a/test/fixtures/spec_test.rb b/test/fixtures/spec_test.rb
new file mode 100644
index 0000000..dc713c1
--- /dev/null
+++ b/test/fixtures/spec_test.rb
@@ -0,0 +1,18 @@
+require 'bundler/setup'
+require 'minitest'
+require 'minitest/reporters'
+require 'minitest/autorun'
+
+Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
+
+describe String do
+  describe '#length' do
+    it 'works' do
+      assert_equal 5, 'hello'.length
+    end
+
+    it 'doesn\'t works' do
+      assert_equal 6, 'hello'.length
+    end
+  end
+end
diff --git a/test/integration/reporters/mean_time_reporter_test.rb b/test/integration/reporters/mean_time_reporter_test.rb
new file mode 100644
index 0000000..4e1bec7
--- /dev/null
+++ b/test/integration/reporters/mean_time_reporter_test.rb
@@ -0,0 +1,7 @@
+require_relative "../../test_helper"
+
+module MinitestReportersTest
+  class MeanTimeReporterTest < TestCase
+
+  end
+end
diff --git a/test/integration/reporters/progress_reporter_test.rb b/test/integration/reporters/progress_reporter_test.rb
index 5677d8c..35a51d9 100644
--- a/test/integration/reporters/progress_reporter_test.rb
+++ b/test/integration/reporters/progress_reporter_test.rb
@@ -5,18 +5,36 @@ module MinitestReportersTest
     def test_all_failures_are_displayed
       fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
       test_filename = File.join(fixtures_directory, 'progress_test.rb')
-      output = `ruby #{test_filename} 2>&1`
-      assert_match 'ERROR["test_error"', output, 'Errors should be displayed'
-      assert_match 'FAIL["test_failure"', output, 'Failures should be displayed'
-      assert_match 'SKIP["test_skip', output, 'Skipped tests should be displayed'
+      output = `#{ruby_executable} #{test_filename} 2>&1`
+      assert_match 'test_error', output, 'Errors should be displayed'
+      assert_match 'test_failure', output, 'Failures should be displayed'
+      assert_match 'test_skip', output, 'Skipped tests should be displayed'
     end
     def test_skipped_tests_are_not_displayed
       fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
       test_filename = File.join(fixtures_directory, 'progress_detailed_skip_test.rb')
-      output = `ruby #{test_filename} 2>&1`
-      assert_match 'ERROR["test_error"', output, 'Errors should be displayed'
-      assert_match 'FAIL["test_failure"', output, 'Failures should be displayed'
-      refute_match 'SKIP["test_skip', output, 'Skipped tests should not be displayed'
+      output = `#{ruby_executable} #{test_filename} 2>&1`
+      assert_match 'test_error', output, 'Errors should be displayed'
+      assert_match 'test_failure', output, 'Failures should be displayed'
+      refute_match 'test_skip', output, 'Skipped tests should not be displayed'
+    end
+    def test_progress_works_with_filter_and_specs
+      fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
+      test_filename = File.join(fixtures_directory, 'spec_test.rb')
+      output = `#{ruby_executable} #{test_filename} -n /length/ 2>&1`
+      refute_match '0 out of 0', output, 'Progress should not puts a warning'
+    end
+    def test_progress_works_with_strict_filter
+      fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
+      test_filename = File.join(fixtures_directory, 'spec_test.rb')
+      output = `#{ruby_executable} #{test_filename} -n /^test_0001_works$/ 2>&1`
+      refute_match '0 out of 0', output, 'Progress should not puts a warning'
+    end
+
+    private
+
+    def ruby_executable
+      defined?(JRUBY_VERSION) ? 'jruby' : 'ruby'
     end
   end
 end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 0ef1a24..2a5788d 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -2,6 +2,7 @@ require "bundler/setup"
 require "minitest/autorun"
 require "minitest/reporters"
 
+ENV['MINITEST_REPORTERS_MONO'] = 'yes'
 module MinitestReportersTest
   class TestCase < Minitest::Test
   end
diff --git a/test/unit/minitest/junit_reporter_test.rb b/test/unit/minitest/junit_reporter_test.rb
new file mode 100644
index 0000000..60b856b
--- /dev/null
+++ b/test/unit/minitest/junit_reporter_test.rb
@@ -0,0 +1,46 @@
+require_relative "../../test_helper"
+
+module MinitestReportersTest
+  class JUnitReporterUnitTest < Minitest::Test
+    def setup
+      @reporter = Minitest::Reporters::JUnitReporter.new(
+          "report",
+          false,
+          :base_apath => Dir.pwd
+      )
+      @result = Minitest::Result.new("test_name")
+    end
+
+    def test_relative_path
+      path = Pathname.new(__FILE__).relative_path_from(Pathname.new(Dir.pwd)).to_s
+      @result.source_location = [path, 10]
+      relative_path = @reporter.get_relative_path(@result)
+      assert_equal path, relative_path.to_s
+    end
+
+    def test_defaults_reports_path
+      reporter = Minitest::Reporters::JUnitReporter.new
+      expected_reports_dir = Minitest::Reporters::JUnitReporter::DEFAULT_REPORTS_DIR
+      expected_reports_path = File.absolute_path(expected_reports_dir)
+      assert_equal expected_reports_path, reporter.reports_path
+    end
+
+    def test_accepts_custom_report_dir_using_env
+      expected_reports_dir = "test_reports"
+      expected_reports_path = File.absolute_path(expected_reports_dir)
+      with_env("MINITEST_REPORTERS_REPORTS_DIR" => expected_reports_dir) do
+        reporter = Minitest::Reporters::JUnitReporter.new
+        assert_equal expected_reports_path, reporter.reports_path
+      end
+    end
+
+    private
+
+    def with_env(hash)
+      original_env = ENV.to_hash
+      ENV.update(hash)
+      yield
+      ENV.replace(original_env)
+    end
+  end
+end
diff --git a/test/unit/minitest/mean_time_reporter_unit_test.rb b/test/unit/minitest/mean_time_reporter_unit_test.rb
new file mode 100644
index 0000000..e0ab204
--- /dev/null
+++ b/test/unit/minitest/mean_time_reporter_unit_test.rb
@@ -0,0 +1,149 @@
+require_relative '../../test_helper'
+
+module MinitestReportersTest
+  class MeanTimeReporterUnitTest < Minitest::Test
+    def setup
+      @test_data = []
+      @test_data << { name: 'MIDDLE',  prev_time: 5.0,  cur_time: 5.0 }
+      @test_data << { name: 'MIN_FAST', prev_time: 0.5,  cur_time: 3.5 }
+      @test_data << { name: 'MIN_SLOW', prev_time: 10.5, cur_time: 10.5 }
+      @test_data << { name: 'MAX_FAST', prev_time: 1.2,  cur_time: 0.9 }
+      @test_data << { name: 'MAX_SLOW', prev_time: 16.3, cur_time: 6.3 }
+      @test_data << { name: 'AVG_FAST', prev_time: 1.3,  cur_time: 0.65 }
+      @test_data << { name: 'AVG_SLOW', prev_time: 10.2, cur_time: 14.2 }
+      configure_report_paths
+    end
+
+    def teardown
+      File.delete(@previous_run_path) if File.exist?(@previous_run_path)
+      File.delete(@report_file_path) if File.exist?(@report_file_path)
+    end
+
+    def test_defaults
+      subject = Minitest::Reporters::MeanTimeReporter.new.send(:defaults)
+
+      expected_prefix = "#{Dir.tmpdir}#{File::Separator}"
+      assert_match expected_prefix, subject[:previous_runs_filename]
+      assert_match expected_prefix, subject[:report_filename]
+    end
+
+    def test_sorts_avg_numerically
+      prev_output = generate_report(:avg, :prev_time)
+      report_output = generate_report(:avg, :cur_time)
+
+      expected_order = [
+        'AVG_SLOW',
+        'MAX_SLOW',
+        'MIN_SLOW',
+        'MIDDLE',
+        'MIN_FAST',
+        'MAX_FAST',
+        'AVG_FAST'
+      ]
+      verify_result_order(report_output, expected_order, prev_output)
+    end
+
+    def test_sorts_min_numerically
+      prev_output = generate_report(:min, :prev_time)
+      report_output = generate_report(:min, :cur_time)
+
+      expected_order = [
+        'MIN_SLOW',
+        'AVG_SLOW',
+        'MAX_SLOW',
+        'MIDDLE',
+        'MAX_FAST',
+        'AVG_FAST',
+        'MIN_FAST'
+      ]
+      verify_result_order(report_output, expected_order, prev_output)
+    end
+
+    def test_sorts_max_numerically
+      prev_output = generate_report(:max, :prev_time)
+      report_output = generate_report(:max, :cur_time)
+
+      expected_order = [
+        'MAX_SLOW',
+        'AVG_SLOW',
+        'MIN_SLOW',
+        'MIDDLE',
+        'MIN_FAST',
+        'AVG_FAST',
+        'MAX_FAST'
+      ]
+      verify_result_order(report_output, expected_order, prev_output)
+    end
+
+    def test_sorts_last_numerically
+      prev_output = generate_report(:last, :prev_time)
+      report_output = generate_report(:last, :cur_time)
+
+      expected_order = [
+        'AVG_SLOW',
+        'MIN_SLOW',
+        'MAX_SLOW',
+        'MIDDLE',
+        'MIN_FAST',
+        'MAX_FAST',
+        'AVG_FAST'
+      ]
+      verify_result_order(report_output, expected_order, prev_output)
+    end
+
+    private
+
+    def simulate_suite_runtime(suite_name, run_time)
+      test_suite = Minitest::Test.new(suite_name)
+      base_clock_time = Minitest::Reporters.clock_time
+      Minitest::Reporters.stub(:clock_time, base_clock_time - run_time) do
+        @reporter.before_suite(test_suite)
+      end
+      Minitest::Reporters.stub(:clock_time, base_clock_time) do
+        @reporter.after_suite(test_suite)
+      end
+    end
+
+    def configure_report_paths
+      @previous_run_path = File.expand_path("../minitest-mean-time-previous-runs",  File.realpath(__FILE__))
+      File.delete(@previous_run_path) if File.exist?(@previous_run_path)
+      @report_file_path = File.expand_path("../minitest-mean-time-report",  File.realpath(__FILE__))
+      File.delete(@report_file_path) if File.exist?(@report_file_path)
+    end
+
+    def generate_report(sort_column, time_name)
+      # Reset the reporter for the test run
+      @reporter = Minitest::Reporters::MeanTimeReporter.new(
+        previous_runs_filename: @previous_run_path,
+        report_filename: @report_file_path,
+        sort_column: sort_column
+      )
+      @test_data.each { |hash| simulate_suite_runtime(hash[:name], hash[time_name])}
+      @reporter.tests << Minitest::Test.new('Final')
+
+      report_output = StringIO.new
+      @reporter.io = report_output
+      @reporter.start
+      @reporter.report
+      report_output
+    end
+
+    def verify_result_order(report_output, expected_order, prev_output)
+      prev_lines = extract_test_lines(prev_output)
+      test_lines = extract_test_lines(report_output)
+
+      actual_order = test_lines.map { |line| line.gsub(/.*Description: /, '') }
+
+      assert_equal(expected_order, actual_order, "\nCurrent report:\n#{test_lines.join("\n")}\n\nPrevious report:\n#{prev_lines.join("\n")}")
+    end
+
+    def extract_test_lines(report_output)
+      report_output.rewind
+      test_lines = report_output.read.split("\n")
+      test_lines.select! {|line| line.start_with?('Avg:')}
+      # Exclude the final placeholder 0 second test from assertions
+      test_lines.reject! {|line| line.end_with?('Minitest::Test')}
+      test_lines
+    end
+  end
+end
diff --git a/test/unit/minitest/minitest_reporter_plugin_test.rb b/test/unit/minitest/minitest_reporter_plugin_test.rb
new file mode 100644
index 0000000..897b973
--- /dev/null
+++ b/test/unit/minitest/minitest_reporter_plugin_test.rb
@@ -0,0 +1,14 @@
+require_relative "../../test_helper"
+
+module MinitestReportersTest
+  class MinitestReporterPluginTest < Minitest::Test
+    def test_delegates_io
+      reporter = Minitest::Reporters::DefaultReporter.new
+      io_handle = STDOUT
+      dr = Minitest::Reporters::DelegateReporter.new([ reporter ], :io => io_handle)
+      assert_equal io_handle, dr.io
+      dr.send :all_reporters
+      assert_equal io_handle, reporter.io
+    end
+  end
+end
diff --git a/test/unit/minitest/reporters_test.rb b/test/unit/minitest/reporters_test.rb
index 20487cc..0545022 100644
--- a/test/unit/minitest/reporters_test.rb
+++ b/test/unit/minitest/reporters_test.rb
@@ -28,7 +28,38 @@ module MinitestReportersTest
     def test_chooses_no_reporters_when_running_under_vim
       reporters = Minitest::Reporters.choose_reporters(
         [Minitest::Reporters::DefaultReporter.new], { "VIM" => "/usr/share/vim" })
-      assert_equal nil, reporters
+      assert_nil reporters
+    end
+
+    def test_chooses_given_reporter_when_MINITEST_REPORTERS_env_set
+      env = {
+        "MINITEST_REPORTER" => "JUnitReporter", 
+        "RM_INFO" => "x", 
+        "TEAMCITY_VERSION" => "x", 
+        "TM_PID" => "x" }
+      # JUnit reporter init has stdout messages... capture them to keep test output clean
+      $stdout.stub :puts, nil do
+        reporters = Minitest::Reporters.choose_reporters [], env
+        assert_instance_of Minitest::Reporters::JUnitReporter, reporters[0]
+      end
+    end
+
+    def test_uses_minitest_clock_time_when_minitest_version_greater_than_561
+      Minitest::Reporters.stub :minitest_version, 583 do
+        Minitest.stub :clock_time, 6765.378751009 do
+          clock_time = Minitest::Reporters.clock_time
+          assert_equal 6765.378751009, clock_time
+        end
+      end
+    end
+
+    def test_uses_minitest_clock_time_when_minitest_version_less_than_561
+      Minitest::Reporters.stub :minitest_version, 431 do
+        Time.stub :now, Time.new(2015, 11, 20, 17, 35) do
+          clock_time = Minitest::Reporters.clock_time
+          assert_equal Time.new(2015, 11, 20, 17, 35), clock_time
+        end
+      end
     end
   end
 end
diff --git a/test/unit/minitest/spec_reporter_test.rb b/test/unit/minitest/spec_reporter_test.rb
index d7b9d62..8e7a0c5 100644
--- a/test/unit/minitest/spec_reporter_test.rb
+++ b/test/unit/minitest/spec_reporter_test.rb
@@ -10,7 +10,7 @@ module MinitestReportersTest
 
     def test_removes_underscore_in_name_if_shoulda
       @test.name = "test_: Should foo"
-      assert_output /test:/ do
+      assert_output(/test:/) do
         @reporter.io = $stdout
         @reporter.record(@test)
       end
@@ -18,10 +18,45 @@ module MinitestReportersTest
 
     def test_wont_modify_name_if_not_shoulda
       @test.name = "test_foo"
-      assert_output /test_foo/ do
+      assert_output(/test_foo/) do
         @reporter.io = $stdout
         @reporter.record(@test)
       end
     end
+
+    def test_responds_to_test_name_after_record
+      test_name = 'test_: Should foo'
+      the_test_class = Class.new(Minitest::Test) do
+        define_method test_name do
+          assert(false)
+        end
+      end
+      the_test = the_test_class.new('')
+      the_test.name = test_name
+      @reporter.io = StringIO.new
+      @reporter.record(the_test)
+      assert_respond_to the_test, the_test.name
+    end
+
+    def test_report_for_describe_not_using_const
+      klass = describe("whatever") { it("passes") { assert true } }
+      runnable = klass.runnable_methods.first
+      @reporter.io = StringIO.new
+
+      # Run the test
+      result = klass.new(runnable).run
+      @reporter.start
+      @reporter.record(result)
+
+      error_msg = nil
+      begin
+        @reporter.report
+      rescue => e
+        error_msg = "error executing @reporter.report, #{e}"
+      end
+
+      refute error_msg, error_msg
+    end
   end
 end
+

More details

Full run details