rails_multisite 2.1.0 → 2.1.1
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/rails_multisite/connection_management.rb +7 -0
- data/lib/rails_multisite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4520b9fc9764176e8b5da30cb855e9326df49403655f79d521574140b6e85b9
|
|
4
|
+
data.tar.gz: 8402996c6905b34c67b68d78ad4bfae8d2d8d440e0e71f884ff5d18ad68e62d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f53da66c5fee3e2871a90051d72b78a87c13307a0efa3dfe443bdee4693f46344d18545e405a6079cd41f7596909a645bfdd3c7b32a362be6a61ccdc7b64f1ef
|
|
7
|
+
data.tar.gz: 9e10e10e824f77a79ed1cece3cbacc139d1c13362ed3b9d99e750aac1daca8066971ef8566b0d3df1cf389c9c2619cdefa9c7426ee9fd6e84f0ab6bbaf57b1a8
|
|
@@ -98,6 +98,13 @@ module RailsMultisite
|
|
|
98
98
|
config[:host_names].nil? ? config[:host] : config[:host_names].first
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
+
def self.current_db_hostnames
|
|
102
|
+
spec = @instance.connection_spec(db: self.current_db) if @instance
|
|
103
|
+
spec ||= ActiveRecord::Base.connection_pool.spec
|
|
104
|
+
config = spec.config
|
|
105
|
+
config[:host_names].nil? ? [config[:host]] : config[:host_names]
|
|
106
|
+
end
|
|
107
|
+
|
|
101
108
|
def self.connection_spec(opts)
|
|
102
109
|
if @instance
|
|
103
110
|
@instance.connection_spec(opts)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_multisite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sam Saffron
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|