gitlab-org--gitlab-foss/spec/lib
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
..
api Add label_id parameter to label API for PUT and DELETE 2019-08-23 17:45:42 +00:00
backup
banzai Support query parameters in metrics embeds 2019-08-15 21:38:29 +00:00
bitbucket
bitbucket_server Add bitbucket_server/client_spec.rb spec 2019-08-12 11:16:17 +01:00
constraints
container_registry
feature
gitaly
gitlab Make performance bar enabled checks consistent 2019-08-28 17:25:02 +01:00
google_api Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
json_web_token Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
mattermost Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
microsoft_teams Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
object_storage Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
omni_auth/strategies Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
peek/views Make performance bar enabled checks consistent 2019-08-28 17:25:02 +01:00
prometheus Clean Sidekiq metrics from multiproc dir on start 2019-08-19 12:52:07 +00:00
quality
rspec_flaky Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
safe_zip Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
sentry
serializers Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
system_check Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
after_commit_queue_spec.rb
event_filter_spec.rb
expand_variables_spec.rb Expand variables only when needed 2019-08-13 21:51:29 +02:00
extracts_path_spec.rb
feature_spec.rb
file_size_validator_spec.rb
forever_spec.rb
gitlab_spec.rb Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
milestone_array_spec.rb Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
system_check_spec.rb Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00
uploaded_file_spec.rb Add frozen_string_literal to lib part 2 2019-08-23 00:15:24 +12:00