diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-07-09 18:13:34 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-07-09 18:13:34 +0200 |
commit | 737666a3d121b1bf89861de4445f857256a47949 (patch) | |
tree | dae905ec23c56a1724a6df529091769f48b30dca /app/uploaders | |
parent | 5a9f23e780222218cc8418fd859669befcaed1b2 (diff) | |
download | gitlab-ce-737666a3d121b1bf89861de4445f857256a47949.tar.gz |
Fix specs
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/gitlab_uploader.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/uploaders/gitlab_uploader.rb b/app/uploaders/gitlab_uploader.rb index 7aa81a8c312..719bd6ef418 100644 --- a/app/uploaders/gitlab_uploader.rb +++ b/app/uploaders/gitlab_uploader.rb @@ -76,11 +76,12 @@ class GitlabUploader < CarrierWave::Uploader::Base end def open - stream = if file_storage? - File.open(path, "rb") if path - else - ::Gitlab::HttpIO.new(url, cached_size) if url - end + stream = + if file_storage? + File.open(path, "rb") if path + else + ::Gitlab::HttpIO.new(url, cached_size) if url + end return unless stream return stream unless block_given? |