mighty_test 0.4.3 → 0.5.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/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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f3ee7c7cf4701095fc011f5fda498a9a6c41ba55d1080686e90d2c683ca4c8d
|
4
|
+
data.tar.gz: 2136d4b4a8756dbd5e5b219acc89d1b536c7b282819518a779ef6935860691b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7104a59f5518492be2bd9003db27ad136744975197d50a6ecb410563a5819b36b2a9f41901c1a6d3d0553b2c7c13102091d3259fe34530c82989efb8cbf976b
|
7
|
+
data.tar.gz: cd996989d4455c2fb9cc813137cdb9abf050290aa79fb61b47284f56182d257a390d948b39b21a9ae08c5fba7e119f29d480c67195abcfa4cd8195400101007e
|
@@ -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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
130
|
requirements:
|
131
131
|
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: '3.
|
133
|
+
version: '3.2'
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ">="
|