summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2018-07-16 09:31:01 -0700
committergfyoung <gfyoung17@gmail.com>2018-07-16 12:36:41 -0700
commit265478ad74172ed14794c26f75c3ad45908f36a2 (patch)
tree3367106f10a7b911112029b03ac2dcc7a92ab6dc /app/services
parent7f0431dd8550ac9d229d1383c03386c1634d015f (diff)
downloadgitlab-ce-265478ad74172ed14794c26f75c3ad45908f36a2.tar.gz
Enable frozen string in apps/services/**/*.rbrepo-forks/gitlab-ce-frozen-string-enable-apps-services-inner
For directories application_settings --> labels. Partially addresses #47424.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/application_settings/base_service.rb2
-rw-r--r--app/services/application_settings/update_service.rb2
-rw-r--r--app/services/applications/create_service.rb2
-rw-r--r--app/services/auth/container_registry_authentication_service.rb2
-rw-r--r--app/services/badges/base_service.rb2
-rw-r--r--app/services/badges/build_service.rb2
-rw-r--r--app/services/badges/create_service.rb2
-rw-r--r--app/services/badges/update_service.rb2
-rw-r--r--app/services/boards/base_service.rb2
-rw-r--r--app/services/boards/create_service.rb2
-rw-r--r--app/services/boards/issues/create_service.rb2
-rw-r--r--app/services/boards/issues/list_service.rb2
-rw-r--r--app/services/boards/issues/move_service.rb2
-rw-r--r--app/services/boards/list_service.rb2
-rw-r--r--app/services/boards/lists/create_service.rb2
-rw-r--r--app/services/boards/lists/destroy_service.rb2
-rw-r--r--app/services/boards/lists/generate_service.rb2
-rw-r--r--app/services/boards/lists/list_service.rb2
-rw-r--r--app/services/boards/lists/move_service.rb2
-rw-r--r--app/services/chat_names/authorize_user_service.rb2
-rw-r--r--app/services/chat_names/find_user_service.rb2
-rw-r--r--app/services/ci/create_pipeline_schedule_service.rb2
-rw-r--r--app/services/ci/create_pipeline_service.rb2
-rw-r--r--app/services/ci/ensure_stage_service.rb2
-rw-r--r--app/services/ci/extract_sections_from_build_trace_service.rb2
-rw-r--r--app/services/ci/fetch_kubernetes_token_service.rb2
-rw-r--r--app/services/ci/pipeline_trigger_service.rb2
-rw-r--r--app/services/ci/play_build_service.rb2
-rw-r--r--app/services/ci/process_pipeline_service.rb2
-rw-r--r--app/services/ci/register_job_service.rb2
-rw-r--r--app/services/ci/retry_build_service.rb2
-rw-r--r--app/services/ci/retry_pipeline_service.rb2
-rw-r--r--app/services/ci/stop_environments_service.rb2
-rw-r--r--app/services/ci/update_build_queue_service.rb2
-rw-r--r--app/services/ci/update_runner_service.rb2
-rw-r--r--app/services/clusters/applications/base_helm_service.rb2
-rw-r--r--app/services/clusters/applications/check_ingress_ip_address_service.rb2
-rw-r--r--app/services/clusters/applications/check_installation_progress_service.rb2
-rw-r--r--app/services/clusters/applications/install_service.rb2
-rw-r--r--app/services/clusters/applications/schedule_installation_service.rb2
-rw-r--r--app/services/clusters/create_service.rb2
-rw-r--r--app/services/clusters/gcp/fetch_operation_service.rb2
-rw-r--r--app/services/clusters/gcp/finalize_creation_service.rb2
-rw-r--r--app/services/clusters/gcp/provision_service.rb2
-rw-r--r--app/services/clusters/gcp/verify_provision_status_service.rb2
-rw-r--r--app/services/clusters/update_service.rb2
-rw-r--r--app/services/commits/change_service.rb2
-rw-r--r--app/services/commits/cherry_pick_service.rb2
-rw-r--r--app/services/commits/create_service.rb2
-rw-r--r--app/services/commits/revert_service.rb2
-rw-r--r--app/services/concerns/exclusive_lease_guard.rb2
-rw-r--r--app/services/concerns/issues/resolve_discussions.rb2
-rw-r--r--app/services/concerns/update_visibility_level.rb2
-rw-r--r--app/services/concerns/users/new_user_notifier.rb2
-rw-r--r--app/services/concerns/users/participable_service.rb2
-rw-r--r--app/services/deploy_keys/create_service.rb2
-rw-r--r--app/services/deploy_tokens/create_service.rb2
-rw-r--r--app/services/discussions/base_service.rb2
-rw-r--r--app/services/discussions/resolve_service.rb2
-rw-r--r--app/services/discussions/update_diff_position_service.rb2
-rw-r--r--app/services/emails/base_service.rb2
-rw-r--r--app/services/emails/confirm_service.rb2
-rw-r--r--app/services/emails/create_service.rb2
-rw-r--r--app/services/emails/destroy_service.rb2
-rw-r--r--app/services/events/render_service.rb2
-rw-r--r--app/services/files/base_service.rb2
-rw-r--r--app/services/files/create_dir_service.rb2
-rw-r--r--app/services/files/create_service.rb2
-rw-r--r--app/services/files/delete_service.rb2
-rw-r--r--app/services/files/multi_service.rb2
-rw-r--r--app/services/files/update_service.rb2
-rw-r--r--app/services/gpg_keys/create_service.rb2
-rw-r--r--app/services/groups/base_service.rb2
-rw-r--r--app/services/groups/create_service.rb2
-rw-r--r--app/services/groups/destroy_service.rb2
-rw-r--r--app/services/groups/nested_create_service.rb2
-rw-r--r--app/services/groups/transfer_service.rb2
-rw-r--r--app/services/groups/update_service.rb2
-rw-r--r--app/services/issuable/bulk_update_service.rb2
-rw-r--r--app/services/issuable/common_system_notes_service.rb2
-rw-r--r--app/services/issuable/destroy_service.rb2
-rw-r--r--app/services/issues/base_service.rb2
-rw-r--r--app/services/issues/build_service.rb8
-rw-r--r--app/services/issues/close_service.rb2
-rw-r--r--app/services/issues/create_service.rb2
-rw-r--r--app/services/issues/duplicate_service.rb2
-rw-r--r--app/services/issues/fetch_referenced_merge_requests_service.rb2
-rw-r--r--app/services/issues/move_service.rb2
-rw-r--r--app/services/issues/reopen_service.rb2
-rw-r--r--app/services/issues/update_service.rb2
-rw-r--r--app/services/keys/base_service.rb2
-rw-r--r--app/services/keys/create_service.rb2
-rw-r--r--app/services/keys/destroy_service.rb2
-rw-r--r--app/services/keys/last_used_service.rb2
-rw-r--r--app/services/labels/base_service.rb2
-rw-r--r--app/services/labels/create_service.rb2
-rw-r--r--app/services/labels/find_or_create_service.rb2
-rw-r--r--app/services/labels/promote_service.rb2
-rw-r--r--app/services/labels/transfer_service.rb2
-rw-r--r--app/services/labels/update_service.rb2
100 files changed, 203 insertions, 3 deletions
diff --git a/app/services/application_settings/base_service.rb b/app/services/application_settings/base_service.rb
index 2bcc7d7c08b..ebe067536ca 100644
--- a/app/services/application_settings/base_service.rb
+++ b/app/services/application_settings/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ApplicationSettings
class BaseService < ::BaseService
def initialize(application_setting, user, params = {})
diff --git a/app/services/application_settings/update_service.rb b/app/services/application_settings/update_service.rb
index 7bcb8f49d0d..19cf34e2ac4 100644
--- a/app/services/application_settings/update_service.rb
+++ b/app/services/application_settings/update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ApplicationSettings
class UpdateService < ApplicationSettings::BaseService
attr_reader :params, :application_setting
diff --git a/app/services/applications/create_service.rb b/app/services/applications/create_service.rb
index 94a434b95dd..7db90c0b3c6 100644
--- a/app/services/applications/create_service.rb
+++ b/app/services/applications/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Applications
class CreateService
def initialize(current_user, params)
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index f28cddb2af3..81857d0cb4c 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Auth
class ContainerRegistryAuthenticationService < BaseService
AUDIENCE = 'container_registry'.freeze
diff --git a/app/services/badges/base_service.rb b/app/services/badges/base_service.rb
index 4f87426bd38..45fc9ac4373 100644
--- a/app/services/badges/base_service.rb
+++ b/app/services/badges/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Badges
class BaseService
protected
diff --git a/app/services/badges/build_service.rb b/app/services/badges/build_service.rb
index 6267e571838..e5ede1586b6 100644
--- a/app/services/badges/build_service.rb
+++ b/app/services/badges/build_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Badges
class BuildService < Badges::BaseService
# returns the created badge
diff --git a/app/services/badges/create_service.rb b/app/services/badges/create_service.rb
index aafb87f7dcd..4a55a00daeb 100644
--- a/app/services/badges/create_service.rb
+++ b/app/services/badges/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Badges
class CreateService < Badges::BaseService
# returns the created badge
diff --git a/app/services/badges/update_service.rb b/app/services/badges/update_service.rb
index 495a4a2c99d..a653b7903dd 100644
--- a/app/services/badges/update_service.rb
+++ b/app/services/badges/update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Badges
class UpdateService < Badges::BaseService
# returns the updated badge
diff --git a/app/services/boards/base_service.rb b/app/services/boards/base_service.rb
index 72822ffffa1..205db47888e 100644
--- a/app/services/boards/base_service.rb
+++ b/app/services/boards/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
class BaseService < ::BaseService
# Parent can either a group or a project
diff --git a/app/services/boards/create_service.rb b/app/services/boards/create_service.rb
index bd0bb387662..4caf5ffa3cb 100644
--- a/app/services/boards/create_service.rb
+++ b/app/services/boards/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
class CreateService < Boards::BaseService
def execute
diff --git a/app/services/boards/issues/create_service.rb b/app/services/boards/issues/create_service.rb
index 3025029755c..bd045e18b8d 100644
--- a/app/services/boards/issues/create_service.rb
+++ b/app/services/boards/issues/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Issues
class CreateService < Boards::BaseService
diff --git a/app/services/boards/issues/list_service.rb b/app/services/boards/issues/list_service.rb
index b1dbe73cdf7..50c11be0d15 100644
--- a/app/services/boards/issues/list_service.rb
+++ b/app/services/boards/issues/list_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Issues
class ListService < Boards::BaseService
diff --git a/app/services/boards/issues/move_service.rb b/app/services/boards/issues/move_service.rb
index ee3112c7571..6fd8a23b2a1 100644
--- a/app/services/boards/issues/move_service.rb
+++ b/app/services/boards/issues/move_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Issues
class MoveService < Boards::BaseService
diff --git a/app/services/boards/list_service.rb b/app/services/boards/list_service.rb
index 9269b8d2620..edd1cc7c2e1 100644
--- a/app/services/boards/list_service.rb
+++ b/app/services/boards/list_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
class ListService < Boards::BaseService
def execute
diff --git a/app/services/boards/lists/create_service.rb b/app/services/boards/lists/create_service.rb
index 6fd9885d4f3..48d2d5abaec 100644
--- a/app/services/boards/lists/create_service.rb
+++ b/app/services/boards/lists/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Lists
class CreateService < Boards::BaseService
diff --git a/app/services/boards/lists/destroy_service.rb b/app/services/boards/lists/destroy_service.rb
index d75c5fd3dc6..e12d4f46e19 100644
--- a/app/services/boards/lists/destroy_service.rb
+++ b/app/services/boards/lists/destroy_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Lists
class DestroyService < Boards::BaseService
diff --git a/app/services/boards/lists/generate_service.rb b/app/services/boards/lists/generate_service.rb
index 05d4ab5dbcc..4fbf1026019 100644
--- a/app/services/boards/lists/generate_service.rb
+++ b/app/services/boards/lists/generate_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Lists
class GenerateService < Boards::BaseService
diff --git a/app/services/boards/lists/list_service.rb b/app/services/boards/lists/list_service.rb
index e57c95294af..e10eb52e041 100644
--- a/app/services/boards/lists/list_service.rb
+++ b/app/services/boards/lists/list_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Lists
class ListService < Boards::BaseService
diff --git a/app/services/boards/lists/move_service.rb b/app/services/boards/lists/move_service.rb
index 7d0730e8332..27a36051662 100644
--- a/app/services/boards/lists/move_service.rb
+++ b/app/services/boards/lists/move_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Boards
module Lists
class MoveService < Boards::BaseService
diff --git a/app/services/chat_names/authorize_user_service.rb b/app/services/chat_names/authorize_user_service.rb
index 7256466c9e8..78b53cb3637 100644
--- a/app/services/chat_names/authorize_user_service.rb
+++ b/app/services/chat_names/authorize_user_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ChatNames
class AuthorizeUserService
include Gitlab::Routing
diff --git a/app/services/chat_names/find_user_service.rb b/app/services/chat_names/find_user_service.rb
index d458b814183..854b191c45c 100644
--- a/app/services/chat_names/find_user_service.rb
+++ b/app/services/chat_names/find_user_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ChatNames
class FindUserService
def initialize(service, params)
diff --git a/app/services/ci/create_pipeline_schedule_service.rb b/app/services/ci/create_pipeline_schedule_service.rb
index cd40deb6187..0d5f50c26a1 100644
--- a/app/services/ci/create_pipeline_schedule_service.rb
+++ b/app/services/ci/create_pipeline_schedule_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class CreatePipelineScheduleService < BaseService
def execute
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb
index 17a53b6a8fd..85df8bcff8c 100644
--- a/app/services/ci/create_pipeline_service.rb
+++ b/app/services/ci/create_pipeline_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class CreatePipelineService < BaseService
attr_reader :pipeline
diff --git a/app/services/ci/ensure_stage_service.rb b/app/services/ci/ensure_stage_service.rb
index b8c7be2d350..3d0e39d1b9f 100644
--- a/app/services/ci/ensure_stage_service.rb
+++ b/app/services/ci/ensure_stage_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
##
# We call this service everytime we persist a CI/CD job.
diff --git a/app/services/ci/extract_sections_from_build_trace_service.rb b/app/services/ci/extract_sections_from_build_trace_service.rb
index 75f9e0f897d..693f6d55be3 100644
--- a/app/services/ci/extract_sections_from_build_trace_service.rb
+++ b/app/services/ci/extract_sections_from_build_trace_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class ExtractSectionsFromBuildTraceService < BaseService
def execute(build)
diff --git a/app/services/ci/fetch_kubernetes_token_service.rb b/app/services/ci/fetch_kubernetes_token_service.rb
index bca883ec0a0..15eda56cac6 100644
--- a/app/services/ci/fetch_kubernetes_token_service.rb
+++ b/app/services/ci/fetch_kubernetes_token_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
##
# TODO:
# Almost components in this class were copied from app/models/project_services/kubernetes_service.rb
diff --git a/app/services/ci/pipeline_trigger_service.rb b/app/services/ci/pipeline_trigger_service.rb
index 85533a1cbdb..f54574b026b 100644
--- a/app/services/ci/pipeline_trigger_service.rb
+++ b/app/services/ci/pipeline_trigger_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class PipelineTriggerService < BaseService
include Gitlab::Utils::StrongMemoize
diff --git a/app/services/ci/play_build_service.rb b/app/services/ci/play_build_service.rb
index e24f48c2d16..eb0b070657d 100644
--- a/app/services/ci/play_build_service.rb
+++ b/app/services/ci/play_build_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class PlayBuildService < ::BaseService
def execute(build)
diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb
index 55af193d717..cda9bbff3b4 100644
--- a/app/services/ci/process_pipeline_service.rb
+++ b/app/services/ci/process_pipeline_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class ProcessPipelineService < BaseService
attr_reader :pipeline
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb
index 6eb1c4f52de..f7ccec3a700 100644
--- a/app/services/ci/register_job_service.rb
+++ b/app/services/ci/register_job_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
# This class responsible for assigning
# proper pending build to runner on runner API request
diff --git a/app/services/ci/retry_build_service.rb b/app/services/ci/retry_build_service.rb
index 6128b2a8fbb..6ceb59e4780 100644
--- a/app/services/ci/retry_build_service.rb
+++ b/app/services/ci/retry_build_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class RetryBuildService < ::BaseService
CLONE_ACCESSORS = %i[pipeline project ref tag options commands name
diff --git a/app/services/ci/retry_pipeline_service.rb b/app/services/ci/retry_pipeline_service.rb
index c5a43869990..42a13367a99 100644
--- a/app/services/ci/retry_pipeline_service.rb
+++ b/app/services/ci/retry_pipeline_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class RetryPipelineService < ::BaseService
include Gitlab::OptimisticLocking
diff --git a/app/services/ci/stop_environments_service.rb b/app/services/ci/stop_environments_service.rb
index 439746e82bd..973ae5ce5aa 100644
--- a/app/services/ci/stop_environments_service.rb
+++ b/app/services/ci/stop_environments_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class StopEnvironmentsService < BaseService
attr_reader :ref
diff --git a/app/services/ci/update_build_queue_service.rb b/app/services/ci/update_build_queue_service.rb
index 41b1c144c3e..9c589d910eb 100644
--- a/app/services/ci/update_build_queue_service.rb
+++ b/app/services/ci/update_build_queue_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class UpdateBuildQueueService
def execute(build)
diff --git a/app/services/ci/update_runner_service.rb b/app/services/ci/update_runner_service.rb
index 450ee7da1c9..e4117a51fe6 100644
--- a/app/services/ci/update_runner_service.rb
+++ b/app/services/ci/update_runner_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Ci
class UpdateRunnerService
attr_reader :runner
diff --git a/app/services/clusters/applications/base_helm_service.rb b/app/services/clusters/applications/base_helm_service.rb
index cba1b920f7c..270a8eb24f4 100644
--- a/app/services/clusters/applications/base_helm_service.rb
+++ b/app/services/clusters/applications/base_helm_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Applications
class BaseHelmService
diff --git a/app/services/clusters/applications/check_ingress_ip_address_service.rb b/app/services/clusters/applications/check_ingress_ip_address_service.rb
index e572b1e5d99..f32e73e8b1c 100644
--- a/app/services/clusters/applications/check_ingress_ip_address_service.rb
+++ b/app/services/clusters/applications/check_ingress_ip_address_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Applications
class CheckIngressIpAddressService < BaseHelmService
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb
index 90393e951a4..4640c5a2d4b 100644
--- a/app/services/clusters/applications/check_installation_progress_service.rb
+++ b/app/services/clusters/applications/check_installation_progress_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Applications
class CheckInstallationProgressService < BaseHelmService
diff --git a/app/services/clusters/applications/install_service.rb b/app/services/clusters/applications/install_service.rb
index 7ec3a9baa6e..7e3c0e77a83 100644
--- a/app/services/clusters/applications/install_service.rb
+++ b/app/services/clusters/applications/install_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Applications
class InstallService < BaseHelmService
diff --git a/app/services/clusters/applications/schedule_installation_service.rb b/app/services/clusters/applications/schedule_installation_service.rb
index 9c5461e85e1..4ead4f619c8 100644
--- a/app/services/clusters/applications/schedule_installation_service.rb
+++ b/app/services/clusters/applications/schedule_installation_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Applications
class ScheduleInstallationService < ::BaseService
diff --git a/app/services/clusters/create_service.rb b/app/services/clusters/create_service.rb
index 418888e3293..e3e0cfa462c 100644
--- a/app/services/clusters/create_service.rb
+++ b/app/services/clusters/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
class CreateService < BaseService
attr_reader :access_token
diff --git a/app/services/clusters/gcp/fetch_operation_service.rb b/app/services/clusters/gcp/fetch_operation_service.rb
index a4cd3ca5c11..02c96a1e286 100644
--- a/app/services/clusters/gcp/fetch_operation_service.rb
+++ b/app/services/clusters/gcp/fetch_operation_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Gcp
class FetchOperationService
diff --git a/app/services/clusters/gcp/finalize_creation_service.rb b/app/services/clusters/gcp/finalize_creation_service.rb
index 84944e95542..264419501dc 100644
--- a/app/services/clusters/gcp/finalize_creation_service.rb
+++ b/app/services/clusters/gcp/finalize_creation_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Gcp
class FinalizeCreationService
diff --git a/app/services/clusters/gcp/provision_service.rb b/app/services/clusters/gcp/provision_service.rb
index 8beea5a8cfb..ab1bf9c64f6 100644
--- a/app/services/clusters/gcp/provision_service.rb
+++ b/app/services/clusters/gcp/provision_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Gcp
class ProvisionService
diff --git a/app/services/clusters/gcp/verify_provision_status_service.rb b/app/services/clusters/gcp/verify_provision_status_service.rb
index 7cc4324677e..b24246f5c4b 100644
--- a/app/services/clusters/gcp/verify_provision_status_service.rb
+++ b/app/services/clusters/gcp/verify_provision_status_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
module Gcp
class VerifyProvisionStatusService
diff --git a/app/services/clusters/update_service.rb b/app/services/clusters/update_service.rb
index 989218e32a2..98fdeec4fb1 100644
--- a/app/services/clusters/update_service.rb
+++ b/app/services/clusters/update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Clusters
class UpdateService < BaseService
def execute(cluster)
diff --git a/app/services/commits/change_service.rb b/app/services/commits/change_service.rb
index 1ce6ab36cbf..2fbd442fc2e 100644
--- a/app/services/commits/change_service.rb
+++ b/app/services/commits/change_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Commits
class ChangeService < Commits::CreateService
def initialize(*args)
diff --git a/app/services/commits/cherry_pick_service.rb b/app/services/commits/cherry_pick_service.rb
index 320e229560d..4c5b15b2f95 100644
--- a/app/services/commits/cherry_pick_service.rb
+++ b/app/services/commits/cherry_pick_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Commits
class CherryPickService < ChangeService
def create_commit!
diff --git a/app/services/commits/create_service.rb b/app/services/commits/create_service.rb
index 4d0578becbe..3ce9acc833c 100644
--- a/app/services/commits/create_service.rb
+++ b/app/services/commits/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Commits
class CreateService < ::BaseService
ValidationError = Class.new(StandardError)
diff --git a/app/services/commits/revert_service.rb b/app/services/commits/revert_service.rb
index dc27399e047..dddb8b24eac 100644
--- a/app/services/commits/revert_service.rb
+++ b/app/services/commits/revert_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Commits
class RevertService < ChangeService
def create_commit!
diff --git a/app/services/concerns/exclusive_lease_guard.rb b/app/services/concerns/exclusive_lease_guard.rb
index f45436370c1..f102e00d150 100644
--- a/app/services/concerns/exclusive_lease_guard.rb
+++ b/app/services/concerns/exclusive_lease_guard.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#
# Concern that helps with getting an exclusive lease for running a block
# of code.
diff --git a/app/services/concerns/issues/resolve_discussions.rb b/app/services/concerns/issues/resolve_discussions.rb
index 455f761ca9b..1563ed965df 100644
--- a/app/services/concerns/issues/resolve_discussions.rb
+++ b/app/services/concerns/issues/resolve_discussions.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
module ResolveDiscussions
include Gitlab::Utils::StrongMemoize
diff --git a/app/services/concerns/update_visibility_level.rb b/app/services/concerns/update_visibility_level.rb
index 536fcc6acce..b7a161f5089 100644
--- a/app/services/concerns/update_visibility_level.rb
+++ b/app/services/concerns/update_visibility_level.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module UpdateVisibilityLevel
def valid_visibility_level_change?(target, new_visibility)
# check that user is allowed to set specified visibility_level
diff --git a/app/services/concerns/users/new_user_notifier.rb b/app/services/concerns/users/new_user_notifier.rb
index 231693ce7a9..11547e4a5b6 100644
--- a/app/services/concerns/users/new_user_notifier.rb
+++ b/app/services/concerns/users/new_user_notifier.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Users
module NewUserNotifier
def notify_new_user(user, reset_token)
diff --git a/app/services/concerns/users/participable_service.rb b/app/services/concerns/users/participable_service.rb
index bf60b96938d..5b408bd96c7 100644
--- a/app/services/concerns/users/participable_service.rb
+++ b/app/services/concerns/users/participable_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Users
module ParticipableService
extend ActiveSupport::Concern
diff --git a/app/services/deploy_keys/create_service.rb b/app/services/deploy_keys/create_service.rb
index 16de3d08df2..a25e73666f8 100644
--- a/app/services/deploy_keys/create_service.rb
+++ b/app/services/deploy_keys/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module DeployKeys
class CreateService < Keys::BaseService
def execute
diff --git a/app/services/deploy_tokens/create_service.rb b/app/services/deploy_tokens/create_service.rb
index 52f545947af..dc0122002e9 100644
--- a/app/services/deploy_tokens/create_service.rb
+++ b/app/services/deploy_tokens/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module DeployTokens
class CreateService < BaseService
def execute
diff --git a/app/services/discussions/base_service.rb b/app/services/discussions/base_service.rb
index e4dfe6e71bb..86b8310f0a6 100644
--- a/app/services/discussions/base_service.rb
+++ b/app/services/discussions/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Discussions
class BaseService < ::BaseService
end
diff --git a/app/services/discussions/resolve_service.rb b/app/services/discussions/resolve_service.rb
index 0437195f588..816cd45b07a 100644
--- a/app/services/discussions/resolve_service.rb
+++ b/app/services/discussions/resolve_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Discussions
class ResolveService < Discussions::BaseService
def execute(one_or_more_discussions)
diff --git a/app/services/discussions/update_diff_position_service.rb b/app/services/discussions/update_diff_position_service.rb
index 746f209e20f..c61437fb2e3 100644
--- a/app/services/discussions/update_diff_position_service.rb
+++ b/app/services/discussions/update_diff_position_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Discussions
class UpdateDiffPositionService < BaseService
def execute(discussion)
diff --git a/app/services/emails/base_service.rb b/app/services/emails/base_service.rb
index 5bbceeb3b3f..ba7b689a9af 100644
--- a/app/services/emails/base_service.rb
+++ b/app/services/emails/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Emails
class BaseService
def initialize(current_user, params = {})
diff --git a/app/services/emails/confirm_service.rb b/app/services/emails/confirm_service.rb
index b5301bf2b82..38204e011dd 100644
--- a/app/services/emails/confirm_service.rb
+++ b/app/services/emails/confirm_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Emails
class ConfirmService < ::Emails::BaseService
def execute(email)
diff --git a/app/services/emails/create_service.rb b/app/services/emails/create_service.rb
index 94a841af7c3..acf575e24e5 100644
--- a/app/services/emails/create_service.rb
+++ b/app/services/emails/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Emails
class CreateService < ::Emails::BaseService
def execute(extra_params = {})
diff --git a/app/services/emails/destroy_service.rb b/app/services/emails/destroy_service.rb
index 1ed131fe326..9ca1a03e172 100644
--- a/app/services/emails/destroy_service.rb
+++ b/app/services/emails/destroy_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Emails
class DestroyService < ::Emails::BaseService
def execute(email)
diff --git a/app/services/events/render_service.rb b/app/services/events/render_service.rb
index bb72d7685dd..50429683902 100644
--- a/app/services/events/render_service.rb
+++ b/app/services/events/render_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Events
class RenderService < BaseRenderer
def execute(events, atom_request: false)
diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb
index 8d4b9f14780..025f093a428 100644
--- a/app/services/files/base_service.rb
+++ b/app/services/files/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Files
class BaseService < Commits::CreateService
FileChangedError = Class.new(StandardError)
diff --git a/app/services/files/create_dir_service.rb b/app/services/files/create_dir_service.rb
index 8ecac6115bd..362b80071ba 100644
--- a/app/services/files/create_dir_service.rb
+++ b/app/services/files/create_dir_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Files
class CreateDirService < Files::BaseService
def create_commit!
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb
index a954564946b..fd5442a6c28 100644
--- a/app/services/files/create_service.rb
+++ b/app/services/files/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Files
class CreateService < Files::BaseService
def create_commit!
diff --git a/app/services/files/delete_service.rb b/app/services/files/delete_service.rb
index 32a57484d4e..0ec1f79d396 100644
--- a/app/services/files/delete_service.rb
+++ b/app/services/files/delete_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Files
class DeleteService < Files::BaseService
def create_commit!
diff --git a/app/services/files/multi_service.rb b/app/services/files/multi_service.rb
index 13a1dee4173..08088f8c592 100644
--- a/app/services/files/multi_service.rb
+++ b/app/services/files/multi_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Files
class MultiService < Files::BaseService
UPDATE_FILE_ACTIONS = %w(update move delete).freeze
diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb
index 1902d1cea72..2b3e96e6c53 100644
--- a/app/services/files/update_service.rb
+++ b/app/services/files/update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Files
class UpdateService < Files::BaseService
def create_commit!
diff --git a/app/services/gpg_keys/create_service.rb b/app/services/gpg_keys/create_service.rb
index e822a89c4d3..e41444b2a82 100644
--- a/app/services/gpg_keys/create_service.rb
+++ b/app/services/gpg_keys/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module GpgKeys
class CreateService < Keys::BaseService
def execute
diff --git a/app/services/groups/base_service.rb b/app/services/groups/base_service.rb
index a8fa098246a..8c8acce5ca5 100644
--- a/app/services/groups/base_service.rb
+++ b/app/services/groups/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Groups
class BaseService < ::BaseService
attr_accessor :group, :current_user, :params
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb
index 70e50aa0f12..24d8400c625 100644
--- a/app/services/groups/create_service.rb
+++ b/app/services/groups/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Groups
class CreateService < Groups::BaseService
def initialize(user, params = {})
diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb
index 58e88688dfa..c4554ce45fb 100644
--- a/app/services/groups/destroy_service.rb
+++ b/app/services/groups/destroy_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Groups
class DestroyService < Groups::BaseService
def async_execute
diff --git a/app/services/groups/nested_create_service.rb b/app/services/groups/nested_create_service.rb
index c2dfbac5414..50d34d8cb91 100644
--- a/app/services/groups/nested_create_service.rb
+++ b/app/services/groups/nested_create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Groups
class NestedCreateService < Groups::BaseService
attr_reader :group_path, :visibility_level
diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb
index e591c820cff..ea7576077f3 100644
--- a/app/services/groups/transfer_service.rb
+++ b/app/services/groups/transfer_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Groups
class TransferService < Groups::BaseService
ERROR_MESSAGES = {
diff --git a/app/services/groups/update_service.rb b/app/services/groups/update_service.rb
index 08e3efb96e3..436a6b18cb1 100644
--- a/app/services/groups/update_service.rb
+++ b/app/services/groups/update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Groups
class UpdateService < Groups::BaseService
include UpdateVisibilityLevel
diff --git a/app/services/issuable/bulk_update_service.rb b/app/services/issuable/bulk_update_service.rb
index 5d42a89fced..051d5ba881d 100644
--- a/app/services/issuable/bulk_update_service.rb
+++ b/app/services/issuable/bulk_update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issuable
class BulkUpdateService < IssuableBaseService
def execute(type)
diff --git a/app/services/issuable/common_system_notes_service.rb b/app/services/issuable/common_system_notes_service.rb
index 3da21bd8b8f..028b350ca07 100644
--- a/app/services/issuable/common_system_notes_service.rb
+++ b/app/services/issuable/common_system_notes_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issuable
class CommonSystemNotesService < ::BaseService
attr_reader :issuable
diff --git a/app/services/issuable/destroy_service.rb b/app/services/issuable/destroy_service.rb
index 0b1a33518c6..4c64655a622 100644
--- a/app/services/issuable/destroy_service.rb
+++ b/app/services/issuable/destroy_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issuable
class DestroyService < IssuableBaseService
def execute(issuable)
diff --git a/app/services/issues/base_service.rb b/app/services/issues/base_service.rb
index cbfef175af0..25389a946bb 100644
--- a/app/services/issues/base_service.rb
+++ b/app/services/issues/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class BaseService < ::IssuableBaseService
def hook_data(issue, action, old_associations: {})
diff --git a/app/services/issues/build_service.rb b/app/services/issues/build_service.rb
index 3a4f7b159f1..52b45f1b2ce 100644
--- a/app/services/issues/build_service.rb
+++ b/app/services/issues/build_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class BuildService < Issues::BaseService
include ResolveDiscussions
@@ -44,14 +46,14 @@ module Issues
other_note_count = discussion.notes.size - 1
- discussion_info = "- [ ] #{first_note_to_resolve.author.to_reference} #{action} a [discussion](#{note_url}): "
- discussion_info << " (+#{other_note_count} #{'comment'.pluralize(other_note_count)})" if other_note_count > 0
+ discussion_info = ["- [ ] #{first_note_to_resolve.author.to_reference} #{action} a [discussion](#{note_url}): "]
+ discussion_info << "(+#{other_note_count} #{'comment'.pluralize(other_note_count)})" if other_note_count > 0
note_without_block_quotes = Banzai::Filter::BlockquoteFenceFilter.new(first_note_to_resolve.note).call
spaces = ' ' * 4
quote = note_without_block_quotes.lines.map { |line| "#{spaces}> #{line}" }.join
- [discussion_info, quote].join("\n\n")
+ [discussion_info.join(' '), quote].join("\n\n")
end
def issue_params
diff --git a/app/services/issues/close_service.rb b/app/services/issues/close_service.rb
index 4a99367c575..e5cc12e6082 100644
--- a/app/services/issues/close_service.rb
+++ b/app/services/issues/close_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class CloseService < Issues::BaseService
# Closes the supplied issue if the current user is able to do so.
diff --git a/app/services/issues/create_service.rb b/app/services/issues/create_service.rb
index 0307634c0b6..5793a15e1bc 100644
--- a/app/services/issues/create_service.rb
+++ b/app/services/issues/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class CreateService < Issues::BaseService
include SpamCheckService
diff --git a/app/services/issues/duplicate_service.rb b/app/services/issues/duplicate_service.rb
index 5c0854e664d..9b22f5e7914 100644
--- a/app/services/issues/duplicate_service.rb
+++ b/app/services/issues/duplicate_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class DuplicateService < Issues::BaseService
def execute(duplicate_issue, canonical_issue)
diff --git a/app/services/issues/fetch_referenced_merge_requests_service.rb b/app/services/issues/fetch_referenced_merge_requests_service.rb
index 39c8ded9df4..5e84f3c81c9 100644
--- a/app/services/issues/fetch_referenced_merge_requests_service.rb
+++ b/app/services/issues/fetch_referenced_merge_requests_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class FetchReferencedMergeRequestsService < Issues::BaseService
def execute(issue)
diff --git a/app/services/issues/move_service.rb b/app/services/issues/move_service.rb
index 6e5c29a5c40..841bce9949e 100644
--- a/app/services/issues/move_service.rb
+++ b/app/services/issues/move_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class MoveService < Issues::BaseService
MoveError = Class.new(StandardError)
diff --git a/app/services/issues/reopen_service.rb b/app/services/issues/reopen_service.rb
index 02224f3357a..3bd53f9ccdc 100644
--- a/app/services/issues/reopen_service.rb
+++ b/app/services/issues/reopen_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class ReopenService < Issues::BaseService
def execute(issue)
diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb
index 1000e1842b6..c02dddf67b2 100644
--- a/app/services/issues/update_service.rb
+++ b/app/services/issues/update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Issues
class UpdateService < Issues::BaseService
include SpamCheckService
diff --git a/app/services/keys/base_service.rb b/app/services/keys/base_service.rb
index df8e82f5f60..113e22b01ce 100644
--- a/app/services/keys/base_service.rb
+++ b/app/services/keys/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Keys
class BaseService
attr_accessor :user, :params
diff --git a/app/services/keys/create_service.rb b/app/services/keys/create_service.rb
index e2e5a6c46c5..d9fa69a88d7 100644
--- a/app/services/keys/create_service.rb
+++ b/app/services/keys/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Keys
class CreateService < ::Keys::BaseService
def execute
diff --git a/app/services/keys/destroy_service.rb b/app/services/keys/destroy_service.rb
index 785cfa3a1d8..e2ae4047941 100644
--- a/app/services/keys/destroy_service.rb
+++ b/app/services/keys/destroy_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Keys
class DestroyService < ::Keys::BaseService
def execute(key)
diff --git a/app/services/keys/last_used_service.rb b/app/services/keys/last_used_service.rb
index dbd79f7da55..daef544bac0 100644
--- a/app/services/keys/last_used_service.rb
+++ b/app/services/keys/last_used_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Keys
class LastUsedService
TIMEOUT = 1.day.to_i
diff --git a/app/services/labels/base_service.rb b/app/services/labels/base_service.rb
index 91d72a57b4e..ead7f2ea607 100644
--- a/app/services/labels/base_service.rb
+++ b/app/services/labels/base_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Labels
class BaseService < ::BaseService
COLOR_NAME_TO_HEX = {
diff --git a/app/services/labels/create_service.rb b/app/services/labels/create_service.rb
index 6c399c92377..fe34be41ac1 100644
--- a/app/services/labels/create_service.rb
+++ b/app/services/labels/create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Labels
class CreateService < Labels::BaseService
def initialize(params = {})
diff --git a/app/services/labels/find_or_create_service.rb b/app/services/labels/find_or_create_service.rb
index a72da3c637f..e4486764a4d 100644
--- a/app/services/labels/find_or_create_service.rb
+++ b/app/services/labels/find_or_create_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Labels
class FindOrCreateService
def initialize(current_user, parent, params = {})
diff --git a/app/services/labels/promote_service.rb b/app/services/labels/promote_service.rb
index 74a85e5c9f0..c0463052821 100644
--- a/app/services/labels/promote_service.rb
+++ b/app/services/labels/promote_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Labels
class PromoteService < BaseService
BATCH_SIZE = 1000
diff --git a/app/services/labels/transfer_service.rb b/app/services/labels/transfer_service.rb
index 9b7486cf53b..1bd8d9fc325 100644
--- a/app/services/labels/transfer_service.rb
+++ b/app/services/labels/transfer_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Labels::TransferService class
#
# User for recreate the missing group labels at project level
diff --git a/app/services/labels/update_service.rb b/app/services/labels/update_service.rb
index 28dcabf9541..c3a720a1c66 100644
--- a/app/services/labels/update_service.rb
+++ b/app/services/labels/update_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Labels
class UpdateService < Labels::BaseService
def initialize(params = {})