ar-multidb 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/multidb/balancer.rb +6 -1
- data/lib/multidb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cedb676272cc87f3a21d66c15efd9058e0e13551
|
4
|
+
data.tar.gz: b1dae22e38cfbe06ab71ccaf7abbe6dbfb459c9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5662d638ad37ebd926c8a7c369ed60de18f8debbc121cad19c760a9f7301e73b68d1914f0d8920aa9b2e2dcb7a2af01e79b89a1bf65041b5a636b6e239417502
|
7
|
+
data.tar.gz: cb9a4f11337c379216d295d579e1938266377c887e7b4608a07fbcb1dcc78d298502459f8ad3cfb97e0acda5209261e9a869560e926654d213747e3946e0b65b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ar-multidb (0.1.
|
4
|
+
ar-multidb (0.1.11)
|
5
5
|
activerecord (>= 3.0)
|
6
6
|
activesupport (>= 3.0)
|
7
7
|
|
@@ -30,7 +30,7 @@ GEM
|
|
30
30
|
i18n (0.6.9)
|
31
31
|
minitest (4.7.5)
|
32
32
|
multi_json (1.8.4)
|
33
|
-
rake (10.1.
|
33
|
+
rake (10.1.1)
|
34
34
|
rspec (2.14.1)
|
35
35
|
rspec-core (~> 2.14.0)
|
36
36
|
rspec-expectations (~> 2.14.0)
|
data/lib/multidb/balancer.rb
CHANGED
@@ -9,8 +9,13 @@ module Multidb
|
|
9
9
|
rescue LoadError
|
10
10
|
raise "Please install the #{adapter} adapter: `gem install activerecord-#{adapter}-adapter` (#{$!})"
|
11
11
|
end
|
12
|
+
if defined?(ActiveRecord::ConnectionAdapters::ConnectionSpecification)
|
13
|
+
spec_class = ActiveRecord::ConnectionAdapters::ConnectionSpecification
|
14
|
+
else
|
15
|
+
spec_class = ActiveRecord::Base::ConnectionSpecification
|
16
|
+
end
|
12
17
|
@connection_pool = ActiveRecord::ConnectionAdapters::ConnectionPool.new(
|
13
|
-
|
18
|
+
spec_class.new(target, "#{adapter}_connection"))
|
14
19
|
else
|
15
20
|
@connection_pool = target
|
16
21
|
end
|
data/lib/multidb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ar-multidb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Staubo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|