Skip to content

Commit deb4f33

Browse files
committed
Commit to [email protected] support
Closes [#681][] First, remove `[email protected]` syntax including `...` arguments and end-less method definitions. Next, add `[email protected]` and `[email protected]` to the CI matrix along with `[email protected]`. [#681]: #681
1 parent 780ee0d commit deb4f33

File tree

5 files changed

+26
-13
lines changed

5 files changed

+26
-13
lines changed

.github/workflows/ci.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ jobs:
55
strategy:
66
fail-fast: false
77
matrix:
8-
rails: [ "6.1", "7.0", "7.1" ]
9-
ruby: [ "3.0", "3.1", "3.2", "3.3" ]
8+
rails: [ "6.1", "7.0", "7.1", "7.2" ]
9+
ruby: [ "2.7", "3.0", "3.1", "3.2", "3.3" ]
1010
allow-fail: [ false ]
1111
include:
12+
- { ruby: "2.6", rails: "6.1" }
1213
- { ruby: "3.3", rails: "main", allow-fail: true }
1314
- { ruby: "3.2", rails: "main", allow-fail: true }
1415
- { ruby: "head", rails: "main", allow-fail: true }
16+
exclude:
17+
- { ruby: "2.7", rails: "7.2" }
18+
- { ruby: "3.0", rails: "7.2" }
1519

1620
env:
1721
FERRUM_PROCESS_TIMEOUT: 25
@@ -33,6 +37,7 @@ jobs:
3337

3438
- name: Run Bug Template Tests
3539
run: ruby bug_report_template.rb || ruby bug_report_template.rb
40+
continue-on-error: ${{ startsWith(matrix.ruby, '2') || false }}
3641

3742
- name: Run tests
3843
id: test

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
22

33
gemspec
44

5-
rails_version = ENV.fetch("RAILS_VERSION", "7.1")
5+
rails_version = ENV.fetch("RAILS_VERSION", "7.2")
66

77
if rails_version == "main"
88
rails_constraint = { github: "rails/rails" }

test/streams/broadcastable_test.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ class Turbo::BroadcastableTest < ActionCable::Channel::TestCase
99

1010
test "broadcasting ignores blank streamables" do
1111
ActionCable.server.stub :broadcast, proc { flunk "expected no broadcasts" } do
12-
@message.broadcast_remove_to nil
13-
@message.broadcast_remove_to [nil]
14-
@message.broadcast_remove_to ""
15-
@message.broadcast_remove_to [""]
12+
assert_no_broadcasts @message.to_gid_param do
13+
@message.broadcast_remove_to nil
14+
@message.broadcast_remove_to [nil]
15+
@message.broadcast_remove_to ""
16+
@message.broadcast_remove_to [""]
17+
end
1618
end
1719
end
1820

test/streams/streams_helper_test.rb

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ class TestChannel < ApplicationCable::Channel; end
44

55
class Turbo::StreamsHelperTest < ActionView::TestCase
66
class Component
7-
extend ActiveModel::Naming
7+
include ActiveModel::Model
88

9-
def initialize(id:, content:) = (@id, @content = id, content)
10-
def render_in(...) = @content
11-
def to_key = [@id]
9+
attr_accessor :id, :content
10+
11+
def render_in(view_context)
12+
content
13+
end
14+
15+
def to_key
16+
[id]
17+
end
1218
end
1319

1420
attr_accessor :formats

test/test_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
ActionCable.server.config.logger = Logger.new(STDOUT) if ENV["VERBOSE"]
99

1010
module ActionViewTestCaseExtensions
11-
def render(...)
12-
ApplicationController.renderer.render(...)
11+
def render(*args, &block)
12+
ApplicationController.renderer.render(*args, &block)
1313
end
1414
end
1515

0 commit comments

Comments
 (0)