Sha256: 081a36754dc786f7786b8c0a5ad027673a7fba893688929944011b4301ff0103

Contents?: true

Size: 387 Bytes

Versions: 58

Compression:

Stored size: 387 Bytes

Contents

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

58 entries across 58 versions & 2 rubygems

Version Path
hyrax-2.9.6 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.9.5 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.9.4 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.9.3 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.9.2 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.9.1 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.9.0 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.8.0 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.7.2 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.7.1 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.7.0 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.6.0 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-3.0.0.pre.rc1 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-3.0.0.pre.beta3 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.5.1 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.5.0 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-3.0.0.pre.beta2 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.4.1 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-3.0.0.pre.beta1 lib/hyrax/controlled_vocabulary/importer/downloader.rb
hyrax-2.4.0 lib/hyrax/controlled_vocabulary/importer/downloader.rb