rails_multisite 2.0.2 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails_multisite might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8c3c0c997af59b717db0143426fa1d83a1e3667
4
- data.tar.gz: 39377b57e2174a1597cc1d76d698df08146685be
3
+ metadata.gz: b3582604a5da7995f373bf26865600897c13b758
4
+ data.tar.gz: 6625a29d66a9873ed4f041e38d72525eb9c184ed
5
5
  SHA512:
6
- metadata.gz: 59cb5dc3fb75debd53519af72889a8d2377a3154a831ec6dab843d83a0e0a54e04fe403375d7047885d2b93a9826ca29ea0bad5863454360c38682d96a460c27
7
- data.tar.gz: 4ca6cbf4973bc65f2806c6b48f9eb6c781db2f80e9857cb888d30751b2d8d7da0fa16bdaa50b665c51b3f236b05f162093ce542a11513ad4fc7ba911bcc8903f
6
+ metadata.gz: cef249afb34bdcbbf3ba0eee36e1ce487d557fd7c6d4a70766359e697c5a75b34a53d9e01b2a5fca631e2759a12c456c6b3296b97c97d2696f962ed5d4682f56
7
+ data.tar.gz: 1d99c6c7a0ec03bcc29ee5174dcf30d6230853ae717ada13171ee0566964d57d3b03c925c3c4bac9c299792f8fbf4287a4080fae42a76f0a8d74898a803224d5
@@ -91,7 +91,9 @@ module RailsMultisite
91
91
  end
92
92
 
93
93
  def self.current_hostname
94
- config = ActiveRecord::Base.connection_pool.spec.config
94
+ spec = @instance.connection_spec(db: self.current_db) if @instance
95
+ spec ||= ActiveRecord::Base.connection_pool.spec
96
+ config = spec.config
95
97
  config[:host_names].nil? ? config[:host] : config[:host_names].first
96
98
  end
97
99
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
3
  module RailsMultisite
4
- VERSION = "2.0.2"
4
+ VERSION = "2.0.4"
5
5
  end
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.0.2
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-21 00:00:00.000000000 Z
11
+ date: 2018-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord