Skip to content

Commit 0421147

Browse files
authored
Drop support for Ruby 3.1 (#64)
1 parent 0674016 commit 0421147

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
ruby: ["3.1", "3.2", "3.3", "3.4", "head"]
23+
ruby: ["3.2", "3.3", "3.4", "head"]
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: ruby/setup-ruby@v1

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ AllCops:
88
DisplayCopNames: true
99
DisplayStyleGuide: true
1010
NewCops: enable
11-
TargetRubyVersion: 3.1
11+
TargetRubyVersion: 3.2
1212
Exclude:
1313
- "tmp/**/*"
1414
- "vendor/**/*"

lib/mighty_test/watcher/event_queue.rb

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,12 @@ def stopped?
5151
attr_reader :console, :file_system, :file_system_listener, :file_system_queue
5252

5353
def pop_files_changed
54-
paths = try_file_system_pop(timeout: 0.2)
54+
paths = file_system_queue.pop(timeout: 0.2)
5555
return if paths.nil?
5656

5757
paths += file_system_queue.pop until file_system_queue.empty?
5858
paths.uniq
5959
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
7660
end
7761
end
7862
end

mighty_test.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
99
spec.summary = "A modern Minitest runner for TDD, with watch mode and more"
1010
spec.homepage = "https://github.com/mattbrictson/mighty_test"
1111
spec.license = "MIT"
12-
spec.required_ruby_version = ">= 3.1"
12+
spec.required_ruby_version = ">= 3.2"
1313

1414
spec.metadata = {
1515
"bug_tracker_uri" => "https://github.com/mattbrictson/mighty_test/issues",

0 commit comments

Comments
 (0)