Skip to content

Commit cd5eec8

Browse files
authored
Merge pull request rails#54375 from byroot/remote-on-rotate-arg
Remove `rotate(on_rotation:)` argument
2 parents fc906ea + aaf7da8 commit cd5eec8

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

activesupport/lib/active_support/messages/rotator.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ def initialize(*args, on_rotation: nil, **options)
1111
@on_rotation = on_rotation
1212
end
1313

14-
def rotate(*args, on_rotation: nil, **options)
15-
@on_rotation = on_rotation if on_rotation
14+
def rotate(*args, **options)
1615
fall_back_to build_rotation(*args, **options)
1716
end
1817

activesupport/test/messages/message_rotator_tests.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ def self.load(*); raise Class.new(StandardError); end
4545
assert called
4646
end
4747

48-
test "rotate(on_rotation:) is called on successful rotation" do
49-
called = nil
50-
codec = make_codec(secret("new")).rotate(secret("old"), on_rotation: proc { called = true })
51-
old_codec = make_codec(secret("old"))
52-
old_message = encode(DATA, old_codec)
53-
assert_equal DATA, decode(old_message, codec)
54-
assert called
55-
end
56-
5748
test "rotate().on_rotation is called on successful rotation" do
5849
called = nil
5950
codec = make_codec(secret("new")).rotate(secret("old")).on_rotation do

0 commit comments

Comments
 (0)