gitlab-org--gitlab-foss/spec
Sean McGivern f9c456bd0c Make performance bar enabled checks consistent
Previously, we called the `peek_enabled?` method like so:

    prepend_before_action :set_peek_request_id, if: :peek_enabled?

Now we don't have a `set_peek_request_id` method, so we don't need that
line. However, the `peek_enabled?` part had a side-effect: it would also
populate the request store cache for whether the performance bar was
enabled for the current request or not.

This commit makes that side-effect explicit, and replaces all uses of
`peek_enabled?` with the more explicit
`Gitlab::PerformanceBar.enabled_for_request?`. There is one spec that
still sets `SafeRequestStore[:peek_enabled]` directly, because it is
contrasting behaviour with and without a request store enabled.

The upshot is:

1. We still set the value in one place. We make it more explicit that
   that's what we're doing.
2. Reading that value uses a consistent method so it's easier to find in
   future.
2019-08-28 17:25:02 +01:00
..
bin
config
controllers Merge branch 'ce-8631-archiving-a-project-should-create-an-audit-event' into 'master' 2019-08-22 16:06:41 +00:00
db
dependencies
factories Use stub_full_request to fix spec failure 2019-08-27 19:25:22 +08:00
features Merge branch 'sh-project-feature-nplus-one' into 'master' 2019-08-27 06:41:38 +00:00
finders
fixtures
frontend Revert "Merge branch 'user-tracking-settings' into 'master'" 2019-08-26 22:16:23 +00:00
graphql Replace echo function with a resolver 2019-08-26 17:43:38 +00:00
haml_lint/linter
helpers Change misleading pipeline status tooltip 2019-08-23 21:28:46 +00:00
initializers
javascripts Add edit_note and spec for editing quick actions 2019-08-26 09:20:00 +00:00
lib Make performance bar enabled checks consistent 2019-08-28 17:25:02 +01:00
mailers
migrations Added EncryptDeployTokensTokens spec file 2019-08-26 19:39:48 -07:00
models Use stub_full_request to fix spec failure 2019-08-27 19:25:22 +08:00
policies Guard against deleted project feature entry 2019-08-26 13:37:42 -07:00
presenters
rack_servers
requests Merge branch '57657-promote-label-to-group-label-via-api-endpoint' into 'master' 2019-08-27 08:53:09 +00:00
routing
rubocop Utilize RuboCop's Include/Exclude config 2019-08-26 12:24:25 +00:00
serializers
services Use stub_full_request to fix spec failure 2019-08-27 19:25:22 +08:00
sidekiq/cron
support Add edit_note and spec for editing quick actions 2019-08-26 09:20:00 +00:00
tasks
uploaders
validators
views Fix Piwik not working 2019-08-26 15:46:14 -07:00
workers
factories_spec.rb
fast_spec_helper.rb
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb