diff options
author | Stan Hu <stanhu@gmail.com> | 2018-09-20 22:53:27 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-09-20 22:53:27 +0000 |
commit | 711e9f0796af13f9d490343aeaf6a56939c97230 (patch) | |
tree | c771c57829ce0d9e8c9e4841111138b12454414b /app/controllers/admin | |
parent | 9dff8567eb60902edf8cfd0399afe66ab1916157 (diff) | |
parent | 73322a0e551bbbc42d429b15e7ad9fd375ab761d (diff) | |
download | gitlab-ce-711e9f0796af13f9d490343aeaf6a56939c97230.tar.gz |
Merge branch 'frozen-string-app-controller' into 'master'
Enable frozen string in app/controllers/**/*.rb
See merge request gitlab-org/gitlab-ce!21736
Diffstat (limited to 'app/controllers/admin')
28 files changed, 56 insertions, 0 deletions
diff --git a/app/controllers/admin/abuse_reports_controller.rb b/app/controllers/admin/abuse_reports_controller.rb index 68a49f0749f..d5537023b26 100644 --- a/app/controllers/admin/abuse_reports_controller.rb +++ b/app/controllers/admin/abuse_reports_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::AbuseReportsController < Admin::ApplicationController # rubocop: disable CodeReuse/ActiveRecord def index diff --git a/app/controllers/admin/appearances_controller.rb b/app/controllers/admin/appearances_controller.rb index 9aaec905734..fdd3b4126ff 100644 --- a/app/controllers/admin/appearances_controller.rb +++ b/app/controllers/admin/appearances_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::AppearancesController < Admin::ApplicationController before_action :set_appearance, except: :create diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb index a4648b33cfa..ef182b981f1 100644 --- a/app/controllers/admin/application_controller.rb +++ b/app/controllers/admin/application_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Provides a base class for Admin controllers to subclass # # Automatically sets the layout and ensures an administrator is logged in diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 51f75fb77f0..875e46969fe 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::ApplicationSettingsController < Admin::ApplicationController include InternalRedirect before_action :set_application_setting diff --git a/app/controllers/admin/applications_controller.rb b/app/controllers/admin/applications_controller.rb index daa21d1be93..00d2cc01192 100644 --- a/app/controllers/admin/applications_controller.rb +++ b/app/controllers/admin/applications_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::ApplicationsController < Admin::ApplicationController include OauthApplications diff --git a/app/controllers/admin/background_jobs_controller.rb b/app/controllers/admin/background_jobs_controller.rb index 5f90ad7137d..7701f2e645b 100644 --- a/app/controllers/admin/background_jobs_controller.rb +++ b/app/controllers/admin/background_jobs_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::BackgroundJobsController < Admin::ApplicationController def show ps_output, _ = Gitlab::Popen.popen(%W(ps ww -U #{Gitlab.config.gitlab.user} -o pid,pcpu,pmem,stat,start,command)) diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb index b2fbbfc3e64..a91d9a534cd 100644 --- a/app/controllers/admin/broadcast_messages_controller.rb +++ b/app/controllers/admin/broadcast_messages_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::BroadcastMessagesController < Admin::ApplicationController include BroadcastMessagesHelper diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index 5dc3e6c2990..b5fb5511638 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::DashboardController < Admin::ApplicationController include CountHelper diff --git a/app/controllers/admin/deploy_keys_controller.rb b/app/controllers/admin/deploy_keys_controller.rb index 5c2025c1988..49ce275ad14 100644 --- a/app/controllers/admin/deploy_keys_controller.rb +++ b/app/controllers/admin/deploy_keys_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::DeployKeysController < Admin::ApplicationController before_action :deploy_keys, only: [:index] before_action :deploy_key, only: [:destroy, :edit, :update] diff --git a/app/controllers/admin/gitaly_servers_controller.rb b/app/controllers/admin/gitaly_servers_controller.rb index 11c4dfe3d8d..0a5566bfe70 100644 --- a/app/controllers/admin/gitaly_servers_controller.rb +++ b/app/controllers/admin/gitaly_servers_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::GitalyServersController < Admin::ApplicationController def index @gitaly_servers = Gitaly::Server.all diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index 2a47f01c6ad..46e85e1424f 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::GroupsController < Admin::ApplicationController include MembersPresentation diff --git a/app/controllers/admin/health_check_controller.rb b/app/controllers/admin/health_check_controller.rb index 61247b280b3..44864f9c7d0 100644 --- a/app/controllers/admin/health_check_controller.rb +++ b/app/controllers/admin/health_check_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::HealthCheckController < Admin::ApplicationController def show @errors = HealthCheck::Utils.process_checks(['standard']) diff --git a/app/controllers/admin/hook_logs_controller.rb b/app/controllers/admin/hook_logs_controller.rb index 3017f96c26f..8301b3aa880 100644 --- a/app/controllers/admin/hook_logs_controller.rb +++ b/app/controllers/admin/hook_logs_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::HookLogsController < Admin::ApplicationController include HooksExecution diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb index a98c355c7ba..d0abdec50ae 100644 --- a/app/controllers/admin/hooks_controller.rb +++ b/app/controllers/admin/hooks_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::HooksController < Admin::ApplicationController include HooksExecution diff --git a/app/controllers/admin/identities_controller.rb b/app/controllers/admin/identities_controller.rb index 57ad7389a23..b51c2f678ca 100644 --- a/app/controllers/admin/identities_controller.rb +++ b/app/controllers/admin/identities_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::IdentitiesController < Admin::ApplicationController before_action :user before_action :identity, except: [:index, :new, :create] diff --git a/app/controllers/admin/impersonation_tokens_controller.rb b/app/controllers/admin/impersonation_tokens_controller.rb index 9ebba88ef16..f5825ecb19a 100644 --- a/app/controllers/admin/impersonation_tokens_controller.rb +++ b/app/controllers/admin/impersonation_tokens_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::ImpersonationTokensController < Admin::ApplicationController before_action :user diff --git a/app/controllers/admin/impersonations_controller.rb b/app/controllers/admin/impersonations_controller.rb index d2f947d2c66..08d7e3b4fa2 100644 --- a/app/controllers/admin/impersonations_controller.rb +++ b/app/controllers/admin/impersonations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::ImpersonationsController < Admin::ApplicationController skip_before_action :authenticate_admin! before_action :authenticate_impersonator! diff --git a/app/controllers/admin/jobs_controller.rb b/app/controllers/admin/jobs_controller.rb index 788693c62c4..0c1afdc3d3b 100644 --- a/app/controllers/admin/jobs_controller.rb +++ b/app/controllers/admin/jobs_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::JobsController < Admin::ApplicationController # rubocop: disable CodeReuse/ActiveRecord def index diff --git a/app/controllers/admin/keys_controller.rb b/app/controllers/admin/keys_controller.rb index 0400a3b2f3b..4e9262ccc96 100644 --- a/app/controllers/admin/keys_controller.rb +++ b/app/controllers/admin/keys_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::KeysController < Admin::ApplicationController before_action :user, only: [:show, :destroy] diff --git a/app/controllers/admin/labels_controller.rb b/app/controllers/admin/labels_controller.rb index 7eb8f758807..aa5eae7a474 100644 --- a/app/controllers/admin/labels_controller.rb +++ b/app/controllers/admin/labels_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::LabelsController < Admin::ApplicationController before_action :set_label, only: [:show, :edit, :update, :destroy] diff --git a/app/controllers/admin/logs_controller.rb b/app/controllers/admin/logs_controller.rb index 7248edb64e1..06b0e6a15a3 100644 --- a/app/controllers/admin/logs_controller.rb +++ b/app/controllers/admin/logs_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::LogsController < Admin::ApplicationController before_action :loggers diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 5cb08c9787b..550f29a58d2 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::ProjectsController < Admin::ApplicationController include MembersPresentation diff --git a/app/controllers/admin/requests_profiles_controller.rb b/app/controllers/admin/requests_profiles_controller.rb index a478176e138..64d74ae4231 100644 --- a/app/controllers/admin/requests_profiles_controller.rb +++ b/app/controllers/admin/requests_profiles_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::RequestsProfilesController < Admin::ApplicationController def index @profile_token = Gitlab::RequestProfiler.profile_token diff --git a/app/controllers/admin/runner_projects_controller.rb b/app/controllers/admin/runner_projects_controller.rb index 51d5799cd89..774ce04d079 100644 --- a/app/controllers/admin/runner_projects_controller.rb +++ b/app/controllers/admin/runner_projects_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::RunnerProjectsController < Admin::ApplicationController before_action :project, only: [:create] diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index 911603bac17..0b6ff491c66 100644 --- a/app/controllers/admin/runners_controller.rb +++ b/app/controllers/admin/runners_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::RunnersController < Admin::ApplicationController before_action :runner, except: :index diff --git a/app/controllers/admin/spam_logs_controller.rb b/app/controllers/admin/spam_logs_controller.rb index 8df35d25303..18d22c95b61 100644 --- a/app/controllers/admin/spam_logs_controller.rb +++ b/app/controllers/admin/spam_logs_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::SpamLogsController < Admin::ApplicationController # rubocop: disable CodeReuse/ActiveRecord def index diff --git a/app/controllers/admin/system_info_controller.rb b/app/controllers/admin/system_info_controller.rb index 99039724521..244fc2b31bb 100644 --- a/app/controllers/admin/system_info_controller.rb +++ b/app/controllers/admin/system_info_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::SystemInfoController < Admin::ApplicationController EXCLUDED_MOUNT_OPTIONS = [ 'nobrowse', diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 85bdc85c55b..b783c0e2a6f 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Admin::UsersController < Admin::ApplicationController before_action :user, except: [:index, :new, :create] |