mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
Update rails_multisite
to 2.0.1.
This commit is contained in:
parent
7ed41fae2b
commit
54dc191a91
@ -275,7 +275,7 @@ GEM
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.0.3)
|
||||
loofah (~> 2.0)
|
||||
rails_multisite (1.1.2)
|
||||
rails_multisite (2.0.1)
|
||||
activerecord (> 4.2, < 6)
|
||||
railties (> 4.2, < 6)
|
||||
railties (5.1.4)
|
||||
|
@ -12,8 +12,8 @@ end
|
||||
|
||||
if Rails.configuration.multisite
|
||||
Rails.configuration.middleware.swap(
|
||||
RailsMultisite::ConnectionManagement,
|
||||
RailsMultisite::ConnectionManagement,
|
||||
RailsMultisite::Middleware,
|
||||
RailsMultisite::Middleware,
|
||||
RailsMultisite::DiscoursePatches.config
|
||||
)
|
||||
end
|
||||
|
@ -5,18 +5,10 @@ RSpec.describe 'Multisite SiteSettings' do
|
||||
|
||||
before do
|
||||
conn.config_filename = "spec/fixtures/multisite/two_dbs.yml"
|
||||
conn.load_settings!
|
||||
conn.remove_class_variable(:@@current_db)
|
||||
end
|
||||
|
||||
after do
|
||||
conn.clear_settings!
|
||||
|
||||
[:@@db_spec_cache, :@@host_spec_cache, :@@default_spec].each do |class_variable|
|
||||
conn.remove_class_variable(class_variable)
|
||||
end
|
||||
|
||||
conn.set_current_db
|
||||
end
|
||||
|
||||
def cache(name, namespace: true)
|
||||
|
@ -5,18 +5,11 @@ RSpec.describe "Running Sidekiq Jobs in Multisite" do
|
||||
|
||||
before do
|
||||
conn.config_filename = "spec/fixtures/multisite/two_dbs.yml"
|
||||
conn.load_settings!
|
||||
conn.remove_class_variable(:@@current_db)
|
||||
SiteSetting.defaults.refresh_site_locale!
|
||||
end
|
||||
|
||||
after do
|
||||
conn.clear_settings!
|
||||
|
||||
[:@@db_spec_cache, :@@host_spec_cache, :@@default_spec].each do |class_variable|
|
||||
conn.remove_class_variable(class_variable)
|
||||
end
|
||||
|
||||
conn.set_current_db
|
||||
end
|
||||
|
||||
it 'should revert back to the default connection' do
|
@ -7,8 +7,6 @@ RSpec.describe 'Multisite SiteSettings' do
|
||||
@original_provider = SiteSetting.provider
|
||||
SiteSetting.provider = SiteSettings::DbProvider.new(SiteSetting)
|
||||
conn.config_filename = "spec/fixtures/multisite/two_dbs.yml"
|
||||
conn.load_settings!
|
||||
conn.remove_class_variable(:@@current_db)
|
||||
end
|
||||
|
||||
after do
|
||||
@ -17,12 +15,6 @@ RSpec.describe 'Multisite SiteSettings' do
|
||||
end
|
||||
|
||||
conn.clear_settings!
|
||||
|
||||
[:@@db_spec_cache, :@@host_spec_cache, :@@default_spec].each do |class_variable|
|
||||
conn.remove_class_variable(class_variable)
|
||||
end
|
||||
|
||||
conn.set_current_db
|
||||
SiteSetting.provider = @original_provider
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user