mighty_test 0.4.3 → 0.5.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 +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +0 -1
- data/lib/mighty_test/file_system.rb +1 -1
- data/lib/mighty_test/version.rb +1 -1
- data/lib/mighty_test/watcher/event_queue.rb +1 -17
- metadata +3 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7df1c2fe9905ccc2f39b3a3a9cc15d5bb4c414a66932de38ec06439519893e75
|
|
4
|
+
data.tar.gz: 1c454ff154bf0be90bae94d24f71a5e2fd8447b8c310d62cae5f0c4b6337dfff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01d284b6224a91bdfb0db190fc0ed201076063c95b13e503b4c92df12a5f8076c7452c7196ec4cd7932a6507e38d7553b8851247cbdce4c0da9f68d903f1d342
|
|
7
|
+
data.tar.gz: 9eb67d8aa012b1ca07d08872e90b93be1d400dbd80ae758cd1a3d7da5694df077a4bb13363cdb8c4395f4423a3b74d929f58e1f9b2b3ac871d7f659e74895ee5
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
[](https://rubygems.org/gems/mighty_test)
|
|
4
4
|
[](https://www.ruby-toolbox.com/projects/mighty_test)
|
|
5
5
|
[](https://github.com/mattbrictson/mighty_test/actions/workflows/ci.yml)
|
|
6
|
-
[](https://codeclimate.com/github/mattbrictson/mighty_test)
|
|
7
6
|
|
|
8
7
|
mighty_test (`mt`) is a TDD-friendly Minitest runner for Ruby projects. It includes a Jest-inspired interactive watch mode, focus mode, CI sharding, run by directory/file/line number, fail-fast, and color formatting.
|
|
9
8
|
|
|
@@ -11,7 +11,7 @@ module MightyTest
|
|
|
11
11
|
return nil unless path && File.exist?(path) && !Dir.exist?(path)
|
|
12
12
|
return path if path.match?(%r{^test/.*_test.rb$})
|
|
13
13
|
|
|
14
|
-
test_path = path[%r{^(?:app|lib)/(.+)\.[
|
|
14
|
+
test_path = path[%r{^(?:app|lib)/(.+)\.[^.]+$}, 1]&.then { "test/#{_1}_test.rb" }
|
|
15
15
|
test_path if test_path && File.exist?(test_path)
|
|
16
16
|
end
|
|
17
17
|
|
data/lib/mighty_test/version.rb
CHANGED
|
@@ -51,28 +51,12 @@ module MightyTest
|
|
|
51
51
|
attr_reader :console, :file_system, :file_system_listener, :file_system_queue
|
|
52
52
|
|
|
53
53
|
def pop_files_changed
|
|
54
|
-
paths =
|
|
54
|
+
paths = file_system_queue.pop(timeout: 0.2)
|
|
55
55
|
return if paths.nil?
|
|
56
56
|
|
|
57
57
|
paths += file_system_queue.pop until file_system_queue.empty?
|
|
58
58
|
paths.uniq
|
|
59
59
|
end
|
|
60
|
-
|
|
61
|
-
if RUBY_VERSION.start_with?("3.1.")
|
|
62
|
-
# TODO: Remove once we drop support for Ruby 3.1
|
|
63
|
-
require "timeout"
|
|
64
|
-
def try_file_system_pop(timeout:)
|
|
65
|
-
Timeout.timeout(timeout) do
|
|
66
|
-
file_system_queue.pop
|
|
67
|
-
end
|
|
68
|
-
rescue Timeout::Error
|
|
69
|
-
nil
|
|
70
|
-
end
|
|
71
|
-
else
|
|
72
|
-
def try_file_system_pop(timeout:)
|
|
73
|
-
file_system_queue.pop(timeout:)
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
60
|
end
|
|
77
61
|
end
|
|
78
62
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mighty_test
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Brictson
|
|
@@ -23,20 +23,6 @@ dependencies:
|
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '3.5'
|
|
26
|
-
- !ruby/object:Gem::Dependency
|
|
27
|
-
name: logger
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - ">="
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '0'
|
|
33
|
-
type: :runtime
|
|
34
|
-
prerelease: false
|
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - ">="
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '0'
|
|
40
26
|
- !ruby/object:Gem::Dependency
|
|
41
27
|
name: minitest
|
|
42
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -130,14 +116,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
130
116
|
requirements:
|
|
131
117
|
- - ">="
|
|
132
118
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: '3.
|
|
119
|
+
version: '3.2'
|
|
134
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
121
|
requirements:
|
|
136
122
|
- - ">="
|
|
137
123
|
- !ruby/object:Gem::Version
|
|
138
124
|
version: '0'
|
|
139
125
|
requirements: []
|
|
140
|
-
rubygems_version:
|
|
126
|
+
rubygems_version: 4.0.3
|
|
141
127
|
specification_version: 4
|
|
142
128
|
summary: A modern Minitest runner for TDD, with watch mode and more
|
|
143
129
|
test_files: []
|