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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 717edcedfa1c1db819f4b05fadc4e56017eff646
4
- data.tar.gz: 5f5afdffc350920bd0774ae5e13b533e396781be
3
+ metadata.gz: cedb676272cc87f3a21d66c15efd9058e0e13551
4
+ data.tar.gz: b1dae22e38cfbe06ab71ccaf7abbe6dbfb459c9f
5
5
  SHA512:
6
- metadata.gz: 32bc26a45bcbaa7e46b0649dff1ae7a0b9c9376a126ba438ec9c3a689f1ede815cb2f1109fffa2c2ce9a3c01d35c5658265422f3ec2ad42f55db2f704a429030
7
- data.tar.gz: e7d1c10d442625f0d56441494651cea2a209700f55f32c595c32fa5bd1407bb47a6ad7a2f793c0a275b27ff9c64096b8f1fb0f92722509989d7c812a65c9663a
6
+ metadata.gz: 5662d638ad37ebd926c8a7c369ed60de18f8debbc121cad19c760a9f7301e73b68d1914f0d8920aa9b2e2dcb7a2af01e79b89a1bf65041b5a636b6e239417502
7
+ data.tar.gz: cb9a4f11337c379216d295d579e1938266377c887e7b4608a07fbcb1dcc78d298502459f8ad3cfb97e0acda5209261e9a869560e926654d213747e3946e0b65b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ar-multidb (0.1.10)
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.0)
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)
@@ -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
- ActiveRecord::ConnectionAdapters::ConnectionSpecification.new(target, "#{adapter}_connection"))
18
+ spec_class.new(target, "#{adapter}_connection"))
14
19
  else
15
20
  @connection_pool = target
16
21
  end
@@ -1,3 +1,3 @@
1
1
  module Multidb
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
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.11
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-02-02 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport