maxitest 7.0.0 → 7.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 982184ff34c2a4958c9e52ebc4906d861a9c18caa3af656940e0cd1d7918d2c4
4
- data.tar.gz: e282741931d6eac6b10a2bed360c7fa6fd67121e307e2450fa264ff62f5251ea
3
+ metadata.gz: 7e5f08e76db7788953ad7277f33134b6687619c06a4e239c32862cd66421248d
4
+ data.tar.gz: 57d99db63d759537e979bac283227065bffbb4c89dbb37d38fb4ebfbadc94a56
5
5
  SHA512:
6
- metadata.gz: dac139633277d2b16ef1c01cd34c5ddf4948de2dacc0ed7fd5974207b89fec846ecb6e1b88595b4c8ee5e685bcdf4bb6e0e0ed1ae39e4ef1c2e8ca04fe115853
7
- data.tar.gz: 456476d7ec079121af8ef2e1c8640370494efd9bc062f59f03052e10ced0be8e1c11fec5ca7772a20f335e88c57a4a7c8d4053fff4458cbabd8bcef7b59f62bb
6
+ metadata.gz: 91041a1409c08da9d2dccc7501f7c3e1168607eee32078ade9747d8cefe3593d8f4c30b325a968c7ac2575aafbd0ed598fe56416ed26d3a78ed36f475a8d8efb
7
+ data.tar.gz: db1a2b4fec18740e28946190e3b6a8a4c9298045283d930654e795d67f7830fb2c304d136c1ba2fc521f87f1b190322c9bee387dd887aebcb9ebb0f6b1e8823e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Next
2
2
 
3
+ # v7.1.0
4
+ - update vendored gems
5
+
6
+ # v7.0.0
7
+ - only support minitest 6 (which does not work with any released rails version)
8
+ - removed `mtest` binary, use `minitest` instead
9
+ - stoped using alias method chaining, so things might break if you have other minitest extensions
10
+ - use frozen strings everywhere
11
+
12
+ # v6.2.0
13
+ - test and unblock ruby 4
14
+
15
+ # v6.1.0
16
+ - test with minitest 5.26 and 5.27
17
+
3
18
  # v6.0.1
4
19
  - fix unused block warning for `xit` on ruby 3.4
5
20
 
@@ -16,7 +16,7 @@ require "maxitest/shorted_backtrace"
16
16
  unless Gem::Specification.find_all_by_name("rails").any? # rails adds default red/green output
17
17
  require "maxitest/vendor/rg"
18
18
  Minitest.extensions << "rg"
19
- Minitest::RG.rg! $stdout.tty?
19
+ Minitest::RG.rg! if $stdout.tty?
20
20
  end
21
21
 
22
22
  require "maxitest/verbose_backtrace"
@@ -35,3 +35,7 @@ end
35
35
  old = Minitest::BacktraceFilter::MT_RE
36
36
  Minitest::BacktraceFilter.send(:remove_const, :MT_RE)
37
37
  Minitest::BacktraceFilter::MT_RE = Regexp.union(old, %r{lib/maxitest})
38
+ # if already initialized the override
39
+ if Minitest.backtrace_filter.class == Minitest::BacktraceFilter
40
+ Minitest.backtrace_filter.regexp = Minitest::BacktraceFilter::MT_RE
41
+ end
@@ -1,4 +1,6 @@
1
1
  # frozen_string_literal: true
2
+ #
3
+ # convert absolute paths in backtrace to relative paths
2
4
  Minitest::BacktraceFilter.prepend(
3
5
  Module.new do
4
6
  def filter(*)
@@ -30,13 +30,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
30
  # BEGIN generated by rake update, do not modify
31
31
  # https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/version.rb
32
32
  module MinitestAround
33
- VERSION = '0.5.0'
33
+ VERSION = '0.6.0'
34
34
  end
35
35
  # END generated by rake update, do not modify
36
36
 
37
37
  # BEGIN generated by rake update, do not modify
38
38
  # https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/unit.rb
39
- # Modified for MT6 compatibility using prepend instead of alias_method
40
39
  Minitest::Test.prepend(Module.new do
41
40
  def run(*args)
42
41
  if defined?(around)
@@ -57,7 +56,7 @@ Minitest::Spec::DSL.class_eval do
57
56
  # - execute test
58
57
  # - resume fiber to execute last part
59
58
  def around(*args, &block)
60
- raise ArgumentError, "only :each or no argument is supported" if args != [] && args != [:each]
59
+ raise ArgumentError, "only :each, :example, or no argument are supported" if args - [:each, :example] != []
61
60
  fib = nil
62
61
  before do
63
62
  fib = Fiber.new do |context, resume|
@@ -1,7 +1,7 @@
1
1
  # BEGIN generated by rake update, do not modify
2
2
  # https://raw.githubusercontent.com/blowmage/minitest-rg/master/LICENSE
3
3
  =begin
4
- Copyright (c) 2012 Mike Moore
4
+ Copyright (c) 2023 Mike Moore
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining
7
7
  a copy of this software and associated documentation files (the
@@ -26,25 +26,26 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
26
 
27
27
  # BEGIN generated by rake update, do not modify
28
28
  # https://raw.githubusercontent.com/blowmage/minitest-rg/master/lib/minitest/rg_plugin.rb
29
+ # frozen_string_literal: true
30
+
31
+
29
32
  module Minitest
30
33
  def self.plugin_rg_options opts, _options # :nodoc:
31
34
  opts.on "--[no-]rg", "Add red/green to test output." do |bool|
32
- RG.rg! bool
35
+ RG.rg! color: bool
33
36
  end
34
37
  end
35
38
 
36
39
  def self.plugin_rg_init options # :nodoc:
37
- if RG.rg?
38
- io = RG.new options[:io]
40
+ return unless RG.rg?
39
41
 
40
- reporter.reporters.grep(Minitest::Reporter).each do |rep|
41
- rep.io = io
42
- end
43
- end
42
+ io = RG.new options[:io]
43
+
44
+ reporter.reporters.grep(Minitest::Reporter).each { |rep| rep.io = io }
44
45
  end
45
46
 
46
47
  class RG
47
- VERSION = "5.2.0".freeze
48
+ VERSION = "5.4.0"
48
49
 
49
50
  COLORS = {
50
51
  "." => "\e[32m.\e[0m",
@@ -55,8 +56,8 @@ module Minitest
55
56
 
56
57
  attr_reader :io, :colors
57
58
 
58
- def self.rg!(bool = true)
59
- @rg = bool
59
+ def self.rg! color: true
60
+ @rg = color
60
61
  end
61
62
 
62
63
  def self.rg?
@@ -68,26 +69,34 @@ module Minitest
68
69
  @colors = colors
69
70
  end
70
71
 
71
- def print o
72
- io.print(colors[o] || o)
72
+ def print output
73
+ io.print(colors[output] || output)
73
74
  end
74
75
 
75
- def puts o = nil
76
- return io.puts if o.nil?
77
- if o =~ /(\d+) failures, (\d+) errors/
76
+ def puts output = nil
77
+ return io.puts if output.nil?
78
+
79
+ if output =~ /(\d+) failures, (\d+) errors/
78
80
  if Regexp.last_match[1] != "0" || Regexp.last_match[2] != "0"
79
- io.puts "\e[31m#{o}\e[0m"
81
+ io.puts "\e[31m#{output}\e[0m"
80
82
  else
81
- io.puts "\e[32m#{o}\e[0m"
83
+ io.puts "\e[32m#{output}\e[0m"
82
84
  end
83
85
  else
84
- io.puts o
86
+ io.puts output
85
87
  end
86
88
  end
87
89
 
88
90
  def method_missing msg, *args
89
- return super unless io.respond_to? msg
90
- io.send(msg, *args)
91
+ return io.send(msg, *args) if io.respond_to? msg
92
+
93
+ super
94
+ end
95
+
96
+ def respond_to_missing? method_name, include_all = false
97
+ return true if io.respond_to? method_name, include_all
98
+
99
+ super
91
100
  end
92
101
  end
93
102
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Maxitest
3
- VERSION = "7.0.0"
3
+ VERSION = "7.1.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -96,16 +96,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '3.2'
99
- - - "<"
100
- - !ruby/object:Gem::Version
101
- version: '4.1'
102
99
  required_rubygems_version: !ruby/object:Gem::Requirement
103
100
  requirements:
104
101
  - - ">="
105
102
  - !ruby/object:Gem::Version
106
103
  version: '0'
107
104
  requirements: []
108
- rubygems_version: 3.6.9
105
+ rubygems_version: 4.0.3
109
106
  specification_version: 4
110
107
  summary: Minitest + all the features you always wanted
111
108
  test_files: []