lib/io_streams/zip/reader.rb in iostreams-1.0.0.beta2 vs lib/io_streams/zip/reader.rb in iostreams-1.0.0.beta3
- old
+ new
@@ -35,10 +35,10 @@
else
# Read from a zip file or stream, decompressing the contents as it is read
# The input stream from the first file found in the zip file is passed
# to the supplied block
def self.file(file_name, entry_file_name: nil)
- Utils.load_dependency('rubyzip', 'Zip', 'zip') unless defined?(::Zip)
+ Utils.load_soft_dependency('rubyzip', 'Zip', 'zip') unless defined?(::Zip)
::Zip::InputStream.open(file_name) do |zin|
get_entry(zin, entry_file_name) ||
raise(::Zip::EntryNameError, "File #{entry_file_name} not found within zip file.")
yield(zin)