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 494d569
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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.6", "2.7", "3.0", "3.1", "3.2", "3.3" ]
allow-fail: [ false ]
include:
- { ruby: "3.3", rails: "main", allow-fail: true }
Expand Down
12 changes: 8 additions & 4 deletions test/streams/streams_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
class TestChannel < ApplicationCable::Channel; end

class Turbo::StreamsHelperTest < ActionView::TestCase
class Component
Component = Struct.new(:id, :content) do
extend ActiveModel::Naming

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

def to_key
[id]
end
end

attr_accessor :formats
Expand Down

0 comments on commit 494d569

Please sign in to comment.