active_record_proxy_adapters 0.1.3 → 0.1.4
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 194bba4baff1556a91940f5a5860f30313594655fe81928451ae4970f4f03f35
|
4
|
+
data.tar.gz: 1f8eaa86a73aab8ceded3beab0ee6a64dc099754dd3c4fad1ce380d5b511af6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95e131acbfc3b48f1bcf475ebde62157978c6f6c29a0f8d616ba30bbc4eac03b866a404357314abff3fd826b1086b68ca782864512f090d77cb13e48f4f02f1b
|
7
|
+
data.tar.gz: '08bbf033512800954cc3ff0bd94b035d168a39ed8c790abb670b01238e438dfe431cf233c2d7e816ec28003f86c588227cc4a099eee0d9e17a922604cd6ef691'
|
@@ -70,9 +70,18 @@ module ActiveRecordProxyAdapters
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def replica_pool
|
73
|
+
# use default handler if the connection pool for specific class is not found
|
74
|
+
specific_replica_pool || default_replica_pool
|
75
|
+
end
|
76
|
+
|
77
|
+
def specific_replica_pool
|
73
78
|
connection_handler.retrieve_connection_pool(connection_class.name, role: reading_role)
|
74
79
|
end
|
75
80
|
|
81
|
+
def default_replica_pool
|
82
|
+
connection_handler.retrieve_connection_pool(ActiveRecord::Base.name, role: reading_role)
|
83
|
+
end
|
84
|
+
|
76
85
|
def connection_class
|
77
86
|
active_record_context.connection_class_for(primary_connection)
|
78
87
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_proxy_adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Cruz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|