minitest-focus 1.3.1 → 1.4.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: 34dbd2617058d83323bc7e66b0fc842b4bc7d3bcdbc89a53c5338d0a0c2ac50c
4
- data.tar.gz: bd8aa9bef1a614ae2620f45ecf85b6dcdfe8858a93b846c31af4f4d8b32d59e8
3
+ metadata.gz: 3a72350f46b6f3c237d806264bcf78bd06d4de18d71e831c6391aa23cdf2c7e7
4
+ data.tar.gz: 63233b38d29c7549fa74494839e6647835138c510601a14e4b92ba9cc0ed25df
5
5
  SHA512:
6
- metadata.gz: 45f19c7c909942e9ce71dce0f734f316dcfd98d5b8cc64088454611d4aa1055dd7547be06ea7c000db44b314477d5104c2bf79155a687a9d545e903fd100b705
7
- data.tar.gz: 4cc6a394a4f36d153bafe5b83753f2a90c045621b592964eb5c706eb72700166e04c05076fa59de9f4b4a8cb58e6eaa0265feda76682dcd596a71ec4e308af6b
6
+ metadata.gz: b80ddf18958e09b9bd198702dcb599b8dbfd9dc8813c73a8d263ea9803991bccf78d06b7aaa242bf384cc7681d6003cf8e553dfc1d383a850162f47c983a2e74
7
+ data.tar.gz: f0303c4af9ebe621118b6d860ac76e6b4e070fcad3240da43154b01ff78faf1b664b4999e42681951ffaab32bd94c2c348bfa83a683ea4b75849e2693e8b35b7
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,3 +1,18 @@
1
+ === 1.4.1 / 2025-12-31
2
+
3
+ * 4 bug fixes:
4
+
5
+ * MT6: Load focus plugin if minitest/focus is required. (mattbrictson)
6
+ * Loosened the minitest dependency to include MT6.
7
+ * Dropped MT4.
8
+ * MT6: Minor option processing fixes.
9
+
10
+ === 1.4.0 / 2023-07-11
11
+
12
+ * 1 minor enhancement:
13
+
14
+ * Added --no-focus flag to disable focus and allow --name args to override.
15
+
1
16
  === 1.3.1 / 2021-05-26
2
17
 
3
18
  * 1 bug fix:
data/Manifest.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  .autotest
2
- History.txt
2
+ History.rdoc
3
3
  Manifest.txt
4
- README.txt
4
+ README.rdoc
5
5
  Rakefile
6
6
  lib/minitest/focus.rb
7
7
  lib/minitest/focus_plugin.rb
@@ -7,7 +7,7 @@ rdoc :: http://docs.seattlerb.org/minitest-focus
7
7
 
8
8
  Allows you to focus on a few tests with ease without having to use
9
9
  command-line arguments. Good for tools like guard that don't have
10
- enough brains to understand test output. Cf. ZenTest's autotest (an
10
+ enough brains to understand test output. Cf. minitest-autotest (an
11
11
  example of a test runner with strong testing logic).
12
12
 
13
13
  Inspired by https://github.com/seattlerb/minitest/issues/213
@@ -16,13 +16,15 @@ Inspired by https://github.com/seattlerb/minitest/issues/213
16
16
 
17
17
  * `focus` class method allows you to specify that the next test
18
18
  defined should be run.
19
+ * Use --no-focus to temporarily disable or override with --name
20
+ arguments.
19
21
 
20
22
  == SYNOPSIS:
21
23
 
22
24
  require "minitest/autorun"
23
25
  require "minitest/focus"
24
26
 
25
- class MyTest < MiniTest::Unit::TestCase
27
+ class MyTest < Minitest::Test
26
28
  def test_unrelated; ...; end # will NOT run
27
29
 
28
30
  focus def test_method2; ...; end # will run (direct--preferred)
data/Rakefile CHANGED
@@ -6,13 +6,11 @@ require "hoe"
6
6
  Hoe.plugin :isolate
7
7
  Hoe.plugin :seattlerb
8
8
 
9
- Hoe.add_include_dirs "../../minitest/dev/lib"
10
-
11
9
  Hoe.spec "minitest-focus" do
12
10
  developer "Ryan Davis", "ryand-ruby@zenspider.com"
13
11
  license "MIT"
14
12
 
15
- dependency "minitest", [">= 4", "< 6"]
13
+ dependency "minitest", "> 5.0"
16
14
  end
17
15
 
18
16
  # vim: syntax=ruby
@@ -1,8 +1,10 @@
1
1
  require "minitest/test"
2
2
 
3
+ Minitest.load :focus if Minitest.respond_to? :load # MT6
4
+
3
5
  class Minitest::Test # :nodoc:
4
6
  class Focus # :nodoc:
5
- VERSION = "1.3.1" # :nodoc:
7
+ VERSION = "1.4.1" # :nodoc:
6
8
  end
7
9
 
8
10
  @@filtered_names = [] # :nodoc:
@@ -1,18 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Minitest
4
- def self.plugin_focus_options(_opts, options)
4
+ def self.plugin_focus_options opts, options
5
+ opts.on "--no-focus", "Disable `focus` calls in tests." do |n|
6
+ @nofocus = true
7
+ end
8
+ end
9
+
10
+ def self.plugin_focus_init options # :nodoc:
5
11
  return unless Minitest::Test.respond_to? :filtered_names
6
12
  return if Minitest::Test.filtered_names.empty?
7
13
 
8
- index = ARGV.index { |arg| arg =~ /^-n/ || arg =~ /^--name/ }
9
- if index
10
- warn 'Ignoring -n / --name, using `focus` filters instead'
11
- ARGV.delete_at index
14
+ if options[:include] || options[:filter] then
15
+ order = %w[ `focus` --name ]
16
+ a, b = @nofocus ? order : order.reverse
17
+ extra = " Use --no-focus to override." unless @nofocus
18
+ warn "Ignoring #{a} filters in favor of #{b} filters.#{extra}"
19
+ warn ""
12
20
  end
13
21
 
14
- re = "/^(#{Regexp.union(Minitest::Test.filtered_names).source})$/"
22
+ return if @nofocus
15
23
 
16
- options[:filter] = re
24
+ re = "/^(#{Regexp.union(Minitest::Test.filtered_names).source})$/"
25
+ options[:include] = options[:filter] = re
17
26
  end
18
27
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,18 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-focus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
12
11
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
12
+ MIIDPjCCAiagAwIBA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JcPOWPFwkojhzweilRVjTJ19UiLhiBTw3C1wJO3LVdBkWDmnnhAmKuX4D
25
+ r7vjQvESlABGIPdutI1Yl7mrHQzTkfLfXvNN6MT0nLChPyIYauT6SZZxubwJrUfA
26
+ 7R0c2CJTIboZ0XaGpLsXqHEF1c29H7TV1QvVuqKAN2mCjh4N82QVn+ZKtys28AwT
27
+ 6GfQX2fqLoi4KSc7xIzHKaNzqxeOICmJofk9w5VZ2rRN6yes8jvFYwz9HR41wdj8
28
+ bwfinv7Yp5fA6AysuZLhCykyfDuZVRrUp0Vb68YCKsLjJly/Theak+euNTxvHsB+
29
+ al9oSgPPHICMEX65qvLywitx
31
30
  -----END CERTIFICATE-----
32
- date: 2021-05-26 00:00:00.000000000 Z
31
+ date: 1980-01-02 00:00:00.000000000 Z
33
32
  dependencies:
34
33
  - !ruby/object:Gem::Dependency
35
34
  name: minitest
36
35
  requirement: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '4'
41
- - - "<"
37
+ - - ">"
42
38
  - !ruby/object:Gem::Version
43
- version: '6'
39
+ version: '5.0'
44
40
  type: :runtime
45
41
  prerelease: false
46
42
  version_requirements: !ruby/object:Gem::Requirement
47
43
  requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: '4'
51
- - - "<"
44
+ - - ">"
52
45
  - !ruby/object:Gem::Version
53
- version: '6'
46
+ version: '5.0'
54
47
  - !ruby/object:Gem::Dependency
55
48
  name: rdoc
56
49
  requirement: !ruby/object:Gem::Requirement
57
50
  requirements:
58
51
  - - ">="
59
52
  - !ruby/object:Gem::Version
60
- version: '4.0'
53
+ version: '6.0'
61
54
  - - "<"
62
55
  - !ruby/object:Gem::Version
63
- version: '7'
56
+ version: '8'
64
57
  type: :development
65
58
  prerelease: false
66
59
  version_requirements: !ruby/object:Gem::Requirement
67
60
  requirements:
68
61
  - - ">="
69
62
  - !ruby/object:Gem::Version
70
- version: '4.0'
63
+ version: '6.0'
71
64
  - - "<"
72
65
  - !ruby/object:Gem::Version
73
- version: '7'
66
+ version: '8'
74
67
  - !ruby/object:Gem::Dependency
75
68
  name: hoe
76
69
  requirement: !ruby/object:Gem::Requirement
77
70
  requirements:
78
71
  - - "~>"
79
72
  - !ruby/object:Gem::Version
80
- version: '3.22'
73
+ version: '4.5'
81
74
  type: :development
82
75
  prerelease: false
83
76
  version_requirements: !ruby/object:Gem::Requirement
84
77
  requirements:
85
78
  - - "~>"
86
79
  - !ruby/object:Gem::Version
87
- version: '3.22'
80
+ version: '4.5'
88
81
  description: |-
89
82
  Allows you to focus on a few tests with ease without having to use
90
83
  command-line arguments. Good for tools like guard that don't have
91
- enough brains to understand test output. Cf. ZenTest's autotest (an
84
+ enough brains to understand test output. Cf. minitest-autotest (an
92
85
  example of a test runner with strong testing logic).
93
86
 
94
87
  Inspired by https://github.com/seattlerb/minitest/issues/213
@@ -97,14 +90,14 @@ email:
97
90
  executables: []
98
91
  extensions: []
99
92
  extra_rdoc_files:
100
- - History.txt
93
+ - History.rdoc
101
94
  - Manifest.txt
102
- - README.txt
95
+ - README.rdoc
103
96
  files:
104
97
  - ".autotest"
105
- - History.txt
98
+ - History.rdoc
106
99
  - Manifest.txt
107
- - README.txt
100
+ - README.rdoc
108
101
  - Rakefile
109
102
  - lib/minitest/focus.rb
110
103
  - lib/minitest/focus_plugin.rb
@@ -114,10 +107,9 @@ licenses:
114
107
  - MIT
115
108
  metadata:
116
109
  homepage_uri: https://github.com/seattlerb/minitest-focus
117
- post_install_message:
118
110
  rdoc_options:
119
111
  - "--main"
120
- - README.txt
112
+ - README.rdoc
121
113
  require_paths:
122
114
  - lib
123
115
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -131,8 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
123
  - !ruby/object:Gem::Version
132
124
  version: '0'
133
125
  requirements: []
134
- rubygems_version: 3.2.16
135
- signing_key:
126
+ rubygems_version: 3.7.2
136
127
  specification_version: 4
137
128
  summary: Allows you to focus on a few tests with ease without having to use command-line
138
129
  arguments
metadata.gz.sig CHANGED
Binary file