Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ActiveEncode and update FileLocator #5042

Merged
merged 4 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git"
gem "omniauth-saml", "~> 2.0"

# Media Access & Transcoding
gem 'active_encode', '~> 1.0'
gem 'active_encode', '~> 1.0', '>= 1.1.2'
gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform'
gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon'
gem 'fastimage'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ GEM
active_elastic_job (3.2.0)
aws-sdk-sqs (~> 1)
rails (>= 5.2.6, < 7.1)
active_encode (1.1.1)
active_encode (1.1.2)
addressable (~> 2.8)
rails
active_fedora-datastreams (0.4.0)
Expand Down Expand Up @@ -959,7 +959,7 @@ DEPENDENCIES
active-fedora (~> 13.2, >= 13.2.5)
active_annotations (~> 0.4)
active_elastic_job
active_encode (~> 1.0)
active_encode (~> 1.0, >= 1.1.2)
active_fedora-datastreams (~> 0.4)
activejob-traffic_control
activejob-uniqueness
Expand Down
8 changes: 4 additions & 4 deletions app/services/file_locator.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2011-2022, The Trustees of Indiana University and Northwestern
# University. Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
#
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
Expand All @@ -24,7 +24,7 @@ class S3File
def initialize(uri)
uri = Addressable::URI.parse(uri)
@bucket = Addressable::URI.unencode(uri.host)
@key = Addressable::URI.unencode(uri.path).sub(%r(^/*(.+)/*$),'\1')
@key = Addressable::URI.unencode(ActiveEncode.sanitize_uri(uri)).sub(%r(^/*(.+)/*$),'\1')
end

def object
Expand Down