This assignment is only used by the Projects::NetworkController, so
we're needlessly assigning this very generically-named instance variable
on every controller which includes `ExtractsPath`, which is quite a few.
Further, the way we were passing this hash to
`HashWithIndifferentAccess` caused the following deprecation warning
after upgrading to Rails 5:
DEPRECATION WARNING: #to_hash unexpectedly ignores parameter
filtering, and will change to enforce it in Rails 5.1. Enable
`raise_on_unfiltered_parameters` to respect parameter filtering,
which is the default in new applications. For the existing
deprecated behaviour, call #to_unsafe_h instead. (called from new at
lib/extracts_path.rb:116)
Enables frozen string for some vestigial files as
well as the following:
* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb
Partially addresses #47424.
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.
In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.