Skip to content
Snippets Groups Projects
Commit 20111b04 authored by dineshpanda's avatar dineshpanda
Browse files

Avoid calling freeze on already frozen strings in app/models

parent dc864927
No related branches found
No related tags found
No related merge requests found
Showing
with 29 additions and 29 deletions
# frozen_string_literal: true
 
class AwardEmoji < ApplicationRecord
DOWNVOTE_NAME = "thumbsdown".freeze
UPVOTE_NAME = "thumbsup".freeze
DOWNVOTE_NAME = "thumbsdown"
UPVOTE_NAME = "thumbsup"
 
include Participable
include GhostUser
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module BlobViewer
class Base
PARTIAL_PATH_PREFIX = 'projects/blob/viewers'.freeze
PARTIAL_PATH_PREFIX = 'projects/blob/viewers'
 
class_attribute :partial_name, :loading_partial_name, :type, :extensions, :file_types, :load_async, :binary, :switcher_icon, :switcher_title, :collapse_limit, :size_limit
 
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@ class BroadcastMessage < ApplicationRecord
default_value_for :color, '#E75E40'
default_value_for :font, '#FFFFFF'
 
CACHE_KEY = 'broadcast_message_current_json'.freeze
CACHE_KEY = 'broadcast_message_current_json'
 
after_commit :flush_redis_cache
 
Loading
Loading
Loading
Loading
@@ -445,7 +445,7 @@ module Ci
end
end
 
CI_REGISTRY_USER = 'gitlab-ci-token'.freeze
CI_REGISTRY_USER = 'gitlab-ci-token'
 
def persisted_variables
Gitlab::Ci::Variables::Collection.new.tap do |variables|
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ module Ci
class BuildRunnerSession < ApplicationRecord
extend Gitlab::Ci::Model
 
TERMINAL_SUBPROTOCOL = 'terminal.gitlab.com'.freeze
TERMINAL_SUBPROTOCOL = 'terminal.gitlab.com'
 
self.table_name = 'ci_builds_runner_session'
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module Clusters
module Applications
class Ingress < ApplicationRecord
VERSION = '1.1.2'.freeze
VERSION = '1.1.2'
 
self.table_name = 'clusters_applications_ingress'
 
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ require 'securerandom'
module Clusters
module Applications
class Jupyter < ApplicationRecord
VERSION = '0.9-174bbd5'.freeze
VERSION = '0.9-174bbd5'
 
self.table_name = 'clusters_applications_jupyter'
 
Loading
Loading
Loading
Loading
@@ -3,9 +3,9 @@
module Clusters
module Applications
class Knative < ApplicationRecord
VERSION = '0.6.0'.freeze
REPOSITORY = 'https://storage.googleapis.com/triggermesh-charts'.freeze
METRICS_CONFIG = 'https://storage.googleapis.com/triggermesh-charts/istio-metrics.yaml'.freeze
VERSION = '0.6.0'
REPOSITORY = 'https://storage.googleapis.com/triggermesh-charts'
METRICS_CONFIG = 'https://storage.googleapis.com/triggermesh-charts/istio-metrics.yaml'
FETCH_IP_ADDRESS_DELAY = 30.seconds
API_RESOURCES_PATH = 'config/knative/api_resources.yml'
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module Clusters
module Applications
class Runner < ApplicationRecord
VERSION = '0.8.0'.freeze
VERSION = '0.8.0'
 
self.table_name = 'clusters_applications_runners'
 
Loading
Loading
Loading
Loading
@@ -20,8 +20,8 @@ module Clusters
Applications::Runner.application_name => Applications::Runner,
Applications::Prometheus.application_name => Applications::Prometheus
}.merge(PROJECT_ONLY_APPLICATIONS).freeze
DEFAULT_ENVIRONMENT = '*'.freeze
KUBE_INGRESS_BASE_DOMAIN = 'KUBE_INGRESS_BASE_DOMAIN'.freeze
DEFAULT_ENVIRONMENT = '*'
KUBE_INGRESS_BASE_DOMAIN = 'KUBE_INGRESS_BASE_DOMAIN'
 
belongs_to :user
 
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ module CacheableAttributes
 
class_methods do
def cache_key
"#{name}:#{Gitlab::VERSION}:#{Rails.version}".freeze
"#{name}:#{Gitlab::VERSION}:#{Rails.version}"
end
 
# Can be overridden
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module HasStatus
extend ActiveSupport::Concern
 
DEFAULT_STATUS = 'created'.freeze
DEFAULT_STATUS = 'created'
BLOCKED_STATUS = %w[manual scheduled].freeze
AVAILABLE_STATUSES = %w[created preparing pending running success failed canceled skipped manual scheduled].freeze
STARTED_STATUSES = %w[running success failed skipped manual scheduled].freeze
Loading
Loading
Loading
Loading
@@ -4,9 +4,9 @@ module ProtectedRefAccess
extend ActiveSupport::Concern
 
HUMAN_ACCESS_LEVELS = {
Gitlab::Access::MAINTAINER => "Maintainers".freeze,
Gitlab::Access::DEVELOPER => "Developers + Maintainers".freeze,
Gitlab::Access::NO_ACCESS => "No one".freeze
Gitlab::Access::MAINTAINER => "Maintainers",
Gitlab::Access::DEVELOPER => "Developers + Maintainers",
Gitlab::Access::NO_ACCESS => "No one"
}.freeze
 
class_methods do
Loading
Loading
Loading
Loading
@@ -9,8 +9,8 @@ require 'task_list/filter'
#
# Used by MergeRequest and Issue
module Taskable
COMPLETED = 'completed'.freeze
INCOMPLETE = 'incomplete'.freeze
COMPLETED = 'completed'
INCOMPLETE = 'incomplete'
COMPLETE_PATTERN = /(\[[xX]\])/.freeze
INCOMPLETE_PATTERN = /(\[[\s]\])/.freeze
ITEM_PATTERN = %r{
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ class DeployToken < ApplicationRecord
add_authentication_token_field :token, encrypted: :optional
 
AVAILABLE_SCOPES = %i(read_repository read_registry).freeze
GITLAB_DEPLOY_TOKEN_NAME = 'gitlab-deploy-token'.freeze
GITLAB_DEPLOY_TOKEN_NAME = 'gitlab-deploy-token'
 
default_value_for(:expires_at) { Forever.date }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
module DiffViewer
class Base
PARTIAL_PATH_PREFIX = 'projects/diffs/viewers'.freeze
PARTIAL_PATH_PREFIX = 'projects/diffs/viewers'
 
class_attribute :partial_name, :type, :extensions, :file_types, :binary, :switcher_icon, :switcher_title
 
Loading
Loading
# frozen_string_literal: true
 
class GpgKey < ApplicationRecord
KEY_PREFIX = '-----BEGIN PGP PUBLIC KEY BLOCK-----'.freeze
KEY_SUFFIX = '-----END PGP PUBLIC KEY BLOCK-----'.freeze
KEY_PREFIX = '-----BEGIN PGP PUBLIC KEY BLOCK-----'
KEY_SUFFIX = '-----END PGP PUBLIC KEY BLOCK-----'
 
include ShaAttribute
 
Loading
Loading
Loading
Loading
@@ -4,8 +4,8 @@ require 'resolv'
 
class InstanceConfiguration
SSH_ALGORITHMS = %w(DSA ECDSA ED25519 RSA).freeze
SSH_ALGORITHMS_PATH = '/etc/ssh/'.freeze
CACHE_KEY = 'instance_configuration'.freeze
SSH_ALGORITHMS_PATH = '/etc/ssh/'
CACHE_KEY = 'instance_configuration'
EXPIRATION_TIME = 24.hours
 
def settings
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
class GroupMember < Member
include FromUnion
 
SOURCE_TYPE = 'Namespace'.freeze
SOURCE_TYPE = 'Namespace'
 
belongs_to :group, foreign_key: 'source_id'
 
Loading
Loading
# frozen_string_literal: true
 
class ProjectMember < Member
SOURCE_TYPE = 'Project'.freeze
SOURCE_TYPE = 'Project'
 
belongs_to :project, foreign_key: 'source_id'
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment