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
16a6cd9d
Commit
16a6cd9d
authored
Mar 21, 2021
by
Lee Tickett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary use of freeze
parent
75891f66
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
41 additions
and
36 deletions
+41
-36
changelogs/unreleased/31343-remove-unnecessary-use-of-freeze3.yml
...gs/unreleased/31343-remove-unnecessary-use-of-freeze3.yml
+5
-0
ee/lib/gitlab/geo/database_tasks.rb
ee/lib/gitlab/geo/database_tasks.rb
+3
-3
ee/lib/gitlab/geo/event_gap_tracking.rb
ee/lib/gitlab/geo/event_gap_tracking.rb
+1
-1
ee/lib/gitlab/geo/git_ssh_proxy.rb
ee/lib/gitlab/geo/git_ssh_proxy.rb
+4
-4
ee/lib/gitlab/geo/log_cursor/daemon.rb
ee/lib/gitlab/geo/log_cursor/daemon.rb
+1
-1
ee/lib/gitlab/geo/log_cursor/lease.rb
ee/lib/gitlab/geo/log_cursor/lease.rb
+2
-2
ee/lib/gitlab/geo/replication.rb
ee/lib/gitlab/geo/replication.rb
+1
-1
ee/lib/gitlab/sitemaps/generator.rb
ee/lib/gitlab/sitemaps/generator.rb
+1
-1
ee/lib/gitlab/spdx/catalogue_gateway.rb
ee/lib/gitlab/spdx/catalogue_gateway.rb
+1
-1
ee/lib/system_check/geo/authorized_keys_check.rb
ee/lib/system_check/geo/authorized_keys_check.rb
+2
-2
ee/lib/system_check/geo/geo_database_configured_check.rb
ee/lib/system_check/geo/geo_database_configured_check.rb
+6
-6
ee/lib/system_check/geo/http_connection_check.rb
ee/lib/system_check/geo/http_connection_check.rb
+2
-2
lib/api/internal/base.rb
lib/api/internal/base.rb
+1
-1
lib/api/v3/github.rb
lib/api/v3/github.rb
+1
-1
lib/bulk_imports/clients/http.rb
lib/bulk_imports/clients/http.rb
+1
-1
lib/csv_builder.rb
lib/csv_builder.rb
+1
-1
lib/gitlab/auth/auth_finders.rb
lib/gitlab/auth/auth_finders.rb
+2
-2
lib/gitlab/conan_token.rb
lib/gitlab/conan_token.rb
+1
-1
lib/gitlab/health_checks/gitaly_check.rb
lib/gitlab/health_checks/gitaly_check.rb
+1
-1
lib/gitlab/pages.rb
lib/gitlab/pages.rb
+1
-1
lib/learn_gitlab.rb
lib/learn_gitlab.rb
+3
-3
No files found.
changelogs/unreleased/31343-remove-unnecessary-use-of-freeze3.yml
0 → 100644
View file @
16a6cd9d
---
title
:
Remove unnecessary use of freeze
merge_request
:
57058
author
:
Lee Tickett @leetickett
type
:
other
ee/lib/gitlab/geo/database_tasks.rb
View file @
16a6cd9d
...
...
@@ -5,9 +5,9 @@ module Gitlab
module
DatabaseTasks
extend
self
DATABASE_CONFIG
=
'config/database.yml'
.
freeze
GEO_DATABASE_CONFIG
=
'config/database_geo.yml'
.
freeze
GEO_DB_DIR
=
'ee/db/geo'
.
freeze
DATABASE_CONFIG
=
'config/database.yml'
GEO_DATABASE_CONFIG
=
'config/database_geo.yml'
GEO_DB_DIR
=
'ee/db/geo'
def
method_missing
(
method_name
,
*
args
,
&
block
)
with_geo_db
do
...
...
ee/lib/gitlab/geo/event_gap_tracking.rb
View file @
16a6cd9d
...
...
@@ -8,7 +8,7 @@ module Gitlab
attr_accessor
:previous_id
GEO_EVENT_LOG_GAPS
=
'geo:event_log:gaps'
.
freeze
GEO_EVENT_LOG_GAPS
=
'geo:event_log:gaps'
GAP_GRACE_PERIOD
=
10
.
minutes
GAP_OUTDATED_PERIOD
=
1
.
hour
...
...
ee/lib/gitlab/geo/git_ssh_proxy.rb
View file @
16a6cd9d
...
...
@@ -5,11 +5,11 @@ module Gitlab
class
GitSSHProxy
HTTP_READ_TIMEOUT
=
60
UPLOAD_PACK_REQUEST_CONTENT_TYPE
=
'application/x-git-upload-pack-request'
.
freeze
UPLOAD_PACK_RESULT_CONTENT_TYPE
=
'application/x-git-upload-pack-result'
.
freeze
UPLOAD_PACK_REQUEST_CONTENT_TYPE
=
'application/x-git-upload-pack-request'
UPLOAD_PACK_RESULT_CONTENT_TYPE
=
'application/x-git-upload-pack-result'
RECEIVE_PACK_REQUEST_CONTENT_TYPE
=
'application/x-git-receive-pack-request'
.
freeze
RECEIVE_PACK_RESULT_CONTENT_TYPE
=
'application/x-git-receive-pack-result'
.
freeze
RECEIVE_PACK_REQUEST_CONTENT_TYPE
=
'application/x-git-receive-pack-request'
RECEIVE_PACK_RESULT_CONTENT_TYPE
=
'application/x-git-receive-pack-result'
MustBeASecondaryNode
=
Class
.
new
(
StandardError
)
...
...
ee/lib/gitlab/geo/log_cursor/daemon.rb
View file @
16a6cd9d
...
...
@@ -4,7 +4,7 @@ module Gitlab
module
Geo
module
LogCursor
class
Daemon
VERSION
=
'0.2.0'
.
freeze
VERSION
=
'0.2.0'
BATCH_SIZE
=
250
SECONDARY_CHECK_INTERVAL
=
60
MAX_ERROR_DURATION
=
1800
...
...
ee/lib/gitlab/geo/log_cursor/lease.rb
View file @
16a6cd9d
...
...
@@ -4,9 +4,9 @@ module Gitlab
module
Geo
module
LogCursor
module
Lease
NAMESPACE
=
'geo:gitlab'
.
freeze
NAMESPACE
=
'geo:gitlab'
LEASE_TIMEOUT
=
30
.
seconds
.
freeze
LEASE_KEY
=
'geo_log_cursor_processed'
.
freeze
LEASE_KEY
=
'geo_log_cursor_processed'
def
self
.
exclusive_lease
@lease
||=
Gitlab
::
ExclusiveLease
.
new
(
LEASE_KEY
,
timeout:
LEASE_TIMEOUT
)
...
...
ee/lib/gitlab/geo/replication.rb
View file @
16a6cd9d
...
...
@@ -4,7 +4,7 @@ module Gitlab
module
Geo
module
Replication
USER_UPLOADS_OBJECT_TYPES
=
%i[attachment avatar file import_export namespace_file personal_file favicon design_management/design_v432x230]
.
freeze
FILE_NOT_FOUND_GEO_CODE
=
'FILE_NOT_FOUND'
.
freeze
FILE_NOT_FOUND_GEO_CODE
=
'FILE_NOT_FOUND'
def
self
.
object_type_from_user_uploads?
(
object_type
)
USER_UPLOADS_OBJECT_TYPES
.
include?
(
object_type
.
to_sym
)
...
...
ee/lib/gitlab/sitemaps/generator.rb
View file @
16a6cd9d
...
...
@@ -6,7 +6,7 @@ module Gitlab
class
<<
self
include
Gitlab
::
Routing
GITLAB_ORG_NAMESPACE
=
'gitlab-org'
.
freeze
GITLAB_ORG_NAMESPACE
=
'gitlab-org'
def
execute
unless
Gitlab
.
com?
...
...
ee/lib/gitlab/spdx/catalogue_gateway.rb
View file @
16a6cd9d
...
...
@@ -3,7 +3,7 @@
module
Gitlab
module
SPDX
class
CatalogueGateway
URL
=
'https://spdx.org/licenses/licenses.json'
.
freeze
URL
=
'https://spdx.org/licenses/licenses.json'
OFFLINE_CATALOGUE
=
Rails
.
root
.
join
(
'vendor/spdx.json'
).
freeze
def
fetch
...
...
ee/lib/system_check/geo/authorized_keys_check.rb
View file @
16a6cd9d
...
...
@@ -5,7 +5,7 @@ module SystemCheck
class
AuthorizedKeysCheck
<
::
SystemCheck
::
BaseCheck
set_name
'OpenSSH configured to use AuthorizedKeysCommand'
AUTHORIZED_KEYS_DOCS
=
'doc/administration/operations/fast_ssh_key_lookup.md'
.
freeze
AUTHORIZED_KEYS_DOCS
=
'doc/administration/operations/fast_ssh_key_lookup.md'
OPENSSH_AUTHORIZED_KEYS_CMD_REGEXP
=
%r{
^AuthorizedKeysCommand # line starts with
\s
+ # one space or more
...
...
@@ -24,7 +24,7 @@ module SystemCheck
\s
* # optional any amount of space character
(?:
\#
.*)?$ # optional start-comment symbol followed by optionally any character until end of line
}x
.
freeze
OPENSSH_EXPECTED_COMMAND
=
'/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check git %u %k'
.
freeze
OPENSSH_EXPECTED_COMMAND
=
'/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check git %u %k'
def
multi_check
unless
openssh_config_exists?
...
...
ee/lib/system_check/geo/geo_database_configured_check.rb
View file @
16a6cd9d
...
...
@@ -6,12 +6,12 @@ module SystemCheck
set_name
'GitLab Geo secondary database is correctly configured'
set_skip_reason
'not a secondary node'
DATABASE_DOCS
=
'doc/gitlab-geo/database.md'
.
freeze
TROUBLESHOOTING_DOCS
=
'doc/gitlab-geo/troubleshooting.md'
.
freeze
WRONG_CONFIGURATION_MESSAGE
=
'Check if you enabled the `geo_secondary_role` or `geo_postgresql` in the gitlab.rb config file.'
.
freeze
UNHEALTHY_CONNECTION_MESSAGE
=
'Check the tracking database configuration as the connection could not be established'
.
freeze
NO_TABLES_MESSAGE
=
'Run the tracking database migrations: gitlab-rake geo:db:migrate'
.
freeze
REUSING_EXISTING_DATABASE_MESSAGE
=
'If you are reusing an existing tracking database, make sure you have reset it.'
.
freeze
DATABASE_DOCS
=
'doc/gitlab-geo/database.md'
TROUBLESHOOTING_DOCS
=
'doc/gitlab-geo/troubleshooting.md'
WRONG_CONFIGURATION_MESSAGE
=
'Check if you enabled the `geo_secondary_role` or `geo_postgresql` in the gitlab.rb config file.'
UNHEALTHY_CONNECTION_MESSAGE
=
'Check the tracking database configuration as the connection could not be established'
NO_TABLES_MESSAGE
=
'Run the tracking database migrations: gitlab-rake geo:db:migrate'
REUSING_EXISTING_DATABASE_MESSAGE
=
'If you are reusing an existing tracking database, make sure you have reset it.'
def
skip?
!
Gitlab
::
Geo
.
secondary?
...
...
ee/lib/system_check/geo/http_connection_check.rb
View file @
16a6cd9d
...
...
@@ -5,8 +5,8 @@ module SystemCheck
class
HttpConnectionCheck
<
SystemCheck
::
BaseCheck
set_name
'GitLab Geo HTTP(S) connectivity'
NOT_SECONDARY_NODE
=
'not a secondary node'
.
freeze
GEO_NOT_ENABLED
=
'Geo is not enabled'
.
freeze
NOT_SECONDARY_NODE
=
'not a secondary node'
GEO_NOT_ENABLED
=
'Geo is not enabled'
def
skip?
unless
Gitlab
::
Geo
.
enabled?
...
...
lib/api/internal/base.rb
View file @
16a6cd9d
...
...
@@ -23,7 +23,7 @@ module API
helpers
::
API
::
Helpers
::
InternalHelpers
UNKNOWN_CHECK_RESULT_ERROR
=
'Unknown check result'
.
freeze
UNKNOWN_CHECK_RESULT_ERROR
=
'Unknown check result'
VALID_PAT_SCOPES
=
Set
.
new
(
Gitlab
::
Auth
::
API_SCOPES
+
Gitlab
::
Auth
::
REPOSITORY_SCOPES
+
Gitlab
::
Auth
::
REGISTRY_SCOPES
...
...
lib/api/v3/github.rb
View file @
16a6cd9d
...
...
@@ -18,7 +18,7 @@ module API
# Used to differentiate Jira Cloud requests from Jira Server requests
# Jira Cloud user agent format: Jira DVCS Connector Vertigo/version
# Jira Server user agent format: Jira DVCS Connector/version
JIRA_DVCS_CLOUD_USER_AGENT
=
'Jira DVCS Connector Vertigo'
.
freeze
JIRA_DVCS_CLOUD_USER_AGENT
=
'Jira DVCS Connector Vertigo'
include
PaginationParams
...
...
lib/bulk_imports/clients/http.rb
View file @
16a6cd9d
...
...
@@ -3,7 +3,7 @@
module
BulkImports
module
Clients
class
Http
API_VERSION
=
'v4'
.
freeze
API_VERSION
=
'v4'
DEFAULT_PAGE
=
1
.
freeze
DEFAULT_PER_PAGE
=
30
.
freeze
...
...
lib/csv_builder.rb
View file @
16a6cd9d
...
...
@@ -14,7 +14,7 @@
# CsvBuilder.new(@posts, columns).render
#
class
CsvBuilder
DEFAULT_ORDER_BY
=
'id'
.
freeze
DEFAULT_ORDER_BY
=
'id'
DEFAULT_BATCH_SIZE
=
1000
PREFIX_REGEX
=
/^[=\+\-@;]/
.
freeze
...
...
lib/gitlab/auth/auth_finders.rb
View file @
16a6cd9d
...
...
@@ -24,9 +24,9 @@ module Gitlab
PRIVATE_TOKEN_HEADER
=
'HTTP_PRIVATE_TOKEN'
PRIVATE_TOKEN_PARAM
=
:private_token
JOB_TOKEN_HEADER
=
'HTTP_JOB_TOKEN'
.
freeze
JOB_TOKEN_HEADER
=
'HTTP_JOB_TOKEN'
JOB_TOKEN_PARAM
=
:job_token
DEPLOY_TOKEN_HEADER
=
'HTTP_DEPLOY_TOKEN'
.
freeze
DEPLOY_TOKEN_HEADER
=
'HTTP_DEPLOY_TOKEN'
RUNNER_TOKEN_PARAM
=
:token
RUNNER_JOB_TOKEN_PARAM
=
:token
...
...
lib/gitlab/conan_token.rb
View file @
16a6cd9d
...
...
@@ -7,7 +7,7 @@
module
Gitlab
class
ConanToken
HMAC_KEY
=
'gitlab-conan-packages'
.
freeze
HMAC_KEY
=
'gitlab-conan-packages'
attr_reader
:access_token_id
,
:user_id
...
...
lib/gitlab/health_checks/gitaly_check.rb
View file @
16a6cd9d
...
...
@@ -5,7 +5,7 @@ module Gitlab
class
GitalyCheck
extend
BaseAbstractCheck
METRIC_PREFIX
=
'gitaly_health_check'
.
freeze
METRIC_PREFIX
=
'gitaly_health_check'
class
<<
self
def
readiness
...
...
lib/gitlab/pages.rb
View file @
16a6cd9d
...
...
@@ -3,7 +3,7 @@
module
Gitlab
module
Pages
VERSION
=
File
.
read
(
Rails
.
root
.
join
(
"GITLAB_PAGES_VERSION"
)).
strip
.
freeze
INTERNAL_API_REQUEST_HEADER
=
'Gitlab-Pages-Api-Request'
.
freeze
INTERNAL_API_REQUEST_HEADER
=
'Gitlab-Pages-Api-Request'
MAX_SIZE
=
1
.
terabyte
include
JwtAuthenticatable
...
...
lib/learn_gitlab.rb
View file @
16a6cd9d
# frozen_string_literal: true
class
LearnGitlab
PROJECT_NAME
=
'Learn GitLab'
.
freeze
BOARD_NAME
=
'GitLab onboarding'
.
freeze
LABEL_NAME
=
'Novice'
.
freeze
PROJECT_NAME
=
'Learn GitLab'
BOARD_NAME
=
'GitLab onboarding'
LABEL_NAME
=
'Novice'
def
initialize
(
current_user
)
@current_user
=
current_user
...
...
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