mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:13:38 +08:00
DEV: Update redis gem to 4.8.0 (#19350)
This commit is contained in:
parent
f334de0b4a
commit
773cf045b2
|
@ -341,7 +341,7 @@ GEM
|
|||
msgpack (>= 0.4.3)
|
||||
optimist (>= 3.0.0)
|
||||
rchardet (1.8.0)
|
||||
redis (4.7.1)
|
||||
redis (4.8.0)
|
||||
redis-namespace (1.9.0)
|
||||
redis (>= 4)
|
||||
regexp_parser (2.6.1)
|
||||
|
|
|
@ -50,8 +50,8 @@ class DiscourseRedis
|
|||
:hdel, :hexists, :hget, :hgetall, :hincrby, :hincrbyfloat, :hkeys, :hlen, :hmget, :hmset, :hset, :hsetnx, :hvals, :incr,
|
||||
:incrby, :incrbyfloat, :lindex, :linsert, :llen, :lpop, :lpush, :lpushx, :lrange, :lrem, :lset, :ltrim,
|
||||
:mapped_hmset, :mapped_hmget, :mapped_mget, :mapped_mset, :mapped_msetnx, :move, :mset,
|
||||
:msetnx, :persist, :pexpire, :pexpireat, :psetex, :pttl, :rename, :renamenx, :rpop, :rpoplpush, :rpush, :rpushx, :sadd, :scard,
|
||||
:sdiff, :set, :setbit, :setex, :setnx, :setrange, :sinter, :sismember, :smembers, :sort, :spop, :srandmember, :srem, :strlen,
|
||||
:msetnx, :persist, :pexpire, :pexpireat, :psetex, :pttl, :rename, :renamenx, :rpop, :rpoplpush, :rpush, :rpushx, :sadd, :sadd?, :scard,
|
||||
:sdiff, :set, :setbit, :setex, :setnx, :setrange, :sinter, :sismember, :smembers, :sort, :spop, :srandmember, :srem, :srem?, :strlen,
|
||||
:sunion, :ttl, :type, :watch, :zadd, :zcard, :zcount, :zincrby, :zrange, :zrangebyscore, :zrank, :zrem, :zremrangebyrank,
|
||||
:zremrangebyscore, :zrevrange, :zrevrangebyscore, :zrevrank, :zrangebyscore,
|
||||
:dump, :restore].each do |m|
|
||||
|
|
|
@ -115,6 +115,26 @@ RSpec.describe DiscourseRedis do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#sadd?' do
|
||||
it "should send the right command with the right key prefix to redis" do
|
||||
redis = DiscourseRedis.new
|
||||
|
||||
redis.without_namespace.expects(:sadd?).with("default:testset", "1", anything)
|
||||
|
||||
redis.sadd?("testset", "1")
|
||||
end
|
||||
end
|
||||
|
||||
describe '#srem?' do
|
||||
it "should send the right command with the right key prefix to redis" do
|
||||
redis = DiscourseRedis.new
|
||||
|
||||
redis.without_namespace.expects(:srem?).with("default:testset", "1", anything)
|
||||
|
||||
redis.srem?("testset", "1")
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when namespace is disabled' do
|
||||
let(:redis) { DiscourseRedis.new(nil, namespace: false) }
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user