Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

AO3-5188 Remove the dependency on the shared storage for downloads. #3087

Merged
merged 3 commits into from Oct 1, 2017

Conversation

Projects
None yet
4 participants
Contributor

zz9pzza commented Sep 29, 2017

Issue

https://otwarchive.atlassian.net/browse/AO3-5188

Purpose

Remove the dependancy on the shared storage.

Testing

Do downloads work ?

zz9pzza added some commits Sep 28, 2017

app/controllers/downloads_controller.rb
- html = render_to_string(template: "downloads/show.html", layout: 'barebones.html')
-
+ def create_work_html
+ return if File.exists?("#{@work.download_basename}.html")
@houndci-bot

houndci-bot Sep 29, 2017

File.exists? is deprecated in favor of File.exist?.

app/controllers/downloads_controller.rb
# write to file
- File.open("#{@work.download_basename}.html", 'w') {|f| f.write(html)}
+ File.open("#{@work.download_basename}.html", 'w') {|f| f.write(create_work_html_string)}
@houndci-bot

houndci-bot Sep 29, 2017

Space between { and | missing.
Space missing inside }.

@@ -838,7 +838,7 @@ def remove_outdated_downloads
# spread downloads out by first two letters of authorname
def download_dir
- "#{Rails.public_path}/#{self.download_folder}"
+ "/tmp/#{self.id}"
@houndci-bot

houndci-bot Sep 29, 2017

Redundant self detected.

@ariana-paris ariana-paris changed the title from AO3-5188 Remove the dependancy on the shared storage for downloads. to AO3-5188 Remove the dependency on the shared storage for downloads. Sep 29, 2017

@elzj elzj merged commit 71b0560 into otwcode:master Oct 1, 2017

3 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound 1 violation found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment