diff --git a/Gemfile.lock b/Gemfile.lock index 8c5ae0e5..88f6ab79 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ GEM byebug (11.1.3) coderay (1.1.3) concurrent-ruby (1.2.0) - connection_pool (2.3.0) + connection_pool (2.4.1) google-protobuf (3.21.12) google-protobuf (3.21.12-x86_64-darwin) google-protobuf (3.21.12-x86_64-linux) @@ -45,8 +45,8 @@ GEM google-protobuf (~> 3.19) googleapis-common-protos-types (~> 1.0) hiredis (0.6.3) - hiredis-client (0.12.1) - redis-client (= 0.12.1) + hiredis-client (0.18.0) + redis-client (= 0.18.0) i18n (1.12.0) concurrent-ruby (~> 1.0) json (2.6.3) @@ -69,9 +69,9 @@ GEM rake (13.0.6) rake-compiler (1.2.1) rake - redis (5.0.6) - redis-client (>= 0.9.0) - redis-client (0.12.1) + redis (5.0.8) + redis-client (>= 0.17.0) + redis-client (0.18.0) connection_pool regexp_parser (2.6.1) rexml (3.2.5) @@ -134,4 +134,4 @@ DEPENDENCIES webrick BUNDLED WITH - 2.4.3 + 2.4.21 diff --git a/gemfiles/redis_5.gemfile.lock b/gemfiles/redis_5.gemfile.lock index 6683bd70..dbee2d17 100644 --- a/gemfiles/redis_5.gemfile.lock +++ b/gemfiles/redis_5.gemfile.lock @@ -1,28 +1,28 @@ PATH remote: .. specs: - semian (0.16.0) + semian (0.20.1) GEM remote: https://rubygems.org/ specs: - connection_pool (2.3.0) + connection_pool (2.4.1) hiredis (0.6.3) - hiredis-client (0.12.1) - redis-client (= 0.12.1) - minitest (5.17.0) - mocha (2.0.2) + hiredis-client (0.18.0) + redis-client (= 0.18.0) + minitest (5.20.0) + mocha (2.1.0) ruby2_keywords (>= 0.0.5) - rake (13.0.6) - rake-compiler (1.2.1) + rake (13.1.0) + rake-compiler (1.2.5) rake - redis (5.0.6) - redis-client (>= 0.9.0) - redis-client (0.12.1) + redis (5.0.8) + redis-client (>= 0.17.0) + redis-client (0.18.0) connection_pool ruby2_keywords (0.0.5) toxiproxy (2.0.2) - webrick (1.7.0) + webrick (1.8.1) PLATFORMS aarch64-linux @@ -44,4 +44,4 @@ DEPENDENCIES webrick BUNDLED WITH - 2.4.3 + 2.4.21 diff --git a/lib/semian/redis.rb b/lib/semian/redis.rb index a7bb1aaf..4ea19422 100644 --- a/lib/semian/redis.rb +++ b/lib/semian/redis.rb @@ -4,7 +4,7 @@ require "redis" if Redis::VERSION >= "5" - gem "redis", ">= 5.0.3" + gem "redis", ">= 5.0.7" require "semian/redis/v5" return end diff --git a/lib/semian/redis/v5.rb b/lib/semian/redis/v5.rb index 71e5cdc9..032200df 100644 --- a/lib/semian/redis/v5.rb +++ b/lib/semian/redis/v5.rb @@ -42,13 +42,11 @@ def semian_identifier end module RedisV5Client - private - def translate_error!(error) redis_error = translate_error_class(error.class) if redis_error < ::Semian::AdapterError redis_error = redis_error.new(error.message) - redis_error.semian_identifier = semian_identifier + redis_error.semian_identifier = error.semian_identifier end raise redis_error, error.message, error.backtrace end @@ -56,4 +54,4 @@ def translate_error!(error) end ::Redis.prepend(Semian::RedisV5) -::Redis::Client.prepend(Semian::RedisV5Client) +::Redis::Client.singleton_class.prepend(Semian::RedisV5Client)