slave_pools 1.0.0.rc1 → 1.0.0.rc2
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/slave_pools/active_record_extensions.rb +5 -2
- data/lib/slave_pools/version.rb +1 -1
- data/lib/slave_pools.rb +0 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ada15436188b84a0fae0247b38aeac4ec0344649
|
4
|
+
data.tar.gz: 480836da042e92a4c86fc213a9b1033c3e628af7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16ec508961e20c2785b7c9851ffde2856c72f07220abc6a0364c175cac98ead0cbb6c972de9b1d87635636d8626774fab8e190fdaa8f762873955fdd2a251933
|
7
|
+
data.tar.gz: 855daf885ddb869034f642f15677e388475b1a220b1846d3a5ec6fa49570dc2ff22fe7d555043986288bfd183a1b044f989bdc8bb0870958affe13b400a9fbdc
|
@@ -2,14 +2,17 @@ module SlavePools
|
|
2
2
|
module ActiveRecordExtensions
|
3
3
|
def self.included(base)
|
4
4
|
base.send :extend, ClassMethods
|
5
|
-
base.cattr_accessor :connection_proxy
|
6
5
|
end
|
7
6
|
|
8
7
|
def reload(options = nil)
|
9
|
-
self.connection_proxy.with_master { super }
|
8
|
+
self.class.connection_proxy.with_master { super }
|
10
9
|
end
|
11
10
|
|
12
11
|
module ClassMethods
|
12
|
+
def connection_proxy
|
13
|
+
SlavePools.proxy
|
14
|
+
end
|
15
|
+
|
13
16
|
# Make sure transactions run on master
|
14
17
|
# Even if they're initiated from ActiveRecord::Base
|
15
18
|
# (which doesn't have our hijack).
|
data/lib/slave_pools/version.rb
CHANGED
data/lib/slave_pools.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slave_pools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Drabik
|
@@ -87,6 +87,9 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- LICENSE
|
91
|
+
- README.md
|
92
|
+
- lib/slave_pools.rb
|
90
93
|
- lib/slave_pools/active_record_extensions.rb
|
91
94
|
- lib/slave_pools/config.rb
|
92
95
|
- lib/slave_pools/connection_proxy.rb
|
@@ -97,9 +100,6 @@ files:
|
|
97
100
|
- lib/slave_pools/pools.rb
|
98
101
|
- lib/slave_pools/query_cache.rb
|
99
102
|
- lib/slave_pools/version.rb
|
100
|
-
- lib/slave_pools.rb
|
101
|
-
- LICENSE
|
102
|
-
- README.md
|
103
103
|
- spec/config/test_model.rb
|
104
104
|
- spec/connection_proxy_spec.rb
|
105
105
|
- spec/observer_extensions_spec.rb
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '1.2'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.2.0
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Connection proxy for ActiveRecord for master / replica setups.
|