Class: BulkImports::ArchiveExtractionService
- Inherits:
-
Object
- Object
- BulkImports::ArchiveExtractionService
- Includes:
- Gitlab::ImportExport::CommandLineUtil
- Defined in:
- app/services/bulk_imports/archive_extraction_service.rb
Constant Summary
Constants included from Gitlab::ImportExport::CommandLineUtil
Gitlab::ImportExport::CommandLineUtil::CLEAN_DIR_IGNORE_FILE_NAMES, Gitlab::ImportExport::CommandLineUtil::CommandLineUtilError, Gitlab::ImportExport::CommandLineUtil::DEFAULT_DIR_MODE, Gitlab::ImportExport::CommandLineUtil::FileOversizedError, Gitlab::ImportExport::CommandLineUtil::HardLinkError, Gitlab::ImportExport::CommandLineUtil::UNTAR_MASK
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(tmpdir:, filename:) ⇒ ArchiveExtractionService
constructor
A new instance of ArchiveExtractionService.
Methods included from Gitlab::ImportExport::CommandLineUtil
#gunzip, #gzip, #gzip_with_options, #mkdir_p, #tar_cf, #tar_czf, #untar_xf, #untar_zxf
Constructor Details
#initialize(tmpdir:, filename:) ⇒ ArchiveExtractionService
Returns a new instance of ArchiveExtractionService.
24 25 26 27 28 |
# File 'app/services/bulk_imports/archive_extraction_service.rb', line 24 def initialize(tmpdir:, filename:) @tmpdir = tmpdir @filename = filename @filepath = File.join(@tmpdir, @filename) end |
Instance Method Details
#execute ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'app/services/bulk_imports/archive_extraction_service.rb', line 30 def execute validate_tmpdir validate_filepath validate_symlink extract_archive tmpdir end |