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-5192: Convert embeds to https where appropriate #3097

Merged
merged 1 commit into from Oct 4, 2017

Conversation

Projects
None yet
3 participants
Owner

elzj commented Oct 4, 2017

Issue

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

Purpose

Adds code to upgrade embeds to https where supported and a rake task to update current chapters.

Testing

See issue.

@@ -120,6 +120,21 @@ module Transformers
return if source.nil?
allow_flashvars = ["ning", "vidders.net", "google", "criticalcommons", "archiveofourown", "podfic", "spotify", "8tracks", "soundcloud"]
+ supports_https = [
@houndci-bot

houndci-bot Oct 4, 2017

Use %w or %W for an array of words.

+ desc "Enforce HTTPS where available for embedded media"
+ task(enforce_https: :environment) do
+ Chapter.find_each do |chapter|
+ if chapter.content.match /<(embed|iframe)/
@houndci-bot

houndci-bot Oct 4, 2017

Use =~ in places where the MatchData returned by #match will not be used.

@sarken sarken merged commit 27d1d4f into otwcode:master Oct 4, 2017

4 checks passed

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