minitest-rerun-failed 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +0 -12
- data/.rubocop.yml +4 -23
- data/.ruby-version +1 -1
- data/CHANGELOG.md +5 -3
- data/Gemfile +1 -1
- data/Gemfile.lock +39 -4
- data/README.md +3 -2
- data/Rakefile +1 -1
- data/bin/rubocop +29 -0
- data/lib/minitest_rerun_failed/failed_tests_reporter.rb +13 -9
- data/lib/minitest_rerun_failed/version.rb +1 -1
- data/minitest_rerun_failed.gemspec +6 -6
- data/script/release_gem.sh +4 -0
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3adfc832ada93bb9bca1e3ed6dd360caf064469bdef4edd9e00e4946d011848b
|
4
|
+
data.tar.gz: b57acf4d4c31754c6eb13f9dba689474099bd65aac8d6fe113bdab7adf5e3cb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a54c9bcb566cf506b82c1b2df723f9d195c0a2bfab99ea62cb72d3d17b63707af2b73e5d7f438d901b7b5e7efbd6bdf579469133386e902bfd616eaa220cbd5
|
7
|
+
data.tar.gz: 61be4322288e6d8473495ba4378a694e3e2d556b5691910b3db15f944e89a1844baedfdf4553c7f31ff6bfc888cd3e8dd76ed82d3203b71c23dbdadfba5bf15d
|
data/.github/workflows/main.yml
CHANGED
@@ -26,15 +26,3 @@ jobs:
|
|
26
26
|
bundler-cache: true
|
27
27
|
- name: Run rake test
|
28
28
|
run: bundle exec rake test
|
29
|
-
|
30
|
-
rake_test_ruby_2_6:
|
31
|
-
runs-on: ubuntu-latest
|
32
|
-
steps:
|
33
|
-
- uses: actions/checkout@v2
|
34
|
-
- name: Set up Ruby
|
35
|
-
uses: ruby/setup-ruby@v1
|
36
|
-
with:
|
37
|
-
ruby-version: 2.6.8
|
38
|
-
bundler-cache: true
|
39
|
-
- name: Run rake test
|
40
|
-
run: bundle exec rake test
|
data/.rubocop.yml
CHANGED
@@ -1,24 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# Omakase Ruby styling for Rails
|
2
|
+
inherit_gem:
|
3
|
+
rubocop-rails-omakase: rubocop.yml
|
4
4
|
|
5
|
-
|
6
|
-
Enabled: true
|
7
|
-
EnforcedStyle: double_quotes
|
8
|
-
|
9
|
-
Style/StringLiteralsInInterpolation:
|
10
|
-
Enabled: true
|
11
|
-
EnforcedStyle: double_quotes
|
12
|
-
|
13
|
-
Layout/LineLength:
|
14
|
-
Enabled: true
|
15
|
-
Max: 200
|
16
|
-
|
17
|
-
Metrics/MethodLength:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
Metrics/AbcSize:
|
21
|
-
Max: 19
|
22
|
-
|
23
|
-
Style/ConditionalAssignment:
|
24
|
-
Enabled: false
|
5
|
+
# Your own specialized rules go here
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.3.0
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
## [0.2.
|
1
|
+
## [0.2.2] - 2024-04-20
|
2
|
+
- Changed: Also strip file paths when writing to .minitest_failed_tests.txt
|
3
|
+
|
4
|
+
## [0.2.1] - 2023-03-31
|
5
|
+
- Fixed: Strip leading whitespace from failure locations in output
|
2
6
|
- Set dependency versions with >= so they do not enforce old versions
|
3
7
|
|
4
8
|
## [0.2.0] - 2021-09-12
|
@@ -9,5 +13,3 @@
|
|
9
13
|
- Outputs to console
|
10
14
|
- Outputs to file
|
11
15
|
- Rerun must be done semi-manually via something like `bundle exec rails test $(cat .minitest_failed_tests.txt)`
|
12
|
-
|
13
|
-
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,25 +1,44 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
minitest-rerun-failed (0.2.
|
5
|
-
minitest (>= 5.0.0)
|
6
|
-
minitest-reporters (>= 1.4.0)
|
4
|
+
minitest-rerun-failed (0.2.2)
|
5
|
+
minitest (~> 5.0, >= 5.0.0)
|
6
|
+
minitest-reporters (~> 1.4, >= 1.4.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
+
activesupport (7.1.3.2)
|
12
|
+
base64
|
13
|
+
bigdecimal
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
|
+
connection_pool (>= 2.2.5)
|
16
|
+
drb
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
mutex_m
|
20
|
+
tzinfo (~> 2.0)
|
11
21
|
ansi (1.5.0)
|
12
22
|
ast (2.4.2)
|
23
|
+
base64 (0.2.0)
|
24
|
+
bigdecimal (3.1.7)
|
13
25
|
builder (3.2.4)
|
26
|
+
concurrent-ruby (1.2.3)
|
27
|
+
connection_pool (2.4.1)
|
28
|
+
drb (2.2.1)
|
29
|
+
i18n (1.14.4)
|
30
|
+
concurrent-ruby (~> 1.0)
|
14
31
|
minitest (5.14.4)
|
15
32
|
minitest-reporters (1.4.3)
|
16
33
|
ansi
|
17
34
|
builder
|
18
35
|
minitest (>= 5.0)
|
19
36
|
ruby-progressbar
|
37
|
+
mutex_m (0.2.0)
|
20
38
|
parallel (1.20.1)
|
21
39
|
parser (3.0.2.0)
|
22
40
|
ast (~> 2.4.1)
|
41
|
+
rack (3.0.10)
|
23
42
|
rainbow (3.0.0)
|
24
43
|
rake (13.0.6)
|
25
44
|
regexp_parser (2.1.1)
|
@@ -37,12 +56,28 @@ GEM
|
|
37
56
|
parser (>= 3.0.1.1)
|
38
57
|
rubocop-minitest (0.15.0)
|
39
58
|
rubocop (>= 0.90, < 2.0)
|
59
|
+
rubocop-performance (1.19.1)
|
60
|
+
rubocop (>= 1.7.0, < 2.0)
|
61
|
+
rubocop-ast (>= 0.4.0)
|
62
|
+
rubocop-rails (2.15.2)
|
63
|
+
activesupport (>= 4.2.0)
|
64
|
+
rack (>= 1.1)
|
65
|
+
rubocop (>= 1.7.0, < 2.0)
|
66
|
+
rubocop-rails-omakase (1.0.0)
|
67
|
+
rubocop
|
68
|
+
rubocop-minitest
|
69
|
+
rubocop-performance
|
70
|
+
rubocop-rails
|
40
71
|
rubocop-rake (0.6.0)
|
41
72
|
rubocop (~> 1.0)
|
42
73
|
ruby-progressbar (1.11.0)
|
74
|
+
tzinfo (2.0.6)
|
75
|
+
concurrent-ruby (~> 1.0)
|
43
76
|
unicode-display_width (2.0.0)
|
44
77
|
|
45
78
|
PLATFORMS
|
79
|
+
arm64-darwin-21
|
80
|
+
arm64-darwin-22
|
46
81
|
x86_64-darwin-19
|
47
82
|
x86_64-darwin-20
|
48
83
|
x86_64-linux
|
@@ -52,8 +87,8 @@ DEPENDENCIES
|
|
52
87
|
minitest-reporters
|
53
88
|
minitest-rerun-failed!
|
54
89
|
rake
|
55
|
-
rubocop
|
56
90
|
rubocop-minitest
|
91
|
+
rubocop-rails-omakase
|
57
92
|
rubocop-rake
|
58
93
|
|
59
94
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -92,8 +92,9 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/houen/
|
|
92
92
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
93
93
|
|
94
94
|
## TODO
|
95
|
-
-
|
96
|
-
-
|
95
|
+
- Better workflow for rerunning tests
|
96
|
+
- Executable for rerun? (https://stackoverflow.com/a/65707495)
|
97
|
+
- Rerun with same seed
|
97
98
|
- Minitest-reporters or minitest plugin?
|
98
99
|
|
99
100
|
https://stackoverflow.com/questions/19910533/minitest-rerun-only-failed-tests
|
data/Rakefile
CHANGED
data/bin/rubocop
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rubocop", "rubocop")
|
@@ -68,13 +68,15 @@ module Minitest
|
|
68
68
|
tmp_haystack << test.failure.location
|
69
69
|
tmp_haystack << test.to_s
|
70
70
|
# Add filtered backtrace unless it is an unexpected error, which do not have a useful trace
|
71
|
-
tmp_haystack << filter_backtrace(test.failure.backtrace).join unless test.failure.is_a?(
|
71
|
+
tmp_haystack << filter_backtrace(test.failure.backtrace).join unless test.failure.is_a?(Minitest::UnexpectedError)
|
72
72
|
|
73
73
|
# Get failure location as best we can from haystack
|
74
74
|
if @include_line_numbers
|
75
|
-
|
75
|
+
regex_keeping_line_numbers = /(.+_test\.rb:[0-9]+)/
|
76
|
+
failure_file_location = tmp_haystack.join[regex_keeping_line_numbers, 1]
|
76
77
|
else
|
77
|
-
|
78
|
+
regex_removing_line_numbers = /(.+_test\.rb):[0-9]+/
|
79
|
+
failure_file_location = tmp_haystack.join[regex_removing_line_numbers, 1]
|
78
80
|
end
|
79
81
|
|
80
82
|
return unless failure_file_location
|
@@ -83,7 +85,7 @@ module Minitest
|
|
83
85
|
failure_file_location.gsub!(curdir, "")
|
84
86
|
failure_file_location.gsub!(%r{^/}, "")
|
85
87
|
|
86
|
-
failure_file_location
|
88
|
+
failure_file_location.to_s.strip
|
87
89
|
end
|
88
90
|
|
89
91
|
def output_results(failure_paths, file_output)
|
@@ -92,9 +94,11 @@ module Minitest
|
|
92
94
|
_puts("")
|
93
95
|
headline = @include_line_numbers ? "Failed tests: #{failure_paths.count} (seed #{@options[:seed]}):" : "Failed test files: #{failure_paths.count} (seed #{@options[:seed]}):"
|
94
96
|
_puts(headline)
|
97
|
+
|
95
98
|
failure_paths.uniq.each do |file_path|
|
96
|
-
|
97
|
-
|
99
|
+
stripped_path = file_path.strip
|
100
|
+
file_output << stripped_path
|
101
|
+
_puts color_red(stripped_path)
|
98
102
|
end
|
99
103
|
end
|
100
104
|
|
@@ -119,15 +123,15 @@ module Minitest
|
|
119
123
|
end
|
120
124
|
end
|
121
125
|
|
122
|
-
def
|
126
|
+
def color_green(string)
|
123
127
|
color? ? ANSI::Code.green(string) : string
|
124
128
|
end
|
125
129
|
|
126
|
-
def
|
130
|
+
def color_yellow(string)
|
127
131
|
color? ? ANSI::Code.yellow(string) : string
|
128
132
|
end
|
129
133
|
|
130
|
-
def
|
134
|
+
def color_red(string)
|
131
135
|
color? ? ANSI::Code.red(string) : string
|
132
136
|
end
|
133
137
|
end
|
@@ -5,13 +5,13 @@ require_relative "lib/minitest_rerun_failed/version"
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "minitest-rerun-failed"
|
7
7
|
spec.version = MinitestRerunFailed::VERSION
|
8
|
-
spec.authors = ["Søren Houen"]
|
9
|
-
spec.email = ["s@houen.net"]
|
8
|
+
spec.authors = [ "Søren Houen" ]
|
9
|
+
spec.email = [ "s@houen.net" ]
|
10
10
|
|
11
11
|
spec.summary = "Easily rerun failed tests with Minitest"
|
12
12
|
spec.homepage = "https://www.github.com/houen/minitest-rerun-failed"
|
13
13
|
spec.license = "MIT"
|
14
|
-
spec.required_ruby_version = ">= 2.
|
14
|
+
spec.required_ruby_version = ">= 2.7.0"
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
17
|
spec.metadata["source_code_uri"] = "https://www.github.com/houen/minitest-rerun-failed"
|
@@ -24,11 +24,11 @@ Gem::Specification.new do |spec|
|
|
24
24
|
end
|
25
25
|
spec.bindir = "exe"
|
26
26
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
27
|
-
spec.require_paths = ["lib"]
|
27
|
+
spec.require_paths = [ "lib" ]
|
28
28
|
|
29
29
|
# Uncomment to register a new dependency of your gem
|
30
|
-
spec.
|
31
|
-
spec.
|
30
|
+
spec.add_runtime_dependency "minitest", "~> 5.0", ">= 5.0.0"
|
31
|
+
spec.add_runtime_dependency "minitest-reporters", "~> 1.4", ">= 1.4.0"
|
32
32
|
|
33
33
|
# For more information and examples about making a new gem, checkout our
|
34
34
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,19 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-rerun-failed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Søren Houen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.0'
|
17
20
|
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 5.0.0
|
@@ -21,6 +24,9 @@ dependencies:
|
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '5.0'
|
24
30
|
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 5.0.0
|
@@ -28,6 +34,9 @@ dependencies:
|
|
28
34
|
name: minitest-reporters
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.4'
|
31
40
|
- - ">="
|
32
41
|
- !ruby/object:Gem::Version
|
33
42
|
version: 1.4.0
|
@@ -35,6 +44,9 @@ dependencies:
|
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.4'
|
38
50
|
- - ">="
|
39
51
|
- !ruby/object:Gem::Version
|
40
52
|
version: 1.4.0
|
@@ -57,11 +69,13 @@ files:
|
|
57
69
|
- Rakefile
|
58
70
|
- assets/screenshot.png
|
59
71
|
- bin/console
|
72
|
+
- bin/rubocop
|
60
73
|
- bin/setup
|
61
74
|
- lib/minitest_rerun_failed.rb
|
62
75
|
- lib/minitest_rerun_failed/failed_tests_reporter.rb
|
63
76
|
- lib/minitest_rerun_failed/version.rb
|
64
77
|
- minitest_rerun_failed.gemspec
|
78
|
+
- script/release_gem.sh
|
65
79
|
homepage: https://www.github.com/houen/minitest-rerun-failed
|
66
80
|
licenses:
|
67
81
|
- MIT
|
@@ -77,14 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
77
91
|
requirements:
|
78
92
|
- - ">="
|
79
93
|
- !ruby/object:Gem::Version
|
80
|
-
version: 2.
|
94
|
+
version: 2.7.0
|
81
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
96
|
requirements:
|
83
97
|
- - ">="
|
84
98
|
- !ruby/object:Gem::Version
|
85
99
|
version: '0'
|
86
100
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
101
|
+
rubygems_version: 3.5.10
|
88
102
|
signing_key:
|
89
103
|
specification_version: 4
|
90
104
|
summary: Easily rerun failed tests with Minitest
|