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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ae3affc5a3ea0c227aadeae2e71630966fa0ffd1c489c5bceb331ad43d19cae
4
- data.tar.gz: b57c7935403717f5418c98832c94686fcabf91a3bc25e7310f9c94739289e352
3
+ metadata.gz: 1f3ee7c7cf4701095fc011f5fda498a9a6c41ba55d1080686e90d2c683ca4c8d
4
+ data.tar.gz: 2136d4b4a8756dbd5e5b219acc89d1b536c7b282819518a779ef6935860691b6
5
5
  SHA512:
6
- metadata.gz: 14960fddc69a2ad8f462d68594c256aa739f9d7b41ecfcfd9fd8443a259b165afb533d8af1bf829771b43f67f9f5fddf54250f5a98557ce9aaa484a18bd58389
7
- data.tar.gz: 20058d88a1cf41ce783d8aca55c555ae68a994868cd1df3bad5ad757b82f0738312ace50dcc0e805a92e26cc47fc5613d53988fb90480aef9268510f9d263d99
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)/(.+)\.[^\.]+$}, 1]&.then { "test/#{_1}_test.rb" }
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
 
@@ -1,3 +1,3 @@
1
1
  module MightyTest
2
- VERSION = "0.4.3".freeze
2
+ VERSION = "0.5.0".freeze
3
3
  end
@@ -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 = try_file_system_pop(timeout: 0.2)
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.3
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.1'
133
+ version: '3.2'
134
134
  required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="