summaryrefslogtreecommitdiff
path: root/config/environments/test.rb
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-06-13 14:12:38 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2018-06-13 14:12:38 +1100
commit1499b02f73a6d8800a8132ea7b19a7e97fff1b4e (patch)
tree74c7405c0768455eba210d0035c5c43012413686 /config/environments/test.rb
parent8eea1a92b51c0d2a7ca1fae20d9d6e70a45bb87a (diff)
downloadgitlab-ce-1499b02f73a6d8800a8132ea7b19a7e97fff1b4e.tar.gz
[Rails5] Pass class references instead of strings to middleware builderblackst0ne-rails5-update-middlewares
It fixes Rails 5.0 deprecation flooding like: ``` DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change them to actual class references. For example: "::Gitlab::Middleware::ReadOnly" => Gitlab::Middleware::ReadOnly (called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11) DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change them to actual class references. For example: "ActionDispatch::Static" => ActionDispatch::Static (called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11) DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change them to actual class references. For example: "Gitlab::Testing::RequestBlockerMiddleware" => Gitlab::Testing::RequestBlockerMiddleware (called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11) DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change them to actual class references. For example: "ActionDispatch::Static" => ActionDispatch::Static (called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11) DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change them to actual class references. For example: "Gitlab::Testing::RequestInspectorMiddleware" => Gitlab::Testing::RequestInspectorMiddleware (called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11) ```
Diffstat (limited to 'config/environments/test.rb')
-rw-r--r--config/environments/test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 1849c984351..af1011a1ab1 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,7 +1,7 @@
Rails.application.configure do
# Make sure the middleware is inserted first in middleware chain
- config.middleware.insert_before('ActionDispatch::Static', 'Gitlab::Testing::RequestBlockerMiddleware')
- config.middleware.insert_before('ActionDispatch::Static', 'Gitlab::Testing::RequestInspectorMiddleware')
+ config.middleware.insert_before(ActionDispatch::Static, Gitlab::Testing::RequestBlockerMiddleware)
+ config.middleware.insert_before(ActionDispatch::Static, Gitlab::Testing::RequestInspectorMiddleware)
# Settings specified here will take precedence over those in config/application.rb