redis-objects 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/lib/redis/helpers/core_commands.rb +7 -1
- data/lib/redis/objects/version.rb +1 -1
- data/lib/redis/set.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 735c34367c9ed2f4bdd4d64e96c22068bb2956b4
|
4
|
+
data.tar.gz: 4e0cac119a34d58e46a2d65c3dfab74bda1394fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1f48c5fa92ea83c2dcf0df1368d69d60564c69fdffaa82855ef9b898cfa446afa377bdc7a1590bbc82f0ff4282cdce274a615d99810624b7bbb132ca3636326
|
7
|
+
data.tar.gz: 84ffd1f1185315c8d128c23b598b88b8fca03ede54e794afd8fc42ad2642312d5a086af735f2282e30f734fc83f3c04f011b22be8df2597575ca91bf079ddd29
|
data/.travis.yml
CHANGED
@@ -68,7 +68,13 @@ class Redis
|
|
68
68
|
if value.nil?
|
69
69
|
nil
|
70
70
|
elsif options[:marshal] || domarshal
|
71
|
-
|
71
|
+
if value.is_a?(Array)
|
72
|
+
value.map{|v| unmarshal(v, domarshal)}
|
73
|
+
elsif !value.is_a?(String)
|
74
|
+
value
|
75
|
+
else
|
76
|
+
Marshal.load(value)
|
77
|
+
end
|
72
78
|
else
|
73
79
|
value
|
74
80
|
end
|
data/lib/redis/set.rb
CHANGED
@@ -30,8 +30,8 @@ class Redis
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# return a random member. Redis: SRANDMEMBER
|
33
|
-
def randmember
|
34
|
-
unmarshal redis.srandmember(key)
|
33
|
+
def randmember(count = nil)
|
34
|
+
unmarshal redis.srandmember(key, count)
|
35
35
|
end
|
36
36
|
|
37
37
|
# Adds the specified values to the set. Only works on redis > 2.4
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Wiger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|