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 Fix spec to set import_url before attempting to create import_data 2016-07-17 20:57:11 -07:00
checks Change the order of the access rules to check simpler first, and add specs 2016-08-12 18:27:42 -04:00
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 Simplify the name for data builder, feedback: 2016-08-12 16:09:29 +08:00
database fix 2016-09-15 21:59:59 -05:00
diff Fix line commenting for the initial commit 2016-08-19 16:35:44 +01:00
downtime_check Better formatting for downtime check messages 2016-08-17 12:15:20 +02:00
email Disable “issue by email” feature until it uses a different token 2016-08-19 19:49:12 -05:00
fogbugz_import Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
gfm Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
git Enable some Rubocop cops related to new lines 2016-08-03 12:02:41 +02:00
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 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
graphs Infinity Bug in Commit Statistics 2016-05-20 22:23:08 +02:00
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 Fix typo in gitlab-workhorse header 2016-08-19 12:25:52 +02:00
o_auth adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
saml adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
sanitizers Improved SVG sanitizer specs to include smoke tests for clean. 2016-06-12 21:05:58 -04:00
sherlock Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
slash_commands Fix behavior around commands with optional arguments 2016-08-18 14:29:49 -05:00
sql
template Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
asciidoc_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
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 Fix emoji paths in relative root configurations 2016-07-01 09:10:12 -07:00
blame_spec.rb
changes_list_spec.rb api for generating new merge request 2016-08-11 23:37:00 +07:00
closing_issue_extractor_spec.rb Don’t close issues on original project from a fork 2016-08-04 12:38:08 +02:00
color_schemes_spec.rb
current_settings_spec.rb Handle case when Redis cache returns an empty setting 2016-06-29 14:28:41 -07:00
database_spec.rb Improve Issuable.order_labels_priority 2016-06-06 11:59:49 -05:00
downtime_check_spec.rb Added checks for migration downtime 2016-07-20 12:41:56 +02:00
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 Fix specs 2016-08-01 13:24:06 +02:00
identifier_spec.rb Refactor Gitlab::Identifier 2016-10-05 12:40:17 +02:00
incoming_email_spec.rb It's for Message-ID so it should be message_id 2016-05-20 18:23:04 -05:00
key_fingerprint_spec.rb
lazy_spec.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
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 Tracking of custom events 2016-08-17 10:04:04 +02:00
popen_spec.rb Use 'git update-ref' for safer web commits 2016-09-02 11:49:40 +02:00
project_search_results_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
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 Remove JiraIssue model and replace references with ExternalIssue 2016-06-16 01:25:18 +03:00
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 adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
uploads_transfer_spec.rb
url_builder_spec.rb Add DiffNote model 2016-07-06 18:50:59 -04:00
url_sanitizer_spec.rb spec and fix for sanitize method 2016-07-11 09:01:09 +02:00
user_access_spec.rb changes default_branch_protection to allow devs_can_merge protection option aswell 2016-08-04 21:15:26 +01:00
version_info_spec.rb
workhorse_spec.rb Use base SHA for patches and diffs 2016-09-22 18:49:31 +01:00