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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
0be3ada9
Commit
0be3ada9
authored
May 25, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix static analysis
parent
d8fa256f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
config/initializers/carrierwave_monkey_patch.rb
config/initializers/carrierwave_monkey_patch.rb
+5
-5
No files found.
config/initializers/carrierwave_monkey_patch.rb
View file @
0be3ada9
...
@@ -20,16 +20,16 @@ module CarrierWave
...
@@ -20,16 +20,16 @@ module CarrierWave
end
end
def
store
(
new_file
)
def
store
(
new_file
)
if
new_file
.
is_a?
(
self
.
class
)
if
new_file
.
is_a?
(
self
.
class
)
# rubocop:disable Gitlab/LineBreakAroundConditionalBlock
new_file
.
copy_to
(
path
)
new_file
.
copy_to
(
path
)
else
else
fog_file
=
new_file
.
to_file
fog_file
=
new_file
.
to_file
@content_type
||=
new_file
.
content_type
@content_type
||=
new_file
.
content_type
@file
=
directory
.
files
.
create
({
@file
=
directory
.
files
.
create
({
:body
=>
fog_file
?
fog_file
:
new_file
.
read
,
:body
=>
fog_file
?
fog_file
:
new_file
.
read
,
# rubocop:disable Gitlab/HashSyntax
:content_type
=>
@content_type
,
:content_type
=>
@content_type
,
# rubocop:disable Gitlab/HashSyntax
:key
=>
path
,
:key
=>
path
,
# rubocop:disable Gitlab/HashSyntax
:public
=>
@uploader
.
fog_public
:public
=>
@uploader
.
fog_public
# rubocop:disable Gitlab/HashSyntax
}.
merge
(
@uploader
.
fog_attributes
))
}.
merge
(
@uploader
.
fog_attributes
))
fog_file
.
close
if
fog_file
&&
!
fog_file
.
closed?
fog_file
.
close
if
fog_file
&&
!
fog_file
.
closed?
end
end
...
...
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