samvera-labs / active_encode

Declare encode job classes that can be run by a variety of encoding services
Other
6 stars 8 forks source link

remove URI.decode from codebase #93

Closed jrochkind closed 2 years ago

jrochkind commented 2 years ago

Supporting ruby 3.0 means eliminating instances of URI.decode.

I see addressable is already a dependency, so there are some substitutions available there.

But I'm confused by the main current usage:

https://github.com/samvera-labs/active_encode/blob/10be406ce9b0c7a439104ded81c91fad5682ba1d/lib/file_locator.rb#L11-L15

Once you've parsed a URI with Addresable, and taken out the host part -- why would you possibly ever need to URI decode the hostname? Decode it? What?

Or the path.

I feel like possibly these decodes can simply be removed. Does anyone have any insight?

The code is so old it's hard to identify where it came from. It shows up in that location in commit 235522850e from @phuongdh, but with the commit message "Merge some code from Avalon6 ElasticTranscoderJob", so we'd maybe have to go back to some historical Avalon commit logs to figure out who wrote this originally.

cjcolvar commented 2 years ago

Closed by #96