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>2018-09-07 14:42:49 +0300
committerJames Lopez <james@jameslopez.es>2018-09-07 14:42:49 +0300
commit27442862cf81881c81552e64d0b4d3354535c45e (patch)
treea05e89cdad1f455971748b74f4092ca3992de8b8 /lib/gitlab/import_export
parenta2aa505805478540b3150b2f9093c8658e18597d (diff)
refactor code based on feedback
Diffstat (limited to 'lib/gitlab/import_export')
-rw-r--r--lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb2
-rw-r--r--lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb4
-rw-r--r--lib/gitlab/import_export/saver.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb
index 83134bb0769..21624cad43a 100644
--- a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb
+++ b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb
@@ -84,7 +84,7 @@ module Gitlab
end
def object_storage?
- project.export_project_object_exists?
+ project.export_project_exists?
end
end
end
diff --git a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb
index 064092681f8..01c1bca7ec9 100644
--- a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb
+++ b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb
@@ -44,7 +44,7 @@ module Gitlab
end
def export_file
- project.import_export_upload.export_file.open
+ project.export_file.open
end
def send_file_options
@@ -59,7 +59,7 @@ module Gitlab
end
def export_size
- project.import_export_upload.export_file.file.size
+ project.export_file.file.size
end
end
end
diff --git a/lib/gitlab/import_export/saver.rb b/lib/gitlab/import_export/saver.rb
index a66f32f91d2..59a74083395 100644
--- a/lib/gitlab/import_export/saver.rb
+++ b/lib/gitlab/import_export/saver.rb
@@ -18,7 +18,7 @@ module Gitlab
Rails.logger.info("Saved project export #{archive_file}")
- save_on_object_storage
+ save_upload
else
@shared.error(Gitlab::ImportExport::Error.new(error_message))
false
@@ -49,7 +49,7 @@ module Gitlab
@archive_file ||= File.join(@shared.archive_path, Gitlab::ImportExport.export_filename(project: @project))
end
- def save_on_object_storage
+ def save_upload
upload = ImportExportUpload.find_or_initialize_by(project: @project)
File.open(archive_file) { |file| upload.export_file = file }