minitest-bisect 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8e164f0aced9bbb7f0fb1f240ab1a32aa57bec59
4
- data.tar.gz: ad40830eea222d045b4a19bce62905d7be7a1f9b
2
+ SHA256:
3
+ metadata.gz: cff92ce857a2c5a2a5ec16125c68b77513490096eeb225d88c9a386e01c7970e
4
+ data.tar.gz: e9683eb9d3f1960aa90f2558aa860eb372cfd1f12053536e651917e7a02fb256
5
5
  SHA512:
6
- metadata.gz: c427f5b79be6ee92d49ba4dbe7711362a9bc5f530a5845bd20ecb9260918f4e6bb0a540840b2f5d2d97d27f345a05068d9944543acf39d7a8418dd1211c67f0c
7
- data.tar.gz: 82c9c80008423278b9318b9199494abbcdd425eb7b18f2ab8eb3b76d10de6d85589b53a85883a09e73542e1469dcacee8758f5580e7550e5e4320d4ef8631dac
6
+ metadata.gz: 5b4867ee6ac8d70e7fc85d7a1e5982db15d161f8f5deac85d1def14bf0a8ffdfad921924a6d7fe5137ca0445a65908c4d00668456bcfcad6a965cd13e1437459
7
+ data.tar.gz: a5548ed9cd15fb5174e2e8f8a51998818431603410aa95015357651b6394e9333e71cb41a278ae4f854c992bec7aa3a218a91227b7d6883d6d68d3e78e71615b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ === 1.4.1 / 2019-05-26
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Clarified in doco how to use -I<path> with minitest_bisect. (padi)
6
+ * Escape class name as well as method name in regexp. (matthewd)
7
+
1
8
  === 1.4.0 / 2016-06-15
2
9
 
3
10
  * 3 minor enhancements:
@@ -142,17 +142,17 @@ quicker with time.
142
142
 
143
143
  == FAQ:
144
144
 
145
- ==== Q: What if my tests are in multiple subdirectories?
145
+ ==== Q: What if my tests are in multiple subdirectories (e.g. 'test/' folder in a Rails app)?
146
146
 
147
147
  This is assuming the following doesn't work for you:
148
148
 
149
- minitest_bisect --seed 3911 test/*_test.rb
149
+ minitest_bisect --seed 3911 -Itest test/*_test.rb
150
150
 
151
151
  because you need it to span multiple sub-directories.
152
152
 
153
153
  A: Use your shell to find the files for you
154
154
 
155
- minitest_bisect --seed 3911 $(find test -type f -name \*_test.rb)
155
+ minitest_bisect --seed 3911 -Itest $(find test -type f -name \*_test.rb)
156
156
 
157
157
  or
158
158
 
@@ -5,7 +5,7 @@ require "rbconfig"
5
5
  require "path_expander"
6
6
 
7
7
  class Minitest::Bisect
8
- VERSION = "1.4.0"
8
+ VERSION = "1.4.1"
9
9
 
10
10
  class PathExpander < ::PathExpander
11
11
  TEST_GLOB = "**/{test_*,*_test,spec_*,*_spec}.rb" # :nodoc:
@@ -199,10 +199,11 @@ class Minitest::Bisect
199
199
 
200
200
  bbc.each do |klass, methods|
201
201
  methods = methods.map(&:last).flatten.uniq.map { |method|
202
- method.gsub(/([`'"!?&\[\]\(\)\|\+])/, '\\\\\1')
202
+ re_escape method
203
203
  }
204
204
 
205
- re << /#{klass}#(?:#{methods.join "|"})/.to_s[7..-2] # (?-mix:...)
205
+ methods = methods.join "|"
206
+ re << /#{re_escape klass}#(?:#{methods})/.to_s[7..-2] # (?-mix:...)
206
207
  end
207
208
 
208
209
  re = re.join("|").to_s.gsub(/-mix/, "")
@@ -210,6 +211,10 @@ class Minitest::Bisect
210
211
  "/^(?:#{re})$/"
211
212
  end
212
213
 
214
+ def re_escape str
215
+ str.gsub(/([`'"!?&\[\]\(\)\{\}\|\+])/, '\\\\\1')
216
+ end
217
+
213
218
  def build_methods_cmd cmd, culprits = [], bad = nil
214
219
  reset
215
220
 
@@ -90,7 +90,15 @@ class TestMinitest::TestBisect < Minitest::Test
90
90
  assert_equal exp, bisect.build_re(bad)
91
91
  end
92
92
 
93
- def test_build_re_escaping
93
+ def test_build_re_class_escaping
94
+ bad = ["{}#[]"]
95
+
96
+ exp = "/^(?:\\{\\}#(?:\\[\\]))$/"
97
+
98
+ assert_equal exp, bisect.build_re(bad)
99
+ end
100
+
101
+ def test_build_re_method_escaping
94
102
  bad = ["Some Class#It shouldn't care what the name is"]
95
103
 
96
104
  exp = "/^(?:Some Class#(?:It shouldn\\'t care what the name is))$/"
@@ -96,7 +96,7 @@ describe Array, :find_minimal_combination do
96
96
  def self.test_find_minimal_combination max, *bad
97
97
  define_method "test_find_minimal_combination_#{max}_#{bad.join "_"}" do
98
98
  a = (1..max).to_a
99
- a.find_minimal_combination(&check(*bad)).must_equal bad
99
+ _(a.find_minimal_combination(&check(*bad))).must_equal bad
100
100
  end
101
101
  end
102
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-bisect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE1MDkxOTIwNTEyMloXDTE2MDkxODIwNTEyMlowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE4MTIwNDIxMzAxNFoXDTE5MTIwNDIxMzAxNFowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQb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cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
30
+ UfBugfLD19bu3nvL+zTAGx/U
31
31
  -----END CERTIFICATE-----
32
- date: 2016-06-15 00:00:00.000000000 Z
32
+ date: 2019-05-27 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: minitest-server
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.0'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: path_expander
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  - !ruby/object:Gem::Dependency
63
- name: rdoc
63
+ name: rake
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - ">"
67
67
  - !ruby/object:Gem::Version
68
- version: '4.0'
68
+ version: '0'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - ">"
74
74
  - !ruby/object:Gem::Version
75
- version: '4.0'
75
+ version: '0'
76
76
  - !ruby/object:Gem::Dependency
77
- name: rake
77
+ name: rdoc
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>'
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '4.0'
83
+ - - "<"
84
+ - !ruby/object:Gem::Version
85
+ version: '7'
83
86
  type: :development
84
87
  prerelease: false
85
88
  version_requirements: !ruby/object:Gem::Requirement
86
89
  requirements:
87
- - - '>'
90
+ - - ">="
88
91
  - !ruby/object:Gem::Version
89
- version: '0'
92
+ version: '4.0'
93
+ - - "<"
94
+ - !ruby/object:Gem::Version
95
+ version: '7'
90
96
  - !ruby/object:Gem::Dependency
91
97
  name: hoe
92
98
  requirement: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ~>
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: '3.15'
102
+ version: '3.17'
97
103
  type: :development
98
104
  prerelease: false
99
105
  version_requirements: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - ~>
107
+ - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: '3.15'
109
+ version: '3.17'
104
110
  description: |-
105
111
  Hunting down random test failures can be very very difficult,
106
112
  sometimes impossible, but minitest-bisect makes it easy.
@@ -123,7 +129,7 @@ extra_rdoc_files:
123
129
  - Manifest.txt
124
130
  - README.rdoc
125
131
  files:
126
- - .autotest
132
+ - ".autotest"
127
133
  - History.rdoc
128
134
  - Manifest.txt
129
135
  - README.rdoc
@@ -157,23 +163,22 @@ licenses:
157
163
  metadata: {}
158
164
  post_install_message:
159
165
  rdoc_options:
160
- - --main
166
+ - "--main"
161
167
  - README.rdoc
162
168
  require_paths:
163
169
  - lib
164
170
  required_ruby_version: !ruby/object:Gem::Requirement
165
171
  requirements:
166
- - - '>='
172
+ - - ">="
167
173
  - !ruby/object:Gem::Version
168
174
  version: '0'
169
175
  required_rubygems_version: !ruby/object:Gem::Requirement
170
176
  requirements:
171
- - - '>='
177
+ - - ">="
172
178
  - !ruby/object:Gem::Version
173
179
  version: '0'
174
180
  requirements: []
175
- rubyforge_project:
176
- rubygems_version: 2.4.5
181
+ rubygems_version: 3.0.2
177
182
  signing_key:
178
183
  specification_version: 4
179
184
  summary: Hunting down random test failures can be very very difficult, sometimes impossible,
metadata.gz.sig CHANGED
Binary file