mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
Revert "Revert "DEV: upgrade to Rails 6.0.3""
This reverts commit 2ff8b4f5d9
.
Attempt #2 at a Rails update this time we also update the
rails_multisite gem to allow for cleaner reordering
This commit is contained in:
parent
efd0e4d02b
commit
609e929186
14
Gemfile
14
Gemfile
@ -18,13 +18,13 @@ else
|
|||||||
# this allows us to include the bits of rails we use without pieces we do not.
|
# this allows us to include the bits of rails we use without pieces we do not.
|
||||||
#
|
#
|
||||||
# To issue a rails update bump the version number here
|
# To issue a rails update bump the version number here
|
||||||
gem 'actionmailer', '6.0.2.2'
|
gem 'actionmailer', '6.0.3'
|
||||||
gem 'actionpack', '6.0.2.2'
|
gem 'actionpack', '6.0.3'
|
||||||
gem 'actionview', '6.0.2.2'
|
gem 'actionview', '6.0.3'
|
||||||
gem 'activemodel', '6.0.2.2'
|
gem 'activemodel', '6.0.3'
|
||||||
gem 'activerecord', '6.0.2.2'
|
gem 'activerecord', '6.0.3'
|
||||||
gem 'activesupport', '6.0.2.2'
|
gem 'activesupport', '6.0.3'
|
||||||
gem 'railties', '6.0.2.2'
|
gem 'railties', '6.0.3'
|
||||||
gem 'sprockets-rails'
|
gem 'sprockets-rails'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
60
Gemfile.lock
60
Gemfile.lock
@ -1,21 +1,21 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actionmailer (6.0.2.2)
|
actionmailer (6.0.3)
|
||||||
actionpack (= 6.0.2.2)
|
actionpack (= 6.0.3)
|
||||||
actionview (= 6.0.2.2)
|
actionview (= 6.0.3)
|
||||||
activejob (= 6.0.2.2)
|
activejob (= 6.0.3)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (6.0.2.2)
|
actionpack (6.0.3)
|
||||||
actionview (= 6.0.2.2)
|
actionview (= 6.0.3)
|
||||||
activesupport (= 6.0.2.2)
|
activesupport (= 6.0.3)
|
||||||
rack (~> 2.0, >= 2.0.8)
|
rack (~> 2.0, >= 2.0.8)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actionview (6.0.2.2)
|
actionview (6.0.3)
|
||||||
activesupport (= 6.0.2.2)
|
activesupport (= 6.0.3)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
@ -24,20 +24,20 @@ GEM
|
|||||||
actionview (>= 6.0.a)
|
actionview (>= 6.0.a)
|
||||||
active_model_serializers (0.8.4)
|
active_model_serializers (0.8.4)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
activejob (6.0.2.2)
|
activejob (6.0.3)
|
||||||
activesupport (= 6.0.2.2)
|
activesupport (= 6.0.3)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (6.0.2.2)
|
activemodel (6.0.3)
|
||||||
activesupport (= 6.0.2.2)
|
activesupport (= 6.0.3)
|
||||||
activerecord (6.0.2.2)
|
activerecord (6.0.3)
|
||||||
activemodel (= 6.0.2.2)
|
activemodel (= 6.0.3)
|
||||||
activesupport (= 6.0.2.2)
|
activesupport (= 6.0.3)
|
||||||
activesupport (6.0.2.2)
|
activesupport (6.0.3)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
zeitwerk (~> 2.2)
|
zeitwerk (~> 2.2, >= 2.2.2)
|
||||||
addressable (2.7.0)
|
addressable (2.7.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
annotate (3.1.1)
|
annotate (3.1.1)
|
||||||
@ -184,7 +184,7 @@ GEM
|
|||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
maxminddb (0.1.22)
|
maxminddb (0.1.22)
|
||||||
memory_profiler (0.9.14)
|
memory_profiler (0.9.14)
|
||||||
message_bus (3.1.0)
|
message_bus (3.2.0)
|
||||||
rack (>= 1.1.3)
|
rack (>= 1.1.3)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.0.2)
|
||||||
@ -278,12 +278,12 @@ GEM
|
|||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.3.0)
|
rails-html-sanitizer (1.3.0)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
rails_multisite (2.1.1)
|
rails_multisite (2.1.2)
|
||||||
activerecord (> 5.0, < 7)
|
activerecord (> 5.0, < 7)
|
||||||
railties (> 5.0, < 7)
|
railties (> 5.0, < 7)
|
||||||
railties (6.0.2.2)
|
railties (6.0.3)
|
||||||
actionpack (= 6.0.2.2)
|
actionpack (= 6.0.3)
|
||||||
activesupport (= 6.0.2.2)
|
activesupport (= 6.0.3)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.20.3, < 2.0)
|
thor (>= 0.20.3, < 2.0)
|
||||||
@ -428,14 +428,14 @@ PLATFORMS
|
|||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
actionmailer (= 6.0.2.2)
|
actionmailer (= 6.0.3)
|
||||||
actionpack (= 6.0.2.2)
|
actionpack (= 6.0.3)
|
||||||
actionview (= 6.0.2.2)
|
actionview (= 6.0.3)
|
||||||
actionview_precompiler
|
actionview_precompiler
|
||||||
active_model_serializers (~> 0.8.3)
|
active_model_serializers (~> 0.8.3)
|
||||||
activemodel (= 6.0.2.2)
|
activemodel (= 6.0.3)
|
||||||
activerecord (= 6.0.2.2)
|
activerecord (= 6.0.3)
|
||||||
activesupport (= 6.0.2.2)
|
activesupport (= 6.0.3)
|
||||||
addressable
|
addressable
|
||||||
annotate
|
annotate
|
||||||
aws-sdk-s3
|
aws-sdk-s3
|
||||||
@ -512,7 +512,7 @@ DEPENDENCIES
|
|||||||
rack-mini-profiler
|
rack-mini-profiler
|
||||||
rack-protection
|
rack-protection
|
||||||
rails_multisite
|
rails_multisite
|
||||||
railties (= 6.0.2.2)
|
railties (= 6.0.3)
|
||||||
rake
|
rake
|
||||||
rb-fsevent
|
rb-fsevent
|
||||||
rb-inotify (~> 0.9)
|
rb-inotify (~> 0.9)
|
||||||
|
@ -91,6 +91,12 @@ module Discourse
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# we skip it cause we configure it in the initializer
|
||||||
|
# the railstie for message_bus would insert it in the
|
||||||
|
# wrong position
|
||||||
|
config.skip_message_bus_middleware = true
|
||||||
|
config.skip_multisite_middleware = true
|
||||||
|
|
||||||
# Disable so this is only run manually
|
# Disable so this is only run manually
|
||||||
# we may want to change this later on
|
# we may want to change this later on
|
||||||
# issue is image_optim crashes on missing dependencies
|
# issue is image_optim crashes on missing dependencies
|
||||||
|
@ -6,12 +6,8 @@
|
|||||||
#
|
#
|
||||||
# We aren't manipulating the middleware stack directly because of
|
# We aren't manipulating the middleware stack directly because of
|
||||||
# https://github.com/rails/rails/pull/27936
|
# https://github.com/rails/rails/pull/27936
|
||||||
session_operations = Rails::Configuration::MiddlewareStackProxy.new([
|
|
||||||
[:delete, MessageBus::Rack::Middleware],
|
|
||||||
[:unshift, MessageBus::Rack::Middleware],
|
|
||||||
])
|
|
||||||
|
|
||||||
Rails.configuration.middleware = Rails.configuration.middleware + session_operations
|
Rails.configuration.middleware.unshift(MessageBus::Rack::Middleware)
|
||||||
|
|
||||||
# no reason to track this in development, that is 300+ redis calls saved per
|
# no reason to track this in development, that is 300+ redis calls saved per
|
||||||
# page view (we serve all assets out of thin in development)
|
# page view (we serve all assets out of thin in development)
|
||||||
@ -25,12 +21,7 @@ if Rails.env != 'development' || ENV['TRACK_REQUESTS']
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Rails.configuration.multisite
|
if Rails.configuration.multisite
|
||||||
# Multisite needs to be first, because the request tracker and message bus
|
# Multisite needs to be first, because the request tracker and message bus rely on it
|
||||||
# rely on it
|
Rails.configuration.middleware.unshift RailsMultisite::Middleware, RailsMultisite::DiscoursePatches.config
|
||||||
session_operations = Rails::Configuration::MiddlewareStackProxy.new([
|
Rails.configuration.middleware.delete ActionDispatch::Executor
|
||||||
[:delete, RailsMultisite::Middleware],
|
|
||||||
[:unshift, [RailsMultisite::Middleware, RailsMultisite::DiscoursePatches.config]],
|
|
||||||
])
|
|
||||||
|
|
||||||
Rails.configuration.middleware = Rails.configuration.middleware + session_operations
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user