Commit 265478ad authored by gfyoung's avatar gfyoung

Enable frozen string in apps/services/**/*.rb

For directories application_settings --> labels.

Partially addresses #47424.
parent 7f0431dd
# frozen_string_literal: true
module ApplicationSettings module ApplicationSettings
class BaseService < ::BaseService class BaseService < ::BaseService
def initialize(application_setting, user, params = {}) def initialize(application_setting, user, params = {})
......
# frozen_string_literal: true
module ApplicationSettings module ApplicationSettings
class UpdateService < ApplicationSettings::BaseService class UpdateService < ApplicationSettings::BaseService
attr_reader :params, :application_setting attr_reader :params, :application_setting
......
# frozen_string_literal: true
module Applications module Applications
class CreateService class CreateService
def initialize(current_user, params) def initialize(current_user, params)
......
# frozen_string_literal: true
module Auth module Auth
class ContainerRegistryAuthenticationService < BaseService class ContainerRegistryAuthenticationService < BaseService
AUDIENCE = 'container_registry'.freeze AUDIENCE = 'container_registry'.freeze
......
# frozen_string_literal: true
module Badges module Badges
class BaseService class BaseService
protected protected
......
# frozen_string_literal: true
module Badges module Badges
class BuildService < Badges::BaseService class BuildService < Badges::BaseService
# returns the created badge # returns the created badge
......
# frozen_string_literal: true
module Badges module Badges
class CreateService < Badges::BaseService class CreateService < Badges::BaseService
# returns the created badge # returns the created badge
......
# frozen_string_literal: true
module Badges module Badges
class UpdateService < Badges::BaseService class UpdateService < Badges::BaseService
# returns the updated badge # returns the updated badge
......
# frozen_string_literal: true
module Boards module Boards
class BaseService < ::BaseService class BaseService < ::BaseService
# Parent can either a group or a project # Parent can either a group or a project
......
# frozen_string_literal: true
module Boards module Boards
class CreateService < Boards::BaseService class CreateService < Boards::BaseService
def execute def execute
......
# frozen_string_literal: true
module Boards module Boards
module Issues module Issues
class CreateService < Boards::BaseService class CreateService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Issues module Issues
class ListService < Boards::BaseService class ListService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Issues module Issues
class MoveService < Boards::BaseService class MoveService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
class ListService < Boards::BaseService class ListService < Boards::BaseService
def execute def execute
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class CreateService < Boards::BaseService class CreateService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class DestroyService < Boards::BaseService class DestroyService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class GenerateService < Boards::BaseService class GenerateService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class ListService < Boards::BaseService class ListService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class MoveService < Boards::BaseService class MoveService < Boards::BaseService
......
# frozen_string_literal: true
module ChatNames module ChatNames
class AuthorizeUserService class AuthorizeUserService
include Gitlab::Routing include Gitlab::Routing
......
# frozen_string_literal: true
module ChatNames module ChatNames
class FindUserService class FindUserService
def initialize(service, params) def initialize(service, params)
......
# frozen_string_literal: true
module Ci module Ci
class CreatePipelineScheduleService < BaseService class CreatePipelineScheduleService < BaseService
def execute def execute
......
# frozen_string_literal: true
module Ci module Ci
class CreatePipelineService < BaseService class CreatePipelineService < BaseService
attr_reader :pipeline attr_reader :pipeline
......
# frozen_string_literal: true
module Ci module Ci
## ##
# We call this service everytime we persist a CI/CD job. # We call this service everytime we persist a CI/CD job.
......
# frozen_string_literal: true
module Ci module Ci
class ExtractSectionsFromBuildTraceService < BaseService class ExtractSectionsFromBuildTraceService < BaseService
def execute(build) def execute(build)
......
# frozen_string_literal: true
## ##
# TODO: # TODO:
# Almost components in this class were copied from app/models/project_services/kubernetes_service.rb # Almost components in this class were copied from app/models/project_services/kubernetes_service.rb
......
# frozen_string_literal: true
module Ci module Ci
class PipelineTriggerService < BaseService class PipelineTriggerService < BaseService
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
module Ci module Ci
class PlayBuildService < ::BaseService class PlayBuildService < ::BaseService
def execute(build) def execute(build)
......
# frozen_string_literal: true
module Ci module Ci
class ProcessPipelineService < BaseService class ProcessPipelineService < BaseService
attr_reader :pipeline attr_reader :pipeline
......
# frozen_string_literal: true
module Ci module Ci
# This class responsible for assigning # This class responsible for assigning
# proper pending build to runner on runner API request # proper pending build to runner on runner API request
......
# frozen_string_literal: true
module Ci module Ci
class RetryBuildService < ::BaseService class RetryBuildService < ::BaseService
CLONE_ACCESSORS = %i[pipeline project ref tag options commands name CLONE_ACCESSORS = %i[pipeline project ref tag options commands name
......
# frozen_string_literal: true
module Ci module Ci
class RetryPipelineService < ::BaseService class RetryPipelineService < ::BaseService
include Gitlab::OptimisticLocking include Gitlab::OptimisticLocking
......
# frozen_string_literal: true
module Ci module Ci
class StopEnvironmentsService < BaseService class StopEnvironmentsService < BaseService
attr_reader :ref attr_reader :ref
......
# frozen_string_literal: true
module Ci module Ci
class UpdateBuildQueueService class UpdateBuildQueueService
def execute(build) def execute(build)
......
# frozen_string_literal: true
module Ci module Ci
class UpdateRunnerService class UpdateRunnerService
attr_reader :runner attr_reader :runner
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class BaseHelmService class BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class CheckIngressIpAddressService < BaseHelmService class CheckIngressIpAddressService < BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class CheckInstallationProgressService < BaseHelmService class CheckInstallationProgressService < BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class InstallService < BaseHelmService class InstallService < BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class ScheduleInstallationService < ::BaseService class ScheduleInstallationService < ::BaseService
......
# frozen_string_literal: true
module Clusters module Clusters
class CreateService < BaseService class CreateService < BaseService
attr_reader :access_token attr_reader :access_token
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class FetchOperationService class FetchOperationService
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class FinalizeCreationService class FinalizeCreationService
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class ProvisionService class ProvisionService
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class VerifyProvisionStatusService class VerifyProvisionStatusService
......
# frozen_string_literal: true
module Clusters module Clusters
class UpdateService < BaseService class UpdateService < BaseService
def execute(cluster) def execute(cluster)
......
# frozen_string_literal: true
module Commits module Commits
class ChangeService < Commits::CreateService class ChangeService < Commits::CreateService
def initialize(*args) def initialize(*args)
......
# frozen_string_literal: true
module Commits module Commits
class CherryPickService < ChangeService class CherryPickService < ChangeService
def create_commit! def create_commit!
......
# frozen_string_literal: true
module Commits module Commits
class CreateService < ::BaseService class CreateService < ::BaseService
ValidationError = Class.new(StandardError) ValidationError = Class.new(StandardError)
......
# frozen_string_literal: true
module Commits module Commits
class RevertService < ChangeService class RevertService < ChangeService
def create_commit! def create_commit!
......
# frozen_string_literal: true
# #
# Concern that helps with getting an exclusive lease for running a block # Concern that helps with getting an exclusive lease for running a block
# of code. # of code.
......
# frozen_string_literal: true
module Issues module Issues
module ResolveDiscussions module ResolveDiscussions
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
module UpdateVisibilityLevel module UpdateVisibilityLevel
def valid_visibility_level_change?(target, new_visibility) def valid_visibility_level_change?(target, new_visibility)
# check that user is allowed to set specified visibility_level # check that user is allowed to set specified visibility_level
......
# frozen_string_literal: true
module Users module Users
module NewUserNotifier module NewUserNotifier
def notify_new_user(user, reset_token) def notify_new_user(user, reset_token)
......
# frozen_string_literal: true
module Users module Users
module ParticipableService module ParticipableService
extend ActiveSupport::Concern extend ActiveSupport::Concern
......
# frozen_string_literal: true
module DeployKeys module DeployKeys
class CreateService < Keys::BaseService class CreateService < Keys::BaseService
def execute def execute
......
# frozen_string_literal: true
module DeployTokens module DeployTokens
class CreateService < BaseService class CreateService < BaseService
def execute def execute
......
# frozen_string_literal: true
module Discussions module Discussions
class BaseService < ::BaseService class BaseService < ::BaseService
end end
......
# frozen_string_literal: true
module Discussions module Discussions
class ResolveService < Discussions::BaseService class ResolveService < Discussions::BaseService
def execute(one_or_more_discussions) def execute(one_or_more_discussions)
......
# frozen_string_literal: true
module Discussions module Discussions
class UpdateDiffPositionService < BaseService class UpdateDiffPositionService < BaseService
def execute(discussion) def execute(discussion)
......
# frozen_string_literal: true
module Emails module Emails
class BaseService class BaseService
def initialize(current_user, params = {}) def initialize(current_user, params = {})
......
# frozen_string_literal: true
module Emails module Emails
class ConfirmService < ::Emails::BaseService class ConfirmService < ::Emails::BaseService
def execute(email) def execute(email)
......
# frozen_string_literal: true
module Emails module Emails
class CreateService < ::Emails::BaseService class CreateService < ::Emails::BaseService
def execute(extra_params = {}) def execute(extra_params = {})
......
# frozen_string_literal: true
module Emails module Emails
class DestroyService < ::Emails::BaseService class DestroyService < ::Emails::BaseService
def execute(email) def execute(email)
......
# frozen_string_literal: true
module Events module Events
class RenderService < BaseRenderer class RenderService < BaseRenderer
def execute(events, atom_request: false) def execute(events, atom_request: false)
......
# frozen_string_literal: true
module Files module Files
class BaseService < Commits::CreateService class BaseService < Commits::CreateService
FileChangedError = Class.new(StandardError) FileChangedError = Class.new(StandardError)
......
# frozen_string_literal: true
module Files module Files
class CreateDirService < Files::BaseService class CreateDirService < Files::BaseService
def create_commit! def create_commit!
......
# frozen_string_literal: true
module Files module Files
class CreateService < Files::BaseService class CreateService < Files::BaseService
def create_commit! def create_commit!
......
# frozen_string_literal: true
module Files module Files
class DeleteService < Files::BaseService class DeleteService < Files::BaseService
def create_commit! def create_commit!
......
# frozen_string_literal: true
module Files module Files
class MultiService < Files::BaseService class MultiService < Files::BaseService
UPDATE_FILE_ACTIONS = %w(update move delete).freeze UPDATE_FILE_ACTIONS = %w(update move delete).freeze
......
# frozen_string_literal: true
module Files module Files
class UpdateService < Files::BaseService class UpdateService < Files::BaseService
def create_commit! def create_commit!
......
# frozen_string_literal: true
module GpgKeys module GpgKeys
class CreateService < Keys::BaseService class CreateService < Keys::BaseService
def execute def execute
......
# frozen_string_literal: true
module Groups module Groups
class BaseService < ::BaseService class BaseService < ::BaseService
attr_accessor :group, :current_user, :params attr_accessor :group, :current_user, :params
......
# frozen_string_literal: true
module Groups module Groups
class CreateService < Groups::BaseService class CreateService < Groups::BaseService
def initialize(user, params = {}) def initialize(user, params = {})
......
# frozen_string_literal: true
module Groups module Groups
class DestroyService < Groups::BaseService class DestroyService < Groups::BaseService
def async_execute def async_execute
......
# frozen_string_literal: true
module Groups module Groups
class NestedCreateService < Groups::BaseService class NestedCreateService < Groups::BaseService
attr_reader :group_path, :visibility_level attr_reader :group_path, :visibility_level
......
# frozen_string_literal: true
module Groups module Groups
class TransferService < Groups::BaseService class TransferService < Groups::BaseService
ERROR_MESSAGES = { ERROR_MESSAGES = {
......