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-5125 Map Open Doors temp site URLs to original site URLs #3016

Merged
merged 3 commits into from Oct 5, 2017

Conversation

Projects
None yet
4 participants
Owner

elzj commented Aug 30, 2017

Issue

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

Purpose

Adds a task to map Open Doors imports to their original urls via csv files

Testing

Will work with Ariana to test this - I believe you'll be able to see the updated import urls on the admin backend

elzj added some commits Aug 27, 2017

@@ -0,0 +1,19 @@
+namespace :opendoors do
@houndci-bot

houndci-bot Aug 30, 2017

Missing magic comment # frozen_string_literal: true.

@@ -0,0 +1,19 @@
+namespace :opendoors do
+ desc "Map import urls based on spreadsheet data"
+ task(:import_url_mapping => :environment) do
@houndci-bot

houndci-bot Aug 30, 2017

Use the new Ruby 1.9 hash syntax.

@ariana-paris

ariana-paris Sep 12, 2017

Contributor

Might as well while we're here

+ work.save!
+ end
+ rescue
+ puts "Could not update work from #{row["Original URL"]}"
@houndci-bot

houndci-bot Aug 30, 2017

Prefer single-quoted strings inside interpolations.

+ end
+ end
+ end
+end
@houndci-bot

houndci-bot Aug 30, 2017

Final newline missing.

@sarken sarken requested a review from ariana-paris Sep 12, 2017

This will come in handy for the outstanding archives we promised to do redirects for (though the general sentiment in OD is that maybe they'll stop making these rash promises to save us all some trouble)

@ariana-paris ariana-paris changed the title from AO3-5125: Opendoors mapping to AO3-5125 Map Open Doors temp site URLs to original site URLs Sep 12, 2017

@sarken sarken merged commit b446eb2 into otwcode:master Oct 5, 2017

4 checks passed

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