Class: PrelandsRails::RecompileSimpleSource::DownloadZip
- Inherits:
-
Object
- Object
- PrelandsRails::RecompileSimpleSource::DownloadZip
- Includes:
- Interactor, Interactor::Contracts, AbstractInteractor, Base
- Defined in:
- lib/prelands_rails/recompile_simple_source/download_zip.rb
Overview
Скачает и разместит в cache-директории zip-архив с исходником лендинга.
Instance Method Summary collapse
Methods included from AbstractInteractor
Instance Method Details
#act ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/prelands_rails/recompile_simple_source/download_zip.rb', line 23 def act archive_url = prelanding.preland_simple_source.archive.url destination = make_tmp_path IO.copy_stream(Kernel.open(archive_url), destination) context.archive = ActionDispatch::Http::UploadedFile.new(tempfile: destination) context.tmp_dest = destination end |