From 53c516d88d48bafee5bd125a368352dd94f5fdad Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Thu, 28 Sep 2017 21:54:00 -0700 Subject: redis-rb 4.0 support * Use `gem 'redis', '~> 4.0'` for new app Gemfiles * Loosen Action Cable redis-rb dep to `>= 3.3, < 5` * Bump redis-namespace for looser Redis version dep * Avoid using the underlying `redis.client` directly * Use `Redis.new` instead of `Redis.connect` --- actioncable/lib/action_cable/subscription_adapter/evented_redis.rb | 2 +- actioncable/lib/action_cable/subscription_adapter/redis.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'actioncable/lib/action_cable') diff --git a/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb b/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb index 07774810ce..1227c793a9 100644 --- a/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb +++ b/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb @@ -3,7 +3,7 @@ require "thread" gem "em-hiredis", "~> 0.3.0" -gem "redis", "~> 3.0" +gem "redis", ">= 3", "< 5" require "em-hiredis" require "redis" diff --git a/actioncable/lib/action_cable/subscription_adapter/redis.rb b/actioncable/lib/action_cable/subscription_adapter/redis.rb index facea944ff..c28951608f 100644 --- a/actioncable/lib/action_cable/subscription_adapter/redis.rb +++ b/actioncable/lib/action_cable/subscription_adapter/redis.rb @@ -2,7 +2,7 @@ require "thread" -gem "redis", "~> 3.0" +gem "redis", ">= 3", "< 5" require "redis" module ActionCable @@ -76,7 +76,7 @@ module ActionCable def listen(conn) conn.without_reconnect do - original_client = conn.client + original_client = conn.respond_to?(:_client) ? conn._client : conn.client conn.subscribe("_action_cable_internal") do |on| on.subscribe do |chan, count| -- cgit v1.2.3