active_record_shards 3.15.0 → 3.15.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65d92b02ab6446ce1f4faeaf82a4ec5a0b064474c232db1210887c07aa046584
|
4
|
+
data.tar.gz: 95846224823c39b0abb7afe59b2ee0b52507147391a549581428330274cf60fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d20e7ac275197777749f69c2c31c09b5e1ae26f47c212107afd464d74977b36f348fa6e7a92566139240089c4b9b559b790ab4be0d34d975a59ab3e2e40ee933
|
7
|
+
data.tar.gz: '09f0100020a3539e297d480f8ced91577bdbdc4cbe4f563df735cac3a8a03bcd2540c41a3ecddde09756649ffdeac03ca16b7ec96c7869d8264b53452b706517'
|
@@ -4,6 +4,7 @@ module ActiveRecordShards
|
|
4
4
|
def connection_pool_name # :nodoc:
|
5
5
|
name = current_shard_selection.shard_name(self)
|
6
6
|
|
7
|
+
# e.g. if "production_slave" is not defined in `Configuration`, fall back to "production"
|
7
8
|
if configurations[name].nil? && on_slave?
|
8
9
|
current_shard_selection.shard_name(self, false)
|
9
10
|
else
|
@@ -10,7 +10,11 @@ module ActiveRecordShards
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.enable
|
13
|
-
ActiveRecord::Base.
|
13
|
+
ActiveRecord::Base.on_slave do
|
14
|
+
ActiveRecord::Base.on_shard(nil) do
|
15
|
+
ActiveRecord::Base.connection.class.prepend(Methods)
|
16
|
+
end
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
16
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_shards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.15.
|
4
|
+
version: 3.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Quorning
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2019-
|
16
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activerecord
|