gitlab-org--gitlab-foss/lib/api
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
..
helpers New AccessRequests API endpoints for Group & Project 2016-08-10 19:07:05 +02:00
access_requests.rb Use Grape DSL to document methods and their params 2016-10-05 11:20:27 +02:00
api.rb Added Issue Board API support 2016-10-05 13:12:07 -03:00
api_guard.rb Remove some dead code from the Grape API 2016-09-19 12:27:36 +01:00
award_emoji.rb GrapeDSL for Award Emoji endpoints 2016-10-03 10:32:09 +02:00
boards.rb Added Issue Board API support 2016-10-05 13:12:07 -03:00
branches.rb Fix failing tests relating to backporting ee!581. 2016-08-16 13:42:34 +05:30
broadcast_messages.rb Add BroadcastMessage API implementation 2016-08-31 17:03:18 -03:00
builds.rb Incorporate feedback 2016-08-18 21:10:53 +02:00
commit_statuses.rb Fix an error where we were unable to create a CommitStatus for running state 2016-09-12 12:20:18 +02:00
commits.rb multi-file commit 2016-10-05 17:42:52 +00:00
deploy_keys.rb Namespace EnableDeployKeyService under Projects 2016-08-08 20:59:51 +02:00
deployments.rb Add deployment endpoints 2016-08-18 21:10:52 +02:00
entities.rb Added Issue Board API support 2016-10-05 13:12:07 -03:00
environments.rb Minor fixes in the Env API endpoints 2016-08-01 08:42:09 +02:00
files.rb Add optional 'author' param when making commits 2016-09-19 10:00:26 -07:00
groups.rb fix group links 404 2016-10-05 09:57:54 +01:00
helpers.rb Merge branch 'memoize_shell_secret_token' into 'master' 2016-10-07 10:35:03 +00:00
internal.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
issues.rb Fix API issues sorting 2016-09-09 16:10:01 +01:00
keys.rb GrapeDSL for Keys endpoint 2016-10-01 11:11:41 +02:00
labels.rb Add API endpoints for un/subscribing from/to a label 2016-05-12 22:48:09 +02:00
license_templates.rb Rename Licenses API to License Templates API 2016-06-27 14:42:05 -05:00
lint.rb Improve curl commend, remove blank lines 2016-09-07 12:54:02 +02:00
members.rb Use Grape DSL to document methods and their params 2016-10-05 11:20:27 +02:00
merge_request_diffs.rb Add single merge request diff API endpoint 2016-08-12 14:44:49 +03:00
merge_requests.rb Replace parse_boolean with to_boolean 2016-07-20 08:55:44 +02:00
milestones.rb Small improvements thanks to Robert's feedback 2016-09-30 12:02:54 +02:00
namespaces.rb GrapeDSL for Namespace endpoint 2016-10-04 07:47:29 +02:00
notes.rb Fix API notes endpoint when posting only emoji 2016-09-16 16:28:53 +02:00
notification_settings.rb Add notification_settings API calls 2016-09-09 17:08:06 +00:00
pipelines.rb Use PipelinesFinder in Pipelines API 2016-09-07 15:38:03 +02:00
project_hooks.rb api: expose wiki_page_events project hook field in the API 2016-08-24 10:33:51 -04:00
project_snippets.rb Prevent private snippets in public/internal projects from being leaked via API 2016-04-25 12:02:06 -07:00
projects.rb Tidy up project list actions 2016-10-05 12:13:58 +01:00
repositories.rb Add workhorse controller and API helpers 2016-06-06 13:16:30 +02:00
runners.rb Return the association and check it in controller instead: 2016-06-14 23:11:43 +08:00
services.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
session.rb Small refactor and syntax fixes. 2016-08-18 16:47:26 -05:00
settings.rb Add tests and improve logic 2015-07-06 16:47:19 +02:00
sidekiq_metrics.rb Fixed Rubocop error 2016-06-17 11:16:25 -05:00
subscriptions.rb Add API endpoints for un/subscribing from/to a label 2016-05-12 22:48:09 +02:00
system_hooks.rb Added X-GitLab-Event header for web hooks 2015-05-08 16:49:03 +03:00
tags.rb Ensure that branch and tag names are given in API 2016-06-30 13:46:35 +02:00
templates.rb Load issues and merge requests templates from repository 2016-08-16 15:50:17 -03:00
todos.rb Recover usage of Todos counter cache 2016-08-12 18:21:36 +02:00
triggers.rb Make the CI permission model simpler 2016-02-02 09:18:08 +01:00
users.rb Add User#organization to users api 2016-09-27 14:04:39 +03:00
variables.rb Make the CI permission model simpler 2016-02-02 09:18:08 +01:00