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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46f6735771af487ae62253cdb1ca1d35fb1a20e91f5bc97d1f20bee1155cbec3
4
- data.tar.gz: ca0dfda6e5f78f54e374888e43ee603d4464a0f5f38d21fd3e68bb71029affe0
3
+ metadata.gz: 7323496abbfea9ec9c02ec6df888f370fec0bb03aa3b5bb59acd2b32f66f338e
4
+ data.tar.gz: 06214a36ab488d5fb8092e97e17b3be527f5b7c3eacdbc72a43acdce02e948a7
5
5
  SHA512:
6
- metadata.gz: 4e2d6ba1333be806c865c514d0c175af067d5bf1cf8ab0516223c3d57253daa4ab6307710470640bb655a6332a70e034c7010c6bb7d1cee28ce2c5eb9959ef3d
7
- data.tar.gz: ca44e935a30a9e5859fa3d485508a72cea27a5e38a002d8941ed523afdaa3278549c54882c8cad87f9c36e35103747b5c2175268e3e69ef9eec08bf6712879fd
6
+ metadata.gz: 615b62d0383052d3b5d61a03700ea1937cdae9c7440ecaa78749e8c66ae83389b8c051925a4f8c2d61e624fb19866e06a3df65f535913d2fc535409fdfee226a
7
+ data.tar.gz: fbd166c04b1f01fa4d00219881438b6ae2ead2b5174dce853e7b155fee0a476f6d98d9e7fbf08381cfb70afbbb7864560531acde552c2c63cd8e1ea396402931
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activerecord-simple-slave (1.0.1)
4
+ activerecord-simple-slave (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
- Thread.current[:simple_slave_connection] = connection
48
- retvalue = yield(connection)
49
- Thread.current[:simple_slave_connection] = nil
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module SimpleSlave
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  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.1
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-10-18 00:00:00.000000000 Z
11
+ date: 2018-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler