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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4689abbe0340e8c683371bac1b94b29893a7c5b
4
- data.tar.gz: 41678b7dd50984a9b7c0c974e2a9eadf6d8a712d
3
+ metadata.gz: 735c34367c9ed2f4bdd4d64e96c22068bb2956b4
4
+ data.tar.gz: 4e0cac119a34d58e46a2d65c3dfab74bda1394fd
5
5
  SHA512:
6
- metadata.gz: 917dad1c9f8edd6eb355dbdec952d7ade90b45b6fa7b1dd81266dff885ff09bf7d5fbf2e01a3d0ffec05e6c7dccff46d6f14b52fae790e1030a7c30d0c9da84f
7
- data.tar.gz: e64a57836c26bcc882517f2de31fb1c9b3a95394c9794f10646fd77f244e3db454bec529e92376fb7ff802dec048ec355b3f7c254e3140022a52b32bbc7fda7b
6
+ metadata.gz: c1f48c5fa92ea83c2dcf0df1368d69d60564c69fdffaa82855ef9b898cfa446afa377bdc7a1590bbc82f0ff4282cdce274a615d99810624b7bbb132ca3636326
7
+ data.tar.gz: 84ffd1f1185315c8d128c23b598b88b8fca03ede54e794afd8fc42ad2642312d5a086af735f2282e30f734fc83f3c04f011b22be8df2597575ca91bf079ddd29
data/.travis.yml CHANGED
@@ -2,3 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1
6
+ - 2.2
@@ -68,7 +68,13 @@ class Redis
68
68
  if value.nil?
69
69
  nil
70
70
  elsif options[:marshal] || domarshal
71
- Marshal.load(value)
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
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  module Objects
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  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.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-07-29 00:00:00.000000000 Z
11
+ date: 2014-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis