redis-hash 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/redis_hash.rb +4 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bb41716c01e4eab76eff18483a814bb3c200b53
4
- data.tar.gz: e7f14f833828cc07f90d72b36189c1018b92e390
3
+ metadata.gz: 85a8b1962255ec8f93b16d178f4e3c10cef67c28
4
+ data.tar.gz: a8a13239647b7e360e0fff89013b2c3838338403
5
5
  SHA512:
6
- metadata.gz: 341facd819d2a24fdb89c1116f38df6d1f8dbe1364e0cc2dab4804a9c960228eae0dbbf8b47e5d2063ce0ca69f84c2acc4dfdd28610b53660c4c736efd2c205d
7
- data.tar.gz: 4ba25754aab9bbed3c87dbd3da00afaf44236310b821166f137acd974d28131a8d96e39a528547053711ea527f5121a9e51f337f906733d75e00a8957b55eb51
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.3"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Misha Conway