activerecord-simple-slave 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/activerecord/simple_slave.rb +6 -3
- data/lib/activerecord/simple_slave/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7323496abbfea9ec9c02ec6df888f370fec0bb03aa3b5bb59acd2b32f66f338e
|
4
|
+
data.tar.gz: 06214a36ab488d5fb8092e97e17b3be527f5b7c3eacdbc72a43acdce02e948a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 615b62d0383052d3b5d61a03700ea1937cdae9c7440ecaa78749e8c66ae83389b8c051925a4f8c2d61e624fb19866e06a3df65f535913d2fc535409fdfee226a
|
7
|
+
data.tar.gz: fbd166c04b1f01fa4d00219881438b6ae2ead2b5174dce853e7b155fee0a476f6d98d9e7fbf08381cfb70afbbb7864560531acde552c2c63cd8e1ea396402931
|
data/Gemfile.lock
CHANGED
@@ -44,9 +44,12 @@ module ActiveRecord
|
|
44
44
|
def with_slave(&_block)
|
45
45
|
retvalue = nil
|
46
46
|
simple_slave_connection_pool.with_connection do |connection|
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
begin
|
48
|
+
Thread.current[:simple_slave_connection] = connection
|
49
|
+
retvalue = yield(connection)
|
50
|
+
ensure
|
51
|
+
Thread.current[:simple_slave_connection] = nil
|
52
|
+
end
|
50
53
|
end
|
51
54
|
retvalue
|
52
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-simple-slave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien D.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|