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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7510ed2d846ec08694d4ef31126f610a3f2f92c9b99f9a220150636988bef20
4
- data.tar.gz: 0c5b86eeb4f8443cbde092921a9a232e8f899a0885b6337b4f4c4a4e96b29432
3
+ metadata.gz: e6a10a3762b8378dd9efe3a4d1b41220691224b6f45fc6af2b06874fe1670cbf
4
+ data.tar.gz: f81892b9c196e999bde41136a0fbb667e8ff5ddec7c16842afe86847b2872f71
5
5
  SHA512:
6
- metadata.gz: e03ef35978174cd3347a6e14ba086d8f7cfd02fb231cfdc6f82e400d75b1947fe8a70f51ac763ffa735d2a30e07509bd0e816bd84ef2534c67fd8928925e91c4
7
- data.tar.gz: 65718c4f68167d77a5abedad10ff783fd41e1ca8e256845db992a210fbea0d8f9d45494f34632c28e41cc0b68ca9e652bab1d6382025264c68fe6fc316940b4c
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.png)](http://badge.fury.io/rb/redis-store)
49
- [![Build Status](https://secure.travis-ci.org/redis-store/redis-store.png?branch=master)](http://travis-ci.org/redis-store/redis-store?branch=master)
50
- [![Code Climate](https://codeclimate.com/github/redis-store/redis-store.png)](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}"
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  class Store < self
3
- VERSION = '1.8.1'
3
+ VERSION = '1.8.2'
4
4
  end
5
5
  end
@@ -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.1
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: 2019-10-29 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis