From 3721b859b605233ae577453532e71b0a969e8116 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Thu, 23 Feb 2017 10:48:30 +1030 Subject: Deprecate the EventedRedis subscription adapter Unlike Faye support, it seems a bit too documented to remove without warning. So, here's a warning. --- actioncable/lib/action_cable/subscription_adapter/evented_redis.rb | 6 ++++++ actioncable/test/subscription_adapter/evented_redis_test.rb | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'actioncable') diff --git a/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb b/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb index 56b068976b..ed8f315791 100644 --- a/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb +++ b/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb @@ -24,6 +24,12 @@ module ActionCable cattr_accessor(:redis_connector) { ->(config) { ::Redis.new(url: config[:url]) } } def initialize(*) + ActiveSupport::Deprecation.warn(<<-MSG.squish) + The "evented_redis" subscription adapter is deprecated and + will be removed in Rails 5.2. Please use the "redis" adapter + instead. + MSG + super @redis_connection_for_broadcasts = @redis_connection_for_subscriptions = nil end diff --git a/actioncable/test/subscription_adapter/evented_redis_test.rb b/actioncable/test/subscription_adapter/evented_redis_test.rb index c55d35848e..256458bc24 100644 --- a/actioncable/test/subscription_adapter/evented_redis_test.rb +++ b/actioncable/test/subscription_adapter/evented_redis_test.rb @@ -7,7 +7,9 @@ class EventedRedisAdapterTest < ActionCable::TestCase include ChannelPrefixTest def setup - super + assert_deprecated do + super + end # em-hiredis is warning-rich @previous_verbose, $VERBOSE = $VERBOSE, nil -- cgit v1.2.3