Commit 12613bc1 authored by Sean McGivern's avatar Sean McGivern

Merge branch '31343-remove-unnecessary-use-of-freeze' into 'master'

Remove unnecessary use of freeze

See merge request gitlab-org/gitlab!57056
parents 92641b39 43ff9caa
...@@ -4,7 +4,7 @@ module Emails ...@@ -4,7 +4,7 @@ module Emails
module InProductMarketing module InProductMarketing
include InProductMarketingHelper include InProductMarketingHelper
FROM_ADDRESS = 'GitLab <team@gitlab.com>'.freeze FROM_ADDRESS = 'GitLab <team@gitlab.com>'
CUSTOM_HEADERS = { CUSTOM_HEADERS = {
'X-Mailgun-Track' => 'yes', 'X-Mailgun-Track' => 'yes',
'X-Mailgun-Track-Clicks' => 'yes', 'X-Mailgun-Track-Clicks' => 'yes',
......
---
title: Remove unnecessary use of freeze
merge_request: 57056
author: Lee Tickett @leetickett
type: other
...@@ -131,7 +131,7 @@ module EE ...@@ -131,7 +131,7 @@ module EE
end end
class GeoGitLFSHelper class GeoGitLFSHelper
MINIMUM_GIT_LFS_VERSION = '2.4.2'.freeze MINIMUM_GIT_LFS_VERSION = '2.4.2'
def initialize(project, geo_route_helper, operation, current_version) def initialize(project, geo_route_helper, operation, current_version)
@project = project @project = project
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
class Groups::Analytics::CoverageReportsController < Groups::Analytics::ApplicationController class Groups::Analytics::CoverageReportsController < Groups::Analytics::ApplicationController
feature_category :code_testing feature_category :code_testing
COVERAGE_PARAM = 'coverage'.freeze COVERAGE_PARAM = 'coverage'
before_action :load_group before_action :load_group
before_action -> { check_feature_availability!(:group_coverage_reports) } before_action -> { check_feature_availability!(:group_coverage_reports) }
......
# frozen_string_literal: true # frozen_string_literal: true
class DastSiteValidationsFinder class DastSiteValidationsFinder
DEFAULT_SORT_VALUE = 'id'.freeze DEFAULT_SORT_VALUE = 'id'
DEFAULT_SORT_DIRECTION = 'desc'.freeze DEFAULT_SORT_DIRECTION = 'desc'
def initialize(params = {}) def initialize(params = {})
@params = params @params = params
......
...@@ -7,9 +7,9 @@ module EE ...@@ -7,9 +7,9 @@ module EE
prepended do prepended do
WEIGHT_RANGE = (0..20).freeze WEIGHT_RANGE = (0..20).freeze
WEIGHT_ALL = 'Everything'.freeze WEIGHT_ALL = 'Everything'
WEIGHT_ANY = 'Any'.freeze WEIGHT_ANY = 'Any'
WEIGHT_NONE = 'None'.freeze WEIGHT_NONE = 'None'
ELASTICSEARCH_PERMISSION_TRACKED_FIELDS = %w(assignee_ids author_id confidential).freeze ELASTICSEARCH_PERMISSION_TRACKED_FIELDS = %w(assignee_ids author_id confidential).freeze
include Elastic::ApplicationVersionedSearch include Elastic::ApplicationVersionedSearch
......
...@@ -6,12 +6,12 @@ module EE ...@@ -6,12 +6,12 @@ module EE
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
prepended do prepended do
FREE = 'free'.freeze FREE = 'free'
BRONZE = 'bronze'.freeze BRONZE = 'bronze'
SILVER = 'silver'.freeze SILVER = 'silver'
PREMIUM = 'premium'.freeze PREMIUM = 'premium'
GOLD = 'gold'.freeze GOLD = 'gold'
ULTIMATE = 'ultimate'.freeze ULTIMATE = 'ultimate'
EE_DEFAULT_PLANS = (const_get(:DEFAULT_PLANS, false) + [FREE]).freeze EE_DEFAULT_PLANS = (const_get(:DEFAULT_PLANS, false) + [FREE]).freeze
PAID_HOSTED_PLANS = [BRONZE, SILVER, PREMIUM, GOLD, ULTIMATE].freeze PAID_HOSTED_PLANS = [BRONZE, SILVER, PREMIUM, GOLD, ULTIMATE].freeze
......
...@@ -190,8 +190,8 @@ class GeoNodeStatus < ApplicationRecord ...@@ -190,8 +190,8 @@ class GeoNodeStatus < ApplicationRecord
}.merge(replicator_class_prometheus_metrics).freeze }.merge(replicator_class_prometheus_metrics).freeze
EXPIRATION_IN_MINUTES = 10 EXPIRATION_IN_MINUTES = 10
HEALTHY_STATUS = 'Healthy'.freeze HEALTHY_STATUS = 'Healthy'
UNHEALTHY_STATUS = 'Unhealthy'.freeze UNHEALTHY_STATUS = 'Unhealthy'
def self.alternative_status_store_accessor(attr_names) def self.alternative_status_store_accessor(attr_names)
attr_names.each do |attr_name| attr_names.each do |attr_name|
......
...@@ -14,7 +14,7 @@ class ProductivityAnalytics ...@@ -14,7 +14,7 @@ class ProductivityAnalytics
}.freeze }.freeze
METRIC_TYPES = METRIC_COLUMNS.keys.freeze METRIC_TYPES = METRIC_COLUMNS.keys.freeze
DEFAULT_TYPE = 'days_to_merge'.freeze DEFAULT_TYPE = 'days_to_merge'
def self.start_date def self.start_date
ApplicationSetting.current&.productivity_analytics_start_date ApplicationSetting.current&.productivity_analytics_start_date
......
...@@ -53,7 +53,7 @@ class SamlProvider < ApplicationRecord ...@@ -53,7 +53,7 @@ class SamlProvider < ApplicationRecord
class DefaultOptions class DefaultOptions
include Gitlab::Routing include Gitlab::Routing
NAME_IDENTIFIER_FORMAT = 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified'.freeze NAME_IDENTIFIER_FORMAT = 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified'
def initialize(group_path) def initialize(group_path)
@group_path = group_path @group_path = group_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment