redis-store 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/redis/store/namespace.rb +16 -0
- data/lib/redis/store/version.rb +1 -1
- data/test/redis/store/namespace_test.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6a10a3762b8378dd9efe3a4d1b41220691224b6f45fc6af2b06874fe1670cbf
|
4
|
+
data.tar.gz: f81892b9c196e999bde41136a0fbb667e8ff5ddec7c16842afe86847b2872f71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a63ad83287d6bc1249ce4980300745cf68243c61c274014b20f49bf0f395e3eb2b0b6e8899217fbf1d14792afc0f6ff54ca82844af1de5ab3a63fdf02fa2d27
|
7
|
+
data.tar.gz: 9d834c549cbf74c18d1f9042216f10016fcb6b2115f3784c03fdc19923bd189382ac1dd88cd658524fe9e9579f24afb0ef25e8d005ce718a1b0441345856e0f1
|
data/README.md
CHANGED
@@ -45,9 +45,9 @@ s.add_dependency 'redis-store', '>= 1.4', '< 2'
|
|
45
45
|
|
46
46
|
## Status
|
47
47
|
|
48
|
-
[![Gem Version](https://badge.fury.io/rb/redis-store.
|
49
|
-
[![Build Status](https://secure.travis-ci.org/redis-store/redis-store.
|
50
|
-
[![Code Climate](https://codeclimate.com/github/redis-store/redis-store.
|
48
|
+
[![Gem Version](https://badge.fury.io/rb/redis-store.svg)](http://badge.fury.io/rb/redis-store)
|
49
|
+
[![Build Status](https://secure.travis-ci.org/redis-store/redis-store.svg?branch=master)](http://travis-ci.org/redis-store/redis-store?branch=master)
|
50
|
+
[![Code Climate](https://codeclimate.com/github/redis-store/redis-store.svg)](https://codeclimate.com/github/redis-store/redis-store)
|
51
51
|
|
52
52
|
## Copyright
|
53
53
|
|
@@ -102,6 +102,22 @@ class Redis
|
|
102
102
|
namespace(key) { |k| super(k) }
|
103
103
|
end
|
104
104
|
|
105
|
+
def zincrby(key, increment, member)
|
106
|
+
namespace(key) { |k| super(k, increment, member) }
|
107
|
+
end
|
108
|
+
|
109
|
+
def zscore(key, member)
|
110
|
+
namespace(key) { |k| super(k, member) }
|
111
|
+
end
|
112
|
+
|
113
|
+
def zadd(key, increment, member)
|
114
|
+
namespace(key) { |k| super(k, increment, member) }
|
115
|
+
end
|
116
|
+
|
117
|
+
def zrem(key, member)
|
118
|
+
namespace(key) { |k| super(k, member) }
|
119
|
+
end
|
120
|
+
|
105
121
|
def to_s
|
106
122
|
if namespace_str
|
107
123
|
"#{super} with namespace #{namespace_str}"
|
data/lib/redis/store/version.rb
CHANGED
@@ -223,5 +223,25 @@ describe "Redis::Store::Namespace" do
|
|
223
223
|
client.expects(:call).with([:hlen, "#{@namespace}:rabbit"])
|
224
224
|
store.hlen("rabbit")
|
225
225
|
end
|
226
|
+
|
227
|
+
it "should namespace zincrby" do
|
228
|
+
client.expects(:call).with([:zincrby, "#{@namespace}:rabbit", 1.0, "member"])
|
229
|
+
store.zincrby("rabbit", 1.0, "member")
|
230
|
+
end
|
231
|
+
|
232
|
+
it "should namespace zscore" do
|
233
|
+
client.expects(:call).with([:zscore, "#{@namespace}:rabbit", "member"])
|
234
|
+
store.zscore("rabbit", "member")
|
235
|
+
end
|
236
|
+
|
237
|
+
it "should namespace zadd" do
|
238
|
+
client.expects(:call).with([:zadd, "#{@namespace}:rabbit", 1.0, "member"])
|
239
|
+
store.zadd("rabbit", 1.0, "member")
|
240
|
+
end
|
241
|
+
|
242
|
+
it "should namespace zrem" do
|
243
|
+
client.expects(:call).with([:zrem, "#{@namespace}:rabbit", "member"])
|
244
|
+
store.zrem("rabbit", "member")
|
245
|
+
end
|
226
246
|
end
|
227
247
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|