Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-04-15 19:14:28 +0300
committerJames Lopez <james@jameslopez.es>2016-04-15 19:14:28 +0300
commitae777ea0618e8db8a552a831dc331fe7a7b1fe7a (patch)
tree0e28d0fac0db940e7fca23518e1764cb34e44f3e /lib/gitlab/import_export/importer.rb
parent97c3aff16fa94cee622cd00ffaa2e3a6469c1439 (diff)
WIP - importing file and repo
Diffstat (limited to 'lib/gitlab/import_export/importer.rb')
-rw-r--r--lib/gitlab/import_export/importer.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/gitlab/import_export/importer.rb b/lib/gitlab/import_export/importer.rb
new file mode 100644
index 00000000000..79f54000bb0
--- /dev/null
+++ b/lib/gitlab/import_export/importer.rb
@@ -0,0 +1,26 @@
+module Gitlab
+ module ImportExport
+ class Importer
+ include Gitlab::ImportExport::CommandLineUtil
+
+ def self.import(*args)
+ new(*args).import
+ end
+
+ def initialize(archive_file:, storage_path:)
+ @archive_file = archive_file
+ @storage_path = storage_path
+ end
+
+ def import
+ decompress_export
+ end
+
+ private
+
+ def decompress
+ untar_czf(archive: archive_file, dir: @storage_path)
+ end
+ end
+ end
+end