hired is is loaded differently with redis gem version 5
MODIFY
lib/beetle.rb
lib/beetle.rb
$:.unshift(File.expand_path('..', __FILE__))
require 'bunny' # which bunny picks up
require 'qrack/errors' # needed by the publisher
+begin
require 'redis/connection/hiredis' # require *before* redis as specified in the redis-rb gem docs
require 'redis'
+rescue LoadError
+ require 'redis'
+ require 'hiredis-client'
+end
require 'active_support/all'
require 'set'
require 'socket'

MODIFY
test/beetle/redis_ext_test.rb
test/beetle/redis_ext_test.rb
@@ -57,7 +57,11 @@ module Beetle
class HiredisLoadedTest < Minitest::Test
test "should be using hiredis instead of the redis ruby backend" do
+ if Redis::VERSION < "5.0"
assert defined?(Hiredis)
+ else
+ assert_equal RedisClient.default_driver, RedisClient::HiredisConnection
+ end
end
end

hired is is loaded differently with redis gem version 5