Skip to content

Commit

Permalink
Commit to ruby@2.6 support
Browse files Browse the repository at this point in the history
Closes [hotwired#681][]

First, remove `ruby@3.0` syntax including `...` arguments and end-less
method definitions.

Next, add `ruby@2.6` and `ruby@2.7` to the CI matrix along with
`rails@7.1`.

[hotwired#681]: hotwired#681
  • Loading branch information
seanpdoyle committed Sep 18, 2024
1 parent 780ee0d commit d926f0f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ jobs:
strategy:
fail-fast: false
matrix:
rails: [ "6.1", "7.0", "7.1" ]
ruby: [ "3.0", "3.1", "3.2", "3.3" ]
rails: [ "6.1", "7.0", "7.1", "7.2" ]
ruby: [ "2.7", "3.0", "3.1", "3.2", "3.3" ]
allow-fail: [ false ]
include:
- { ruby: "2.6", rails: "6.1" }
- { ruby: "3.3", rails: "main", allow-fail: true }
- { ruby: "3.2", rails: "main", allow-fail: true }
- { ruby: "head", rails: "main", allow-fail: true }
exclude:
- { ruby: "2.7", rails: "7.2" }
- { ruby: "3.0", rails: "7.2" }

env:
FERRUM_PROCESS_TIMEOUT: 25
Expand All @@ -33,6 +37,7 @@ jobs:

- name: Run Bug Template Tests
run: ruby bug_report_template.rb || ruby bug_report_template.rb
continue-on-error: ${{ startsWith(matrix.ruby, "2") || false }}

- name: Run tests
id: test
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

gemspec

rails_version = ENV.fetch("RAILS_VERSION", "7.1")
rails_version = ENV.fetch("RAILS_VERSION", "7.2")

if rails_version == "main"
rails_constraint = { github: "rails/rails" }
Expand Down
14 changes: 10 additions & 4 deletions test/streams/streams_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ class TestChannel < ApplicationCable::Channel; end

class Turbo::StreamsHelperTest < ActionView::TestCase
class Component
extend ActiveModel::Naming
include ActiveModel::Model

def initialize(id:, content:) = (@id, @content = id, content)
def render_in(...) = @content
def to_key = [@id]
attr_accessor :id, :content

def render_in(view_context)
content
end

def to_key
[id]
end
end

attr_accessor :formats
Expand Down

0 comments on commit d926f0f

Please sign in to comment.