Skip to content

Commit

Permalink
Ruby 3.1 is required
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Sep 14, 2024
1 parent 727ed90 commit 738a3c0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AllCops:
- 'gemfiles/**/*'
DisplayCopNames: true
SuggestExtensions: false
TargetRubyVersion: 2.6
TargetRubyVersion: 3.1

Standard/BlockSingleLineBraces:
Enabled: false
Expand Down
2 changes: 1 addition & 1 deletion anyt-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
spec.files = Dir.glob("lib/**/*") + Dir.glob("bin/*") + %w[README.md MIT-LICENSE]
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.6.0"
spec.required_ruby_version = ">= 3.1.0"

spec.add_dependency "rack", ">= 2.0"
spec.add_dependency "rails", ">= 6.0"
Expand Down
1 change: 0 additions & 1 deletion etc/tests/periodic_timers_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def transmit_progress
scenario %(
Periodic timers
) do

msg = client.receive
assert_equal 1, msg["message"]["progress"]

Expand Down
12 changes: 6 additions & 6 deletions lib/anyt/ext/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def handlers
# Kernel extensions
module Kernel
## Wraps `describe` and include shared helpers
private def feature(*args, &block)
cls = describe(*args, &block)
private def feature(...)
cls = describe(...)
cls.include Anyt::TestHelpers
cls
end
Expand All @@ -108,12 +108,12 @@ def scenario(desc, &block)

# Generates Channel class dynamically and
# add memoized helper to access its name
def channel(id = nil, &block)
def channel(id = nil, &)
class_name = @name.gsub(/\s+/, "_")
class_name += "_#{id}" if id
class_name += "_channel"

cls = Class.new(ApplicationCable::Channel, &block)
cls = Class.new(ApplicationCable::Channel, &)

Anyt::TestChannels.const_set(class_name.classify, cls)

Expand All @@ -123,8 +123,8 @@ def channel(id = nil, &block)
end

# Add new #connect handler
def connect_handler(tag, &block)
Anyt::ConnectHandlers.add(tag, &block)
def connect_handler(tag, &)
Anyt::ConnectHandlers.add(tag, &)
end
end

Expand Down

0 comments on commit 738a3c0

Please sign in to comment.