Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-redis for openSUSE:Factory checked in at 2026-07-15 16:34:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-redis (Old) and /work/SRC/openSUSE:Factory/.rubygem-redis.new.1991 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-redis" Wed Jul 15 16:34:00 2026 rev:2 rq:1365329 version:5.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-redis/rubygem-redis.changes 2024-12-13 22:34:54.053470860 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-redis.new.1991/rubygem-redis.changes 2026-07-15 16:51:08.785924478 +0200 @@ -1,0 +2,6 @@ +Mon Jul 13 10:51:34 UTC 2026 - Aleksei Burlakov <[email protected]> + +- New upstream release version 5.4.1: + * Properly handle NOSCRIPT errors. + +------------------------------------------------------------------- Old: ---- redis-5.3.0.gem New: ---- redis-5.4.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-redis.spec ++++++ --- /var/tmp/diff_new_pack.iPDyaM/_old 2026-07-15 16:51:10.225973408 +0200 +++ /var/tmp/diff_new_pack.iPDyaM/_new 2026-07-15 16:51:10.229973543 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-redis # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,13 +24,13 @@ # Name: rubygem-redis -Version: 5.3.0 +Version: 5.4.1 Release: 0 %define mod_name redis %define mod_full_name %{mod_name}-%{version} -BuildRequires: ruby-macros >= 5 BuildRequires: %{ruby >= 2.6.0} BuildRequires: %{rubygem gem2rpm} +BuildRequires: ruby-macros >= 5 URL: https://github.com/redis/redis-rb Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml ++++++ redis-5.3.0.gem -> redis-5.4.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2024-08-21 08:33:32.000000000 +0200 +++ new/CHANGELOG.md 2025-07-17 10:23:21.000000000 +0200 @@ -1,5 +1,16 @@ # Unreleased +# 5.4.1 + +- Properly handle NOSCRIPT errors. + +# 5.4.0 + +- Fix `blmpop` method to actually use `BLMPOP`, it was mistakenly issuing `LMPOP` commands. +- `xadd` now accepts a `minid:` argument. +- `zrank` and `zrevrank` now accepts `with_score:` argument. +- `Redis#call` now accept a block, allowing to use `Redis` instances where `RedisClient` is expected. + # 5.3.0 - Fix the return type of `hgetall` when used inside a `multi` transaction which is itself inside a pipeline. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2024-08-21 08:33:32.000000000 +0200 +++ new/README.md 2025-07-17 10:23:21.000000000 +0200 @@ -34,7 +34,7 @@ redis = Redis.new(url: "redis://:[email protected]:6380/15") ``` -The client expects passwords with special chracters to be URL-encoded (i.e. +The client expects passwords with special characters to be URL-encoded (i.e. `CGI.escape(password)`). To connect to Redis listening on a Unix socket, try: @@ -77,7 +77,7 @@ has one and only one connection to the server, and use of this connection is protected by a mutex. -As such it is heavilly recommended to use the [`connection_pool` gem](https://github.com/mperham/connection_pool), e.g.: +As such it is heavily recommended to use the [`connection_pool` gem](https://github.com/mperham/connection_pool), e.g.: ```ruby module MyApp @@ -139,7 +139,7 @@ redis = Redis.new(name: 'mymaster', sentinels: SENTINELS, role: :master, password: 'mysecret') ``` -So you have to provide Sentinel credential and Redis explictly even they are the same +So you have to provide Sentinel credential and Redis explicitly even they are the same ```ruby # Use 'mysecret' to authenticate against the mymaster instance and sentinel @@ -406,7 +406,7 @@ ``` If your application doesn't call `Bundler.require`, you may have -to require it explictly: +to require it explicitly: ```ruby require "hiredis-client" Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/client.rb new/lib/redis/client.rb --- old/lib/redis/client.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/client.rb 2025-07-17 10:23:21.000000000 +0200 @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'redis-client' - class Redis class Client < ::RedisClient ERROR_MAPPING = { @@ -17,6 +15,9 @@ RedisClient::ProtocolError => Redis::ProtocolError, RedisClient::OutOfMemoryError => Redis::OutOfMemoryError, } + if defined?(RedisClient::NoScriptError) + ERROR_MAPPING[RedisClient::NoScriptError] = Redis::NoScriptError + end class << self def config(**kwargs) @@ -86,6 +87,12 @@ undef_method :call_once_v undef_method :blocking_call + def ensure_connected(retryable: true, &block) + super(retryable: retryable, &block) + rescue ::RedisClient::Error => error + Client.translate_error!(error) + end + def call_v(command, &block) super(command, &block) rescue ::RedisClient::Error => error diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/commands/lists.rb new/lib/redis/commands/lists.rb --- old/lib/redis/commands/lists.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/commands/lists.rb 2025-07-17 10:23:21.000000000 +0200 @@ -205,7 +205,7 @@ def blmpop(timeout, *keys, modifier: "LEFT", count: nil) raise ArgumentError, "Pick either LEFT or RIGHT" unless modifier == "LEFT" || modifier == "RIGHT" - args = [:lmpop, keys.size, *keys, modifier] + args = [:blmpop, timeout, keys.size, *keys, modifier] args << "COUNT" << Integer(count) if count send_blocking_command(args, timeout) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/commands/sorted_sets.rb new/lib/redis/commands/sorted_sets.rb --- old/lib/redis/commands/sorted_sets.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/commands/sorted_sets.rb 2025-07-17 10:23:21.000000000 +0200 @@ -454,21 +454,55 @@ # Determine the index of a member in a sorted set. # + # @example Retrieve member rank + # redis.zrank("zset", "a") + # # => 3 + # @example Retrieve member rank with their score + # redis.zrank("zset", "a", :with_score => true) + # # => [3, 32.0] + # # @param [String] key # @param [String] member - # @return [Integer] - def zrank(key, member) - send_command([:zrank, key, member]) + # + # @return [Integer, [Integer, Float]] + # - when `:with_score` is not specified, an Integer + # - when `:with_score` is specified, a `[rank, score]` pair + def zrank(key, member, withscore: false, with_score: withscore) + args = [:zrank, key, member] + + if with_score + args << "WITHSCORE" + block = FloatifyPair + end + + send_command(args, &block) end # Determine the index of a member in a sorted set, with scores ordered from # high to low. # + # @example Retrieve member rank + # redis.zrevrank("zset", "a") + # # => 3 + # @example Retrieve member rank with their score + # redis.zrevrank("zset", "a", :with_score => true) + # # => [3, 32.0] + # # @param [String] key # @param [String] member - # @return [Integer] - def zrevrank(key, member) - send_command([:zrevrank, key, member]) + # + # @return [Integer, [Integer, Float]] + # - when `:with_score` is not specified, an Integer + # - when `:with_score` is specified, a `[rank, score]` pair + def zrevrank(key, member, withscore: false, with_score: withscore) + args = [:zrevrank, key, member] + + if with_score + args << "WITHSCORE" + block = FloatifyPair + end + + send_command(args, &block) end # Remove all members in a sorted set within the given indexes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/commands/streams.rb new/lib/redis/commands/streams.rb --- old/lib/redis/commands/streams.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/commands/streams.rb 2025-07-17 10:23:21.000000000 +0200 @@ -41,18 +41,25 @@ # @param opts [Hash] several options for `XADD` command # # @option opts [String] :id the entry id, default value is `*`, it means auto generation - # @option opts [Integer] :maxlen max length of entries - # @option opts [Boolean] :approximate whether to add `~` modifier of maxlen or not + # @option opts [Integer] :maxlen max length of entries to keep + # @option opts [Integer] :minid min id of entries to keep + # @option opts [Boolean] :approximate whether to add `~` modifier of maxlen/minid or not # @option opts [Boolean] :nomkstream whether to add NOMKSTREAM, default is not to add # # @return [String] the entry id - def xadd(key, entry, approximate: nil, maxlen: nil, nomkstream: nil, id: '*') + def xadd(key, entry, approximate: nil, maxlen: nil, minid: nil, nomkstream: nil, id: '*') args = [:xadd, key] args << 'NOMKSTREAM' if nomkstream if maxlen + raise ArgumentError, "can't supply both maxlen and minid" if minid + args << "MAXLEN" args << "~" if approximate args << maxlen + elsif minid + args << "MINID" + args << "~" if approximate + args << minid end args << id args.concat(entry.flatten) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/commands.rb new/lib/redis/commands.rb --- old/lib/redis/commands.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/commands.rb 2025-07-17 10:23:21.000000000 +0200 @@ -83,12 +83,14 @@ end } + FloatifyPair = lambda { |(first, score)| + [first, Floatify.call(score)] + } + FloatifyPairs = lambda { |value| return value unless value.respond_to?(:each_slice) - value.each_slice(2).map do |member, score| - [member, Floatify.call(score)] - end + value.each_slice(2).map(&FloatifyPair) } HashifyInfo = lambda { |reply| @@ -199,8 +201,8 @@ # hash, are up to consumers. # # Redis error replies are raised as Ruby exceptions. - def call(*command) - send_command(command) + def call(*command, &block) + send_command(command, &block) end # Interact with the sentinel command (masters, master, slaves, failover) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/distributed.rb new/lib/redis/distributed.rb --- old/lib/redis/distributed.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/distributed.rb 2025-07-17 10:23:21.000000000 +0200 @@ -752,14 +752,14 @@ end # Determine the index of a member in a sorted set. - def zrank(key, member) - node_for(key).zrank(key, member) + def zrank(key, member, **options) + node_for(key).zrank(key, member, **options) end # Determine the index of a member in a sorted set, with scores ordered from # high to low. - def zrevrank(key, member) - node_for(key).zrevrank(key, member) + def zrevrank(key, member, **options) + node_for(key).zrevrank(key, member, **options) end # Remove all members in a sorted set within the given indexes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/errors.rb new/lib/redis/errors.rb --- old/lib/redis/errors.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/errors.rb 2025-07-17 10:23:21.000000000 +0200 @@ -29,6 +29,11 @@ class OutOfMemoryError < CommandError end + if defined?(RedisClient::NoScriptError) + class NoScriptError < CommandError + end + end + # Base error for connection related errors. class BaseConnectionError < BaseError end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis/version.rb new/lib/redis/version.rb --- old/lib/redis/version.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis/version.rb 2025-07-17 10:23:21.000000000 +0200 @@ -1,5 +1,5 @@ # frozen_string_literal: true class Redis - VERSION = '5.3.0' + VERSION = '5.4.1' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/redis.rb new/lib/redis.rb --- old/lib/redis.rb 2024-08-21 08:33:32.000000000 +0200 +++ new/lib/redis.rb 2025-07-17 10:23:21.000000000 +0200 @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "redis-client" + require "monitor" require "redis/errors" require "redis/commands" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2024-08-21 08:33:32.000000000 +0200 +++ new/metadata 2025-07-17 10:23:21.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: redis version: !ruby/object:Gem::Version - version: 5.3.0 + version: 5.4.1 platform: ruby authors: - Ezra Zygmuntowicz @@ -13,10 +13,9 @@ - Michel Martens - Damian Janowski - Pieter Noordhuis -autorequire: bindir: bin cert_chain: [] -date: 2024-08-21 00:00:00.000000000 Z +date: 2025-07-17 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: redis-client @@ -75,10 +74,9 @@ metadata: bug_tracker_uri: https://github.com/redis/redis-rb/issues changelog_uri: https://github.com/redis/redis-rb/blob/master/CHANGELOG.md - documentation_uri: https://www.rubydoc.info/gems/redis/5.3.0 + documentation_uri: https://www.rubydoc.info/gems/redis/5.4.1 homepage_uri: https://github.com/redis/redis-rb - source_code_uri: https://github.com/redis/redis-rb/tree/v5.3.0 -post_install_message: + source_code_uri: https://github.com/redis/redis-rb/tree/v5.4.1 rdoc_options: [] require_paths: - lib @@ -93,8 +91,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.5.11 -signing_key: +rubygems_version: 3.6.2 specification_version: 4 summary: A Ruby client library for Redis test_files: []
