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
d5ee813e
Commit
d5ee813e
authored
Jul 04, 2018
by
gfyoung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable frozen string in apps/validators/*.rb
Partially addresses #47424.
parent
7c540395
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
36 additions
and
1 deletion
+36
-1
app/uploaders/attachment_uploader.rb
app/uploaders/attachment_uploader.rb
+2
-0
app/uploaders/avatar_uploader.rb
app/uploaders/avatar_uploader.rb
+2
-0
app/uploaders/favicon_uploader.rb
app/uploaders/favicon_uploader.rb
+2
-0
app/uploaders/file_mover.rb
app/uploaders/file_mover.rb
+2
-0
app/uploaders/file_uploader.rb
app/uploaders/file_uploader.rb
+3
-1
app/uploaders/gitlab_uploader.rb
app/uploaders/gitlab_uploader.rb
+2
-0
app/uploaders/job_artifact_uploader.rb
app/uploaders/job_artifact_uploader.rb
+2
-0
app/uploaders/legacy_artifact_uploader.rb
app/uploaders/legacy_artifact_uploader.rb
+2
-0
app/uploaders/lfs_object_uploader.rb
app/uploaders/lfs_object_uploader.rb
+2
-0
app/uploaders/namespace_file_uploader.rb
app/uploaders/namespace_file_uploader.rb
+2
-0
app/uploaders/object_storage.rb
app/uploaders/object_storage.rb
+2
-0
app/uploaders/personal_file_uploader.rb
app/uploaders/personal_file_uploader.rb
+2
-0
app/uploaders/records_uploads.rb
app/uploaders/records_uploads.rb
+2
-0
app/uploaders/uploader_helper.rb
app/uploaders/uploader_helper.rb
+2
-0
app/uploaders/workhorse.rb
app/uploaders/workhorse.rb
+2
-0
changelogs/unreleased/frozen-string-enable-app-uploaders.yml
changelogs/unreleased/frozen-string-enable-app-uploaders.yml
+5
-0
No files found.
app/uploaders/attachment_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
AttachmentUploader
<
GitlabUploader
include
RecordsUploads
::
Concern
include
ObjectStorage
::
Concern
...
...
app/uploaders/avatar_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
AvatarUploader
<
GitlabUploader
include
UploaderHelper
include
RecordsUploads
::
Concern
...
...
app/uploaders/favicon_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
FaviconUploader
<
AttachmentUploader
EXTENSION_WHITELIST
=
%w[png ico]
.
freeze
...
...
app/uploaders/file_mover.rb
View file @
d5ee813e
# frozen_string_literal: true
class
FileMover
attr_reader
:secret
,
:file_name
,
:model
,
:update_field
...
...
app/uploaders/file_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
# This class breaks the actual CarrierWave concept.
# Every uploader should use a base_dir that is model agnostic so we can build
# back URLs from base_dir-relative paths saved in the `Upload` model.
...
...
@@ -117,7 +119,7 @@ class FileUploader < GitlabUploader
end
def
markdown_link
markdown
=
"[
#{
markdown_name
}
](
#{
secure_url
}
)"
markdown
=
+
"[
#{
markdown_name
}
](
#{
secure_url
}
)"
markdown
.
prepend
(
"!"
)
if
image_or_video?
||
dangerous?
markdown
end
...
...
app/uploaders/gitlab_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
GitlabUploader
<
CarrierWave
::
Uploader
::
Base
class_attribute
:options
...
...
app/uploaders/job_artifact_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
JobArtifactUploader
<
GitlabUploader
extend
Workhorse
::
UploadPath
include
ObjectStorage
::
Concern
...
...
app/uploaders/legacy_artifact_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
LegacyArtifactUploader
<
GitlabUploader
extend
Workhorse
::
UploadPath
include
ObjectStorage
::
Concern
...
...
app/uploaders/lfs_object_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
LfsObjectUploader
<
GitlabUploader
extend
Workhorse
::
UploadPath
include
ObjectStorage
::
Concern
...
...
app/uploaders/namespace_file_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
NamespaceFileUploader
<
FileUploader
# Re-Override
def
self
.
root
...
...
app/uploaders/object_storage.rb
View file @
d5ee813e
# frozen_string_literal: true
require
'fog/aws'
require
'carrierwave/storage/fog'
...
...
app/uploaders/personal_file_uploader.rb
View file @
d5ee813e
# frozen_string_literal: true
class
PersonalFileUploader
<
FileUploader
# Re-Override
def
self
.
root
...
...
app/uploaders/records_uploads.rb
View file @
d5ee813e
# frozen_string_literal: true
module
RecordsUploads
module
Concern
extend
ActiveSupport
::
Concern
...
...
app/uploaders/uploader_helper.rb
View file @
d5ee813e
# frozen_string_literal: true
# Extra methods for uploader
module
UploaderHelper
IMAGE_EXT
=
%w[png jpg jpeg gif bmp tiff ico]
.
freeze
...
...
app/uploaders/workhorse.rb
View file @
d5ee813e
# frozen_string_literal: true
module
Workhorse
module
UploadPath
def
workhorse_upload_path
...
...
changelogs/unreleased/frozen-string-enable-app-uploaders.yml
0 → 100644
View file @
d5ee813e
---
title
:
Enable frozen string in apps/validators/*.rb
merge_request
:
20382
author
:
gfyoung
type
:
other
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