cbeer/fcrepo_wrapper

Kernel#open is deprecated.

scherztc opened this issue · 1 comments

Starting Fedora 4.7.6 on port 8984 ...
/Users/scherztc/.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/fcrepo_wrapper-0.9.0/lib/fcrepo_wrapper/downloader.rb:7: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open.

Proposed Solution:

require 'open-uri'

URI.open(url,
         content_length_proc: ->(bytes) { pbar.total = bytes },
         progress_proc: ->(bytes) { pbar.progress = bytes }) do |io|
  IO.copy_stream(io, output)
end

This is necessary to run the ActiveMQ secure version of Fedora.

I am also stillon Hyrax 2.x and therefore stuck with ruby 2.7.8

jcoyne commented

@scherztc just an FYI, this repo hasn't received a single commit in over 6 years. I'm pretty sure that none of the contributors are still involved or invested in this. I'd suggest you fork this repo and take over the maintenance for yourself.