Sha256: 349cddc401be8619f97cca45c71b4ff7149ba63e5db1200ef84ca2e1beaa3e18
Contents?: true
Size: 417 Bytes
Versions: 29
Compression:
Stored size: 417 Bytes
Contents
# frozen_string_literal: true require 'ruby-progressbar' module Hyrax module ControlledVocabulary module Importer class Downloader def self.fetch(url, output) open(url) do |io| IO.copy_stream(io, output) end rescue OpenURI::HTTPError => e raise "Unable to download from #{url}\n#{e.message}: #{e.io.read}" end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems