redis-hash 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/redis_hash.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a8b1962255ec8f93b16d178f4e3c10cef67c28
|
4
|
+
data.tar.gz: a8a13239647b7e360e0fff89013b2c3838338403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d24c057dc13296b6146ef93c0b7565519278db20671f520f9391c5da470b447047d5bf830d4c114a11a2406d364aac5a8a7e7ad1e6f6a1855f1d842b7d506b0
|
7
|
+
data.tar.gz: 6f53e0c9502c8e7f76cb3ff913435029d8c11a5c3123d648d3fb259fcd53ea804d9ed0ad83508779c79d02ad8871d939b0df35bcda34d5957e5dfcc0c5f3ed56
|
data/lib/redis_hash.rb
CHANGED
@@ -3,7 +3,7 @@ require "redis"
|
|
3
3
|
class RedisHash
|
4
4
|
attr_reader :name
|
5
5
|
|
6
|
-
VERSION = "0.0.
|
6
|
+
VERSION = "0.0.4"
|
7
7
|
|
8
8
|
class InvalidNameException < StandardError; end;
|
9
9
|
class InvalidRedisConfigException < StandardError; end;
|
@@ -17,6 +17,9 @@ class RedisHash
|
|
17
17
|
redis_or_options
|
18
18
|
elsif redis_or_options.kind_of? Hash
|
19
19
|
::Redis.new redis_or_options
|
20
|
+
elsif defined?(ActiveSupport::Cache::RedisStore) && redis_or_options.kind_of?(ActiveSupport::Cache::RedisStore)
|
21
|
+
@pooled = redis_or_options.data.kind_of?(ConnectionPool)
|
22
|
+
redis_or_options.data
|
20
23
|
elsif defined?(ConnectionPool) && redis_or_options.kind_of?(ConnectionPool)
|
21
24
|
@pooled = true
|
22
25
|
redis_or_options
|