gitlab-org--gitlab-foss/lib
Rémy Coutable 0876b46024 Merge branch 'memoize_shell_secret_token' into 'master'
Memoize Github::Shell's secret token

## What does this MR do?

`API::Helpers#secret_token` was reading the secret file on every invocation. This MR reads the file in the `gitlab_shell_secret_token.rb` initializer and saves it as a class variable at `Gitlab::Shell.secret_token`

## Are there points in the code the reviewer needs to double check?

 - I'm not sure if the use of `cattr_accessor` is the best approach, or if should be moved into the `class << self` block?
 - Should `API::Helpers#secret_token` be removed in favor of using `Gitlab::Shell.secret_token`?

## Why was this MR needed?

Performance optimization.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22510

See merge request !6599
2016-10-07 10:35:03 +00:00
..
api Merge branch 'memoize_shell_secret_token' into 'master' 2016-10-07 10:35:03 +00:00
assets
backup
banzai Enable CacheMarkdownField for the remaining models 2016-10-07 02:54:26 +01:00
ci
constraints Make user constrainer lookup same as controller and add more constrainer tests 2016-10-06 19:50:48 +03:00
container_registry
gitlab
json_web_token
omni_auth
rouge/formatters
support
tasks Merge branch 'memoize_shell_secret_token' into 'master' 2016-10-07 10:35:03 +00:00
banzai.rb Add markdown cache columns to the database, but don't use them yet 2016-10-07 02:54:25 +01:00
disable_email_interceptor.rb
event_filter.rb
expand_variables.rb
extracts_path.rb
file_size_validator.rb
file_streamer.rb
gitlab.rb
gt_one_coercion.rb
repository_cache.rb
static_model.rb
unfold_form.rb
uploaded_file.rb
version_check.rb