Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
92db697a
Commit
92db697a
authored
Jan 07, 2021
by
Adam Davies
Committed by
Kerri Miller
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary use of freeze
parent
4def2cb0
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
39 additions
and
34 deletions
+39
-34
app/finders/deployments_finder.rb
app/finders/deployments_finder.rb
+2
-2
app/models/authentication_event.rb
app/models/authentication_event.rb
+4
-4
app/models/ci/build_runner_session.rb
app/models/ci/build_runner_session.rb
+2
-2
app/models/namespace/root_storage_statistics.rb
app/models/namespace/root_storage_statistics.rb
+1
-1
app/models/packages/conan/file_metadatum.rb
app/models/packages/conan/file_metadatum.rb
+2
-2
app/models/packages/dependency.rb
app/models/packages/dependency.rb
+1
-1
app/models/plan.rb
app/models/plan.rb
+1
-1
app/models/project_feature_usage.rb
app/models/project_feature_usage.rb
+2
-2
app/models/project_services/datadog_service.rb
app/models/project_services/datadog_service.rb
+4
-4
app/models/user.rb
app/models/user.rb
+1
-1
app/presenters/packages/nuget/service_index_presenter.rb
app/presenters/packages/nuget/service_index_presenter.rb
+1
-1
app/services/ci/create_web_ide_terminal_service.rb
app/services/ci/create_web_ide_terminal_service.rb
+1
-1
app/services/ci/register_job_service.rb
app/services/ci/register_job_service.rb
+2
-2
app/services/ide/base_config_service.rb
app/services/ide/base_config_service.rb
+1
-1
app/services/packages/maven/find_or_create_package_service.rb
...services/packages/maven/find_or_create_package_service.rb
+2
-2
app/services/serverless/associate_domain_service.rb
app/services/serverless/associate_domain_service.rb
+1
-1
app/validators/feature_flag_strategies_validator.rb
app/validators/feature_flag_strategies_validator.rb
+3
-3
changelogs/unreleased/31343-remove-unneccessary-freeze.yml
changelogs/unreleased/31343-remove-unneccessary-freeze.yml
+5
-0
danger/roulette/Dangerfile
danger/roulette/Dangerfile
+2
-2
db/migrate/20190108192941_remove_partial_index_from_ci_builds_artifacts_file.rb
...941_remove_partial_index_from_ci_builds_artifacts_file.rb
+1
-1
No files found.
app/finders/deployments_finder.rb
View file @
92db697a
...
@@ -4,10 +4,10 @@ class DeploymentsFinder
...
@@ -4,10 +4,10 @@ class DeploymentsFinder
attr_reader
:project
,
:params
attr_reader
:project
,
:params
ALLOWED_SORT_VALUES
=
%w[id iid created_at updated_at ref]
.
freeze
ALLOWED_SORT_VALUES
=
%w[id iid created_at updated_at ref]
.
freeze
DEFAULT_SORT_VALUE
=
'id'
.
freeze
DEFAULT_SORT_VALUE
=
'id'
ALLOWED_SORT_DIRECTIONS
=
%w[asc desc]
.
freeze
ALLOWED_SORT_DIRECTIONS
=
%w[asc desc]
.
freeze
DEFAULT_SORT_DIRECTION
=
'asc'
.
freeze
DEFAULT_SORT_DIRECTION
=
'asc'
def
initialize
(
project
,
params
=
{})
def
initialize
(
project
,
params
=
{})
@project
=
project
@project
=
project
...
...
app/models/authentication_event.rb
View file @
92db697a
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
class
AuthenticationEvent
<
ApplicationRecord
class
AuthenticationEvent
<
ApplicationRecord
include
UsageStatistics
include
UsageStatistics
TWO_FACTOR
=
'two-factor'
.
freeze
TWO_FACTOR
=
'two-factor'
TWO_FACTOR_U2F
=
'two-factor-via-u2f-device'
.
freeze
TWO_FACTOR_U2F
=
'two-factor-via-u2f-device'
TWO_FACTOR_WEBAUTHN
=
'two-factor-via-webauthn-device'
.
freeze
TWO_FACTOR_WEBAUTHN
=
'two-factor-via-webauthn-device'
STANDARD
=
'standard'
.
freeze
STANDARD
=
'standard'
STATIC_PROVIDERS
=
[
TWO_FACTOR
,
TWO_FACTOR_U2F
,
TWO_FACTOR_WEBAUTHN
,
STANDARD
].
freeze
STATIC_PROVIDERS
=
[
TWO_FACTOR
,
TWO_FACTOR_U2F
,
TWO_FACTOR_WEBAUTHN
,
STANDARD
].
freeze
belongs_to
:user
,
optional:
true
belongs_to
:user
,
optional:
true
...
...
app/models/ci/build_runner_session.rb
View file @
92db697a
...
@@ -7,8 +7,8 @@ module Ci
...
@@ -7,8 +7,8 @@ module Ci
extend
Gitlab
::
Ci
::
Model
extend
Gitlab
::
Ci
::
Model
TERMINAL_SUBPROTOCOL
=
'terminal.gitlab.com'
TERMINAL_SUBPROTOCOL
=
'terminal.gitlab.com'
DEFAULT_SERVICE_NAME
=
'build'
.
freeze
DEFAULT_SERVICE_NAME
=
'build'
DEFAULT_PORT_NAME
=
'default_port'
.
freeze
DEFAULT_PORT_NAME
=
'default_port'
self
.
table_name
=
'ci_builds_runner_session'
self
.
table_name
=
'ci_builds_runner_session'
...
...
app/models/namespace/root_storage_statistics.rb
View file @
92db697a
# frozen_string_literal: true
# frozen_string_literal: true
class
Namespace::RootStorageStatistics
<
ApplicationRecord
class
Namespace::RootStorageStatistics
<
ApplicationRecord
SNIPPETS_SIZE_STAT_NAME
=
'snippets_size'
.
freeze
SNIPPETS_SIZE_STAT_NAME
=
'snippets_size'
STATISTICS_ATTRIBUTES
=
%W(
STATISTICS_ATTRIBUTES
=
%W(
storage_size
storage_size
repository_size
repository_size
...
...
app/models/packages/conan/file_metadatum.rb
View file @
92db697a
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
class
Packages::Conan::FileMetadatum
<
ApplicationRecord
class
Packages::Conan::FileMetadatum
<
ApplicationRecord
belongs_to
:package_file
,
inverse_of: :conan_file_metadatum
belongs_to
:package_file
,
inverse_of: :conan_file_metadatum
DEFAULT_PACKAGE_REVISION
=
'0'
.
freeze
DEFAULT_PACKAGE_REVISION
=
'0'
DEFAULT_RECIPE_REVISION
=
'0'
.
freeze
DEFAULT_RECIPE_REVISION
=
'0'
validates
:package_file
,
presence:
true
validates
:package_file
,
presence:
true
...
...
app/models/packages/dependency.rb
View file @
92db697a
...
@@ -6,7 +6,7 @@ class Packages::Dependency < ApplicationRecord
...
@@ -6,7 +6,7 @@ class Packages::Dependency < ApplicationRecord
validates
:name
,
uniqueness:
{
scope: :version_pattern
}
validates
:name
,
uniqueness:
{
scope: :version_pattern
}
NAME_VERSION_PATTERN_TUPLE_MATCHING
=
'(name, version_pattern) = (?, ?)'
.
freeze
NAME_VERSION_PATTERN_TUPLE_MATCHING
=
'(name, version_pattern) = (?, ?)'
MAX_STRING_LENGTH
=
255
.
freeze
MAX_STRING_LENGTH
=
255
.
freeze
MAX_CHUNKED_QUERIES_COUNT
=
10
.
freeze
MAX_CHUNKED_QUERIES_COUNT
=
10
.
freeze
...
...
app/models/plan.rb
View file @
92db697a
# frozen_string_literal: true
# frozen_string_literal: true
class
Plan
<
ApplicationRecord
class
Plan
<
ApplicationRecord
DEFAULT
=
'default'
.
freeze
DEFAULT
=
'default'
has_one
:limits
,
class_name:
'PlanLimits'
has_one
:limits
,
class_name:
'PlanLimits'
...
...
app/models/project_feature_usage.rb
View file @
92db697a
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
class
ProjectFeatureUsage
<
ApplicationRecord
class
ProjectFeatureUsage
<
ApplicationRecord
self
.
primary_key
=
:project_id
self
.
primary_key
=
:project_id
JIRA_DVCS_CLOUD_FIELD
=
'jira_dvcs_cloud_last_sync_at'
.
freeze
JIRA_DVCS_CLOUD_FIELD
=
'jira_dvcs_cloud_last_sync_at'
JIRA_DVCS_SERVER_FIELD
=
'jira_dvcs_server_last_sync_at'
.
freeze
JIRA_DVCS_SERVER_FIELD
=
'jira_dvcs_server_last_sync_at'
belongs_to
:project
belongs_to
:project
validates
:project
,
presence:
true
validates
:project
,
presence:
true
...
...
app/models/project_services/datadog_service.rb
View file @
92db697a
# frozen_string_literal: true
# frozen_string_literal: true
class
DatadogService
<
Service
class
DatadogService
<
Service
DEFAULT_SITE
=
'datadoghq.com'
.
freeze
DEFAULT_SITE
=
'datadoghq.com'
URL_TEMPLATE
=
'https://webhooks-http-intake.logs.%{datadog_site}/v1/input/'
.
freeze
URL_TEMPLATE
=
'https://webhooks-http-intake.logs.%{datadog_site}/v1/input/'
URL_TEMPLATE_API_KEYS
=
'https://app.%{datadog_site}/account/settings#api'
.
freeze
URL_TEMPLATE_API_KEYS
=
'https://app.%{datadog_site}/account/settings#api'
URL_API_KEYS_DOCS
=
"https://docs.
#{
DEFAULT_SITE
}
/account_management/api-app-keys/"
.
freeze
URL_API_KEYS_DOCS
=
"https://docs.
#{
DEFAULT_SITE
}
/account_management/api-app-keys/"
SUPPORTED_EVENTS
=
%w[
SUPPORTED_EVENTS
=
%w[
pipeline job
pipeline job
...
...
app/models/user.rb
View file @
92db697a
...
@@ -31,7 +31,7 @@ class User < ApplicationRecord
...
@@ -31,7 +31,7 @@ class User < ApplicationRecord
INSTANCE_ACCESS_REQUEST_APPROVERS_TO_BE_NOTIFIED_LIMIT
=
10
INSTANCE_ACCESS_REQUEST_APPROVERS_TO_BE_NOTIFIED_LIMIT
=
10
BLOCKED_PENDING_APPROVAL_STATE
=
'blocked_pending_approval'
.
freeze
BLOCKED_PENDING_APPROVAL_STATE
=
'blocked_pending_approval'
add_authentication_token_field
:incoming_email_token
,
token_generator:
->
{
SecureRandom
.
hex
.
to_i
(
16
).
to_s
(
36
)
}
add_authentication_token_field
:incoming_email_token
,
token_generator:
->
{
SecureRandom
.
hex
.
to_i
(
16
).
to_s
(
36
)
}
add_authentication_token_field
:feed_token
add_authentication_token_field
:feed_token
...
...
app/presenters/packages/nuget/service_index_presenter.rb
View file @
92db697a
...
@@ -19,7 +19,7 @@ module Packages
...
@@ -19,7 +19,7 @@ module Packages
metadata:
'Get package metadata.'
metadata:
'Get package metadata.'
}.
freeze
}.
freeze
VERSION
=
'3.0.0'
.
freeze
VERSION
=
'3.0.0'
PROJECT_LEVEL_SERVICES
=
%i[download publish]
.
freeze
PROJECT_LEVEL_SERVICES
=
%i[download publish]
.
freeze
GROUP_LEVEL_SERVICES
=
%i[search metadata]
.
freeze
GROUP_LEVEL_SERVICES
=
%i[search metadata]
.
freeze
...
...
app/services/ci/create_web_ide_terminal_service.rb
View file @
92db697a
...
@@ -6,7 +6,7 @@ module Ci
...
@@ -6,7 +6,7 @@ module Ci
TerminalCreationError
=
Class
.
new
(
StandardError
)
TerminalCreationError
=
Class
.
new
(
StandardError
)
TERMINAL_NAME
=
'terminal'
.
freeze
TERMINAL_NAME
=
'terminal'
attr_reader
:terminal
attr_reader
:terminal
...
...
app/services/ci/register_job_service.rb
View file @
92db697a
...
@@ -8,8 +8,8 @@ module Ci
...
@@ -8,8 +8,8 @@ module Ci
JOB_QUEUE_DURATION_SECONDS_BUCKETS
=
[
1
,
3
,
10
,
30
,
60
,
300
,
900
,
1800
,
3600
].
freeze
JOB_QUEUE_DURATION_SECONDS_BUCKETS
=
[
1
,
3
,
10
,
30
,
60
,
300
,
900
,
1800
,
3600
].
freeze
JOBS_RUNNING_FOR_PROJECT_MAX_BUCKET
=
5
.
freeze
JOBS_RUNNING_FOR_PROJECT_MAX_BUCKET
=
5
.
freeze
METRICS_SHARD_TAG_PREFIX
=
'metrics_shard::'
.
freeze
METRICS_SHARD_TAG_PREFIX
=
'metrics_shard::'
DEFAULT_METRICS_SHARD
=
'default'
.
freeze
DEFAULT_METRICS_SHARD
=
'default'
Result
=
Struct
.
new
(
:build
,
:build_json
,
:valid?
)
Result
=
Struct
.
new
(
:build
,
:build_json
,
:valid?
)
...
...
app/services/ide/base_config_service.rb
View file @
92db697a
...
@@ -4,7 +4,7 @@ module Ide
...
@@ -4,7 +4,7 @@ module Ide
class
BaseConfigService
<
::
BaseService
class
BaseConfigService
<
::
BaseService
ValidationError
=
Class
.
new
(
StandardError
)
ValidationError
=
Class
.
new
(
StandardError
)
WEBIDE_CONFIG_FILE
=
'.gitlab/.gitlab-webide.yml'
.
freeze
WEBIDE_CONFIG_FILE
=
'.gitlab/.gitlab-webide.yml'
attr_reader
:config
,
:config_content
attr_reader
:config
,
:config_content
...
...
app/services/packages/maven/find_or_create_package_service.rb
View file @
92db697a
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
module
Packages
module
Packages
module
Maven
module
Maven
class
FindOrCreatePackageService
<
BaseService
class
FindOrCreatePackageService
<
BaseService
MAVEN_METADATA_FILE
=
'maven-metadata.xml'
.
freeze
MAVEN_METADATA_FILE
=
'maven-metadata.xml'
SNAPSHOT_TERM
=
'-SNAPSHOT'
.
freeze
SNAPSHOT_TERM
=
'-SNAPSHOT'
def
execute
def
execute
package
=
package
=
...
...
app/services/serverless/associate_domain_service.rb
View file @
92db697a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
module
Serverless
module
Serverless
class
AssociateDomainService
class
AssociateDomainService
PLACEHOLDER_HOSTNAME
=
'example.com'
.
freeze
PLACEHOLDER_HOSTNAME
=
'example.com'
def
initialize
(
knative
,
pages_domain_id
:,
creator
:)
def
initialize
(
knative
,
pages_domain_id
:,
creator
:)
@knative
=
knative
@knative
=
knative
...
...
app/validators/feature_flag_strategies_validator.rb
View file @
92db697a
# frozen_string_literal: true
# frozen_string_literal: true
class
FeatureFlagStrategiesValidator
<
ActiveModel
::
EachValidator
class
FeatureFlagStrategiesValidator
<
ActiveModel
::
EachValidator
STRATEGY_DEFAULT
=
'default'
.
freeze
STRATEGY_DEFAULT
=
'default'
STRATEGY_GRADUALROLLOUTUSERID
=
'gradualRolloutUserId'
.
freeze
STRATEGY_GRADUALROLLOUTUSERID
=
'gradualRolloutUserId'
STRATEGY_USERWITHID
=
'userWithId'
.
freeze
STRATEGY_USERWITHID
=
'userWithId'
# Order key names alphabetically
# Order key names alphabetically
STRATEGIES
=
{
STRATEGIES
=
{
STRATEGY_DEFAULT
=>
[].
freeze
,
STRATEGY_DEFAULT
=>
[].
freeze
,
...
...
changelogs/unreleased/31343-remove-unneccessary-freeze.yml
0 → 100644
View file @
92db697a
---
title
:
Remove unnecessary use of .freeze
merge_request
:
50963
author
:
Adam Davies @adamd92
type
:
other
danger/roulette/Dangerfile
View file @
92db697a
...
@@ -38,8 +38,8 @@ Please consider creating a merge request to
...
@@ -38,8 +38,8 @@ Please consider creating a merge request to
for them.
for them.
MARKDOWN
MARKDOWN
OPTIONAL_REVIEW_TEMPLATE
=
"%{role} review is optional for %{category}"
.
freeze
OPTIONAL_REVIEW_TEMPLATE
=
'%{role} review is optional for %{category}'
NOT_AVAILABLE_TEMPLATE
=
'No %{role} available'
.
freeze
NOT_AVAILABLE_TEMPLATE
=
'No %{role} available'
def
note_for_spins_role
(
spins
,
role
)
def
note_for_spins_role
(
spins
,
role
)
spins
.
each
do
|
spin
|
spins
.
each
do
|
spin
|
...
...
db/migrate/20190108192941_remove_partial_index_from_ci_builds_artifacts_file.rb
View file @
92db697a
...
@@ -4,7 +4,7 @@ class RemovePartialIndexFromCiBuildsArtifactsFile < ActiveRecord::Migration[5.0]
...
@@ -4,7 +4,7 @@ class RemovePartialIndexFromCiBuildsArtifactsFile < ActiveRecord::Migration[5.0]
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
DOWNTIME
=
false
INDEX_NAME
=
'partial_index_ci_builds_on_id_with_legacy_artifacts'
.
freeze
INDEX_NAME
=
'partial_index_ci_builds_on_id_with_legacy_artifacts'
disable_ddl_transaction!
disable_ddl_transaction!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment