src/supermarket/engines/fieri/app/models/cookbook_artifact.rb
#
# Downloads an artifact from a url and writes it to the filesystem.
#
# @return [Tempfile] the artifact
#
Downloads an artifact from a url and writes it to the filesystem.
Downloads an artifact from a url and writes it to the filesystem .
def download
    File.open(Tempfile.new("archive"), "wb") do |saved_file|
      URI.open(url, "rb") do |read_file|
        saved_file.write(read_file.read)
      end
      saved_file
    end
  end
def download File . open ( Tempfile . new ( "archive" ) , "wb" ) do | saved_file | URI . open ( url , "rb" ) do | read_file | saved_file . write ( read_file . read ) end saved_file end end
Downloads an artifact from a url and writes it to the filesystem.
Downloads an artifact from a url and writes it to the filesystem .
None
Tempfile