Skip to content

Commit

Permalink
Add support for Ruby 3.3, drop support for Ruby 3.0. (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix authored Dec 28, 2023
1 parent 977f76a commit 0ebd3c0
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
- macos

ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "head"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand All @@ -37,7 +37,7 @@ jobs:
timeout-minutes: 5
run: bundle exec bake build test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: coverage-${{matrix.os}}-${{matrix.ruby}}
path: .covered.db
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
ruby-version: "3.3"
bundler-cache: true

- name: Installing packages
Expand All @@ -43,7 +43,7 @@ jobs:
run: bundle exec bake utopia:project:static --force no

- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v2
with:
path: docs

Expand All @@ -58,4 +58,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v3
3 changes: 2 additions & 1 deletion .github/workflows/test-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ jobs:
ruby:
- "3.1"
- "3.2"
- "3.3"
- "head"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- macos

ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "head"

experimental: [false]
Expand All @@ -44,7 +44,7 @@ jobs:
experimental: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand Down
2 changes: 1 addition & 1 deletion io-event.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Gem::Specification.new do |spec|

spec.extensions = ["ext/extconf.rb"]

spec.required_ruby_version = ">= 3.0"
spec.required_ruby_version = ">= 3.1"
end
5 changes: 4 additions & 1 deletion lib/io/event/support.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022, by Samuel Williams.
# Copyright, 2022-2023, by Samuel Williams.

class IO
module Event
Expand All @@ -20,6 +20,9 @@ def self.fiber_scheduler_v2?

def self.fiber_scheduler_v3?
if fiber_scheduler_v2?
return true if RUBY_VERSION >= "3.3"

# Feature detection if required:
begin
IO::Buffer.new.slice(0, 0).write(STDOUT)
return true
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ This project uses the [Developer Certificate of Origin](https://developercertifi

### Contributor Covenant

This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
3 changes: 1 addition & 2 deletions test/io/event/selector/cancellable.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021-2023, by Samuel Williams.
# Copyright, 2023, by Math Ieu.
# Copyright, 2023, by Samuel Williams.

require 'io/event'
require 'io/event/selector'
Expand Down
2 changes: 1 addition & 1 deletion test/io/event/selector/process_io.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022, by Samuel Williams.
# Copyright, 2022-2023, by Samuel Williams.
# Copyright, 2023, by Math Ieu.

require 'io/event'
Expand Down

0 comments on commit 0ebd3c0

Please sign in to comment.