summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-09-07 14:43:51 +0200
committerJames Lopez <james@jameslopez.es>2018-09-07 14:43:51 +0200
commitf1277fbf0bbe8de330d5d80fdfe411a0c8571022 (patch)
tree8aa895e931eba976ccfa29867625759eb8441c4c /lib/gitlab/import_export
parent27442862cf81881c81552e64d0b4d3354535c45e (diff)
downloadgitlab-ce-f1277fbf0bbe8de330d5d80fdfe411a0c8571022.tar.gz
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.rb6
-rw-r--r--lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb4
2 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 21624cad43a..7cbf653dd97 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
@@ -53,7 +53,7 @@ module Gitlab
end
def self.lock_file_path(project)
- return unless project.export_path || object_storage?
+ return unless project.export_path || export_file_exists?
lock_path = project.import_export_shared.archive_path
@@ -83,8 +83,8 @@ module Gitlab
errors.full_messages.each { |msg| project.import_export_shared.add_error_message(msg) }
end
- def object_storage?
- project.export_project_exists?
+ def export_file_exists?
+ project.export_file_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 01c1bca7ec9..4f29bdcea2c 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.export_file.open
+ project.export_file.open
end
def send_file_options
@@ -59,7 +59,7 @@ module Gitlab
end
def export_size
- project.export_file.file.size
+ project.export_file.file.size
end
end
end