gitlab-org--gitlab-foss/spec/lib/gitlab
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
..
backend Call ensure_secret_token! in secret token test's before block since it would be called in an initializer. 2016-10-06 22:40:04 -04:00
badge Fix pipeline fixtures and calls to removed method 2016-10-04 14:43:24 +02:00
bitbucket_import
checks
ci Add validation of URL and validation of name 2016-09-19 10:07:12 +02:00
conflict Fix merge conflict size limit 2016-09-07 16:00:26 +01:00
data_builder
database fix 2016-09-15 21:59:59 -05:00
diff
downtime_check
email
fogbugz_import
gfm
git
github_import Skip wiki creation when GitHub project has wiki enabled 2016-10-04 13:06:45 -03:00
gitlab_import Fixed gitlab.com importer missing confidential attribute 2016-09-05 17:41:48 +02:00
google_code_import
graphs
import_export Add markdown cache columns to the database, but don't use them yet 2016-10-07 02:54:25 +01:00
ldap Log LDAP lookup errors and don't swallow unrelated exceptions 2016-09-28 07:44:58 +02:00
metrics Adds response mime type to transaction metric action when it's not HTML 2016-08-25 16:33:41 +02:00
middleware
o_auth
saml
sanitizers
sherlock
slash_commands
sql
template Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
asciidoc_spec.rb
auth_spec.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
award_emoji_spec.rb
blame_spec.rb
changes_list_spec.rb
closing_issue_extractor_spec.rb
color_schemes_spec.rb
current_settings_spec.rb
database_spec.rb
downtime_check_spec.rb
exclusive_lease_spec.rb
git_access_spec.rb Post-merge improve of CI permissions 2016-09-20 15:41:41 +02:00
git_access_wiki_spec.rb Fix specs after renaming authentication_capabilities 2016-09-16 11:12:22 +02:00
git_spec.rb Add spec covering 'committer_hash' 2016-09-20 10:15:43 -07:00
highlight_spec.rb
identifier_spec.rb Refactor Gitlab::Identifier 2016-10-05 12:40:17 +02:00
incoming_email_spec.rb
key_fingerprint_spec.rb
lazy_spec.rb
lfs_token_spec.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
markup_helper_spec.rb
metrics_spec.rb
popen_spec.rb Use 'git update-ref' for safer web commits 2016-09-02 11:49:40 +02:00
project_search_results_spec.rb
redis_spec.rb Use higher size on Gitlab::Redis connection pool on Sidekiq servers 2016-10-06 10:50:03 +02:00
reference_extractor_spec.rb
regex_spec.rb
search_results_spec.rb Clean up search result classes 2016-09-06 10:12:55 +03:00
snippet_search_results_spec.rb Clean up search result classes 2016-09-06 10:12:55 +03:00
themes_spec.rb
upgrader_spec.rb
uploads_transfer_spec.rb
url_builder_spec.rb
url_sanitizer_spec.rb
user_access_spec.rb
version_info_spec.rb
workhorse_spec.rb Use base SHA for patches and diffs 2016-09-22 18:49:31 +01:00