Fix Performance/RedundantMerge cop (#24817)
This commit is contained in:
@ -68,11 +68,7 @@ if ENV['S3_ENABLED'] == 'true'
|
||||
}
|
||||
)
|
||||
|
||||
if ENV['S3_PERMISSION'] == ''
|
||||
Paperclip::Attachment.default_options.merge!(
|
||||
s3_permissions: ->(*) { nil }
|
||||
)
|
||||
end
|
||||
Paperclip::Attachment.default_options[:s3_permissions] = ->(*) { nil } if ENV['S3_PERMISSION'] == ''
|
||||
|
||||
if ENV.has_key?('S3_ENDPOINT')
|
||||
Paperclip::Attachment.default_options[:s3_options].merge!(
|
||||
@ -90,11 +86,7 @@ if ENV['S3_ENABLED'] == 'true'
|
||||
)
|
||||
end
|
||||
|
||||
if ENV.has_key?('S3_STORAGE_CLASS')
|
||||
Paperclip::Attachment.default_options[:s3_headers].merge!(
|
||||
'X-Amz-Storage-Class' => ENV['S3_STORAGE_CLASS']
|
||||
)
|
||||
end
|
||||
Paperclip::Attachment.default_options[:s3_headers]['X-Amz-Storage-Class'] = ENV['S3_STORAGE_CLASS'] if ENV.has_key?('S3_STORAGE_CLASS')
|
||||
|
||||
# Some S3-compatible providers might not actually be compatible with some APIs
|
||||
# used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822
|
||||
|
Reference in New Issue
Block a user