diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-30 13:11:27 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-30 13:50:19 +0300 |
commit | b9f57192853d100c90b1d46491838a98d5ae4bae (patch) | |
tree | 009dca8ec0804874802c1eacd98711427482ab60 /lib/gitlab/gfm | |
parent | 99ee822857cf3fdf0a2ac91c0d13ea68c79e8ba8 (diff) |
Remove reduntant `move_to_store` override
Diffstat (limited to 'lib/gitlab/gfm')
-rw-r--r-- | lib/gitlab/gfm/uploads_rewriter.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/gitlab/gfm/uploads_rewriter.rb b/lib/gitlab/gfm/uploads_rewriter.rb index 2e61f799a03..abc8c8c55e6 100644 --- a/lib/gitlab/gfm/uploads_rewriter.rb +++ b/lib/gitlab/gfm/uploads_rewriter.rb @@ -17,11 +17,11 @@ module Gitlab def rewrite(target_project) return @text unless needs_rewrite? - new_uploader = file_uploader(target_project) @text.gsub(@pattern) do |markdown| file = find_file(@source_project, $~[:secret], $~[:file]) return markdown unless file.try(:exists?) + new_uploader = FileUploader.new(target_project) new_uploader.store!(file) new_uploader.to_markdown end @@ -42,16 +42,10 @@ module Gitlab private def find_file(project, secret, file) - uploader = file_uploader(project, secret) + uploader = FileUploader.new(project, secret) uploader.retrieve_from_store!(file) uploader.file end - - def file_uploader(project, secret = nil) - uploader = FileUploader.new(project, secret) - uploader.define_singleton_method(:move_to_store) { false } - uploader - end end end end |