lock_and_cache_msgpack 4.0.7.pre3 → 4.0.7.pre4

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: a628bef0137f09af2c8d247200723b8a1b16a71f
4
- data.tar.gz: c4fe2bd04b7cc7b94d7a9754da6d278b6f1822ec
3
+ metadata.gz: e719c0a4a6f9246026c48e4b50684d3852178e02
4
+ data.tar.gz: 03d9c1bad06869e7c5ab1d2e06e0b12991d727cd
5
5
  SHA512:
6
- metadata.gz: 2763b2a4244b56142372fe6ed05622001732a2226fe7d29a6c1aa76bf154694f3009b4b7f51092b60b1bfd09aa5e5312ffc4539da89e595ab4d589dbb376e8d5
7
- data.tar.gz: 176f2516394f978aadc5a5376caba5904fd9aeae4a3a37c4d89ef6651051673838aae665ce20a5edb0d396b7ff1258139de5a3fb2ee1f29455e1a1c1ce9c0aed
6
+ metadata.gz: 5d417868f66d85a2a53909af1a2062f145692a675abdeffb8e7ec89d9f4539daf302041b4426d7fd738de046f51d890198d8eef110054d11ef2e9700085caffb
7
+ data.tar.gz: b8d0201189457a51116616d1401566b03c8b8e2d40cde41dfa2d2937c19ea7713431553d27e1c493a1a0ce5464f0030e5ac609c14492fae835abeb913912a8ea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lock_and_cache_msgpack (4.0.6)
4
+ lock_and_cache_msgpack (4.0.7.pre4)
5
5
  activesupport
6
6
  msgpack (~> 1.1.0)
7
7
  redis
@@ -1,3 +1,3 @@
1
1
  module LockAndCacheMsgpack
2
- VERSION = '4.0.7.pre3'
2
+ VERSION = '4.0.7.pre4'
3
3
  end
@@ -32,8 +32,8 @@ module LockAndCacheMsgpack
32
32
  def LockAndCacheMsgpack.storage
33
33
  @storage ||=
34
34
  begin
35
- raise "only redis for now" unless @redis_connection.class.to_s == 'Redis'
36
- connection = @redis_connection.respond_to?(:call) ? @redis_connection.call : @redis_connection
35
+ connection = @redis_connection.class == Proc ? @redis_connection.call : @redis_connection
36
+ raise "only redis for now" unless connection.class.to_s == 'Redis'
37
37
  @lock_manager = Redlock::Client.new [connection], retry_count: 1
38
38
  connection
39
39
  end
data/spec/spec_helper.rb CHANGED
@@ -4,7 +4,7 @@ require 'lock_and_cache_msgpack'
4
4
  require 'timeout'
5
5
 
6
6
  require 'redis'
7
- LockAndCacheMsgpack.storage = Redis.new
7
+ LockAndCacheMsgpack.storage = -> { Redis.new }
8
8
 
9
9
  require 'thread/pool'
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lock_and_cache_msgpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.7.pre3
4
+ version: 4.0.7.pre4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-14 00:00:00.000000000 Z
12
+ date: 2017-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport