maxitest 5.7.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/bin/mtest +22 -0
- data/lib/maxitest/vendor/around.rb +8 -8
- data/lib/maxitest/vendor/line.rb +6 -7
- data/lib/maxitest/vendor/line_describe.rb +2 -2
- data/lib/maxitest/vendor/rg.rb +4 -4
- data/lib/maxitest/vendor/testrbl.rb +2 -23
- data/lib/maxitest/version.rb +1 -1
- data/lib/minitest/maxitest_plugin.rb +5 -3
- metadata +7 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30966eb9cc2cdc503fdb089ed87597212cb985c7bdbc0eccf5880890fe2473d1
|
4
|
+
data.tar.gz: 36c7e2ac8daab2d38add10823626e4e3945c06bc2f439f18f18f2bcd7fbaf8ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e4249f89f4d9a89541411b9edb5441ca055c14af7e7c6d9b9cd6fb07b10c3916ea2c383806925583477b339c78da34d31612fd386f3a6197e521141cf897815
|
7
|
+
data.tar.gz: 82e5480d1db5b0dcd9f467a7cd89772d519478ba759e81f97fc721a5bb49059c35efa39aed34c3ed542dab1112d0571367cebfcd8275c0d04c9102f182a59105
|
data/CHANGELOG.md
CHANGED
data/bin/mtest
CHANGED
@@ -1,4 +1,25 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# parse raw -v but not verbose
|
4
|
+
if ARGV == ["-v"] || ARGV == ["--version"]
|
5
|
+
puts Maxitest::VERSION
|
6
|
+
exit 0
|
7
|
+
end
|
8
|
+
|
9
|
+
# parse raw -h
|
10
|
+
if ARGV == ["-h"] || ARGV == ["--help"]
|
11
|
+
puts <<~EOF
|
12
|
+
test given file, folder or file:line
|
13
|
+
Usage: mtest foo_test.rb
|
14
|
+
|
15
|
+
-v to run without bracktrace cleaner
|
16
|
+
--changed to run all all tests in current `git diff` or `git show`
|
17
|
+
EOF
|
18
|
+
exit 0
|
19
|
+
end
|
20
|
+
|
21
|
+
# send rest to testrbl to get --changed support, but do not guess at lines but just convert number to -l
|
22
|
+
# so minitest-line picks it up
|
2
23
|
require 'optparse'
|
3
24
|
|
4
25
|
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
|
@@ -9,4 +30,5 @@ class << Maxitest::Testrbl
|
|
9
30
|
[file, "-l", line]
|
10
31
|
end
|
11
32
|
end
|
33
|
+
|
12
34
|
Maxitest::Testrbl.run_from_cli(ARGV)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/LICENSE
|
2
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/LICENSE
|
3
3
|
=begin
|
4
4
|
Copyright (c) 2012 Peter Suschlik
|
5
5
|
Copyright (c) 2018 Peter Leitzen (Suschlik)
|
@@ -25,17 +25,17 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
25
25
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
26
26
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
27
|
=end
|
28
|
-
#END generated by rake update, do not modify
|
28
|
+
# END generated by rake update, do not modify
|
29
29
|
|
30
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/version.rb
|
31
30
|
# BEGIN generated by rake update, do not modify
|
31
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/version.rb
|
32
32
|
module MinitestAround
|
33
33
|
VERSION = '0.5.0'
|
34
34
|
end
|
35
|
-
#END generated by rake update, do not modify
|
35
|
+
# END generated by rake update, do not modify
|
36
36
|
|
37
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/unit.rb
|
38
37
|
# BEGIN generated by rake update, do not modify
|
38
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/unit.rb
|
39
39
|
Minitest::Test.class_eval do
|
40
40
|
alias_method :run_without_around, :run
|
41
41
|
def run(*args)
|
@@ -48,10 +48,10 @@ Minitest::Test.class_eval do
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
51
|
-
#END generated by rake update, do not modify
|
51
|
+
# END generated by rake update, do not modify
|
52
52
|
|
53
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/spec.rb
|
54
53
|
# BEGIN generated by rake update, do not modify
|
54
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/spec.rb
|
55
55
|
Minitest::Spec::DSL.class_eval do
|
56
56
|
# - resume to call first part
|
57
57
|
# - execute test
|
@@ -92,4 +92,4 @@ Minitest::Spec::DSL.class_eval do
|
|
92
92
|
end)
|
93
93
|
end
|
94
94
|
end
|
95
|
-
#END generated by rake update, do not modify
|
95
|
+
# END generated by rake update, do not modify
|
data/lib/maxitest/vendor/line.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
|
3
|
-
# https://raw.githubusercontent.com/judofyr/minitest-line/master/MIT-LICENSE.txt
|
4
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/judofyr/minitest-line/master/MIT-LICENSE.txt
|
5
3
|
=begin
|
6
4
|
Copyright (c) 2014 Magnus Holm
|
7
5
|
|
@@ -24,10 +22,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
24
22
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
25
23
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
24
|
=end
|
27
|
-
#END generated by rake update, do not modify
|
25
|
+
# END generated by rake update, do not modify
|
28
26
|
|
29
|
-
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line_plugin.rb
|
30
27
|
# BEGIN generated by rake update, do not modify
|
28
|
+
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line_plugin.rb
|
31
29
|
module Minitest
|
32
30
|
module Line
|
33
31
|
class << self
|
@@ -102,6 +100,7 @@ module Minitest
|
|
102
100
|
io.puts
|
103
101
|
io.puts "Focus on failing tests:"
|
104
102
|
pwd = Pathname.new(Dir.pwd)
|
103
|
+
bin_rails = File.exist?("bin/rails")
|
105
104
|
@failures.each do |res|
|
106
105
|
result = (res.respond_to?(:source_location) ? res : res.method(res.name))
|
107
106
|
file, line = result.source_location
|
@@ -109,7 +108,7 @@ module Minitest
|
|
109
108
|
if file
|
110
109
|
file = Pathname.new(file)
|
111
110
|
file = file.relative_path_from(pwd) if file.absolute?
|
112
|
-
output = "mtest #{file}:#{line}"
|
111
|
+
output = "#{bin_rails ? "bin/rails test" : "mtest"} #{file}:#{line}"
|
113
112
|
output = "\e[31m#{output}\e[0m" if $stdout.tty?
|
114
113
|
io.puts output
|
115
114
|
end
|
@@ -120,4 +119,4 @@ module Minitest
|
|
120
119
|
def self.plugin_line_inject_reporter
|
121
120
|
end
|
122
121
|
end
|
123
|
-
#END generated by rake update, do not modify
|
122
|
+
# END generated by rake update, do not modify
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line/describe_track.rb
|
2
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line/describe_track.rb
|
3
3
|
module Minitest
|
4
4
|
module Line
|
5
5
|
module DescribeTrack
|
@@ -13,4 +13,4 @@ module Minitest
|
|
13
13
|
end
|
14
14
|
|
15
15
|
Object.send(:include, Minitest::Line::DescribeTrack)
|
16
|
-
#END generated by rake update, do not modify
|
16
|
+
# END generated by rake update, do not modify
|
data/lib/maxitest/vendor/rg.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/LICENSE
|
2
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/LICENSE
|
3
3
|
=begin
|
4
4
|
Copyright (c) 2012 Mike Moore
|
5
5
|
|
@@ -22,10 +22,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
22
22
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
23
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
24
|
=end
|
25
|
-
#END generated by rake update, do not modify
|
25
|
+
# END generated by rake update, do not modify
|
26
26
|
|
27
|
-
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/lib/minitest/rg_plugin.rb
|
28
27
|
# BEGIN generated by rake update, do not modify
|
28
|
+
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/lib/minitest/rg_plugin.rb
|
29
29
|
module Minitest
|
30
30
|
def self.plugin_rg_options opts, _options # :nodoc:
|
31
31
|
opts.on "--[no-]rg", "Add red/green to test output." do |bool|
|
@@ -91,4 +91,4 @@ module Minitest
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
94
|
-
#END generated by rake update, do not modify
|
94
|
+
# END generated by rake update, do not modify
|
@@ -1,10 +1,5 @@
|
|
1
|
-
# Copyright 2014 Michael Grosser under MIT License
|
2
|
-
|
3
|
-
# https://raw.githubusercontent.com/grosser/testrbl/master/lib/testrbl.rb
|
4
1
|
# BEGIN generated by rake update, do not modify
|
5
|
-
|
6
|
-
require 'maxitest/version'
|
7
|
-
|
2
|
+
# https://raw.githubusercontent.com/grosser/testrbl/master/lib/testrbl.rb
|
8
3
|
module Maxitest
|
9
4
|
module Testrbl
|
10
5
|
PATTERNS = [
|
@@ -18,22 +13,6 @@ module Maxitest
|
|
18
13
|
|
19
14
|
class << self
|
20
15
|
def run_from_cli(argv)
|
21
|
-
if argv == ["-v"] || argv == ["--version"]
|
22
|
-
puts Maxitest::VERSION
|
23
|
-
exit 0
|
24
|
-
end
|
25
|
-
|
26
|
-
if argv == ["-h"] || argv == ["--help"]
|
27
|
-
puts <<~EOF
|
28
|
-
test given file, folder or file:line
|
29
|
-
Usage: mtest foo_test.rb
|
30
|
-
|
31
|
-
-v to run without bracktrace cleaner
|
32
|
-
--changed to run all all tests in current `git diff` or `git show`
|
33
|
-
EOF
|
34
|
-
exit 0
|
35
|
-
end
|
36
|
-
|
37
16
|
files, options = partition_argv(argv)
|
38
17
|
files.concat(changed_files) if options.delete("--changed")
|
39
18
|
files = ["test"] if files.empty?
|
@@ -212,4 +191,4 @@ module Maxitest
|
|
212
191
|
end
|
213
192
|
end
|
214
193
|
end
|
215
|
-
#END generated by rake update, do not modify
|
194
|
+
# END generated by rake update, do not modify
|
data/lib/maxitest/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# we are not enabling our extensions unless maxitest/autorun was loaded
|
2
|
-
#
|
2
|
+
# minitest plugin system auto-loads all files in the load path and that would
|
3
3
|
# always enable all our plugins even if they were not wanted
|
4
4
|
if defined?(Maxitest::ENABLE_PLUGINS) && Maxitest::ENABLE_PLUGINS
|
5
5
|
disabled_for_rails = begin
|
@@ -12,13 +12,15 @@ if defined?(Maxitest::ENABLE_PLUGINS) && Maxitest::ENABLE_PLUGINS
|
|
12
12
|
# rails has --backtrace which disables rails own backtrace cleaner, but not minitests
|
13
13
|
require "maxitest/verbose_backtrace"
|
14
14
|
|
15
|
-
unless disabled_for_rails # rails 5
|
15
|
+
unless disabled_for_rails # rails 5 adds default red/green output
|
16
16
|
require "maxitest/vendor/rg"
|
17
17
|
Minitest.extensions << "rg"
|
18
18
|
Minitest::RG.rg! $stdout.tty?
|
19
19
|
end
|
20
20
|
|
21
|
-
#
|
21
|
+
# rails 5.2+ has it's own line support
|
22
|
+
# - it breaks `mtest file:line` format
|
23
|
+
# - we still want our format with the nice summary at the end, even if the `bin/rails test` output is already inline
|
22
24
|
require "maxitest/vendor/line"
|
23
25
|
Minitest.extensions << "line"
|
24
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maxitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-31 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: minitest
|
@@ -16,7 +15,7 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.
|
18
|
+
version: 5.20.0
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 5.26.0
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: 5.
|
28
|
+
version: 5.20.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 5.26.0
|
@@ -58,7 +57,6 @@ dependencies:
|
|
58
57
|
- - ">="
|
59
58
|
- !ruby/object:Gem::Version
|
60
59
|
version: '0'
|
61
|
-
description:
|
62
60
|
email: michael@grosser.it
|
63
61
|
executables:
|
64
62
|
- mtest
|
@@ -96,7 +94,6 @@ homepage: https://github.com/grosser/maxitest
|
|
96
94
|
licenses:
|
97
95
|
- MIT
|
98
96
|
metadata: {}
|
99
|
-
post_install_message:
|
100
97
|
rdoc_options: []
|
101
98
|
require_paths:
|
102
99
|
- lib
|
@@ -104,18 +101,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
101
|
requirements:
|
105
102
|
- - ">="
|
106
103
|
- !ruby/object:Gem::Version
|
107
|
-
version: '3'
|
104
|
+
version: '3.2'
|
108
105
|
- - "<"
|
109
106
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
107
|
+
version: '3.5'
|
111
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
109
|
requirements:
|
113
110
|
- - ">="
|
114
111
|
- !ruby/object:Gem::Version
|
115
112
|
version: '0'
|
116
113
|
requirements: []
|
117
|
-
rubygems_version: 3.
|
118
|
-
signing_key:
|
114
|
+
rubygems_version: 3.6.2
|
119
115
|
specification_version: 4
|
120
116
|
summary: Minitest + all the features you always wanted
|
121
117
|
test_files: []
|