summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-05-13 17:39:03 +0200
committerJames Lopez <james@jameslopez.es>2016-05-13 17:39:03 +0200
commit2dff04f24a8446216e12d43fab6841f28f3dd406 (patch)
tree82509b26ade902e9b8236f979b398df0e0c7a2d9 /lib/gitlab
parent8165e52045711958abbb94ee9ea2c00056ccadda (diff)
downloadgitlab-ce-2dff04f24a8446216e12d43fab6841f28f3dd406.tar.gz
fixed TODOs left
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/import_export.rb8
-rw-r--r--lib/gitlab/import_export/project_tree_saver.rb7
-rw-r--r--lib/gitlab/import_export/repo_bundler.rb7
3 files changed, 10 insertions, 12 deletions
diff --git a/lib/gitlab/import_export.rb b/lib/gitlab/import_export.rb
index 6835411ba70..bf80ac7f093 100644
--- a/lib/gitlab/import_export.rb
+++ b/lib/gitlab/import_export.rb
@@ -9,5 +9,13 @@ module Gitlab
def storage_path
File.join(Settings.shared['path'], 'tmp/project_exports')
end
+
+ def project_filename
+ "project.json"
+ end
+
+ def project_bundle_filename
+ "project.bundle"
+ end
end
end
diff --git a/lib/gitlab/import_export/project_tree_saver.rb b/lib/gitlab/import_export/project_tree_saver.rb
index 2287524c8a5..c894295b0f5 100644
--- a/lib/gitlab/import_export/project_tree_saver.rb
+++ b/lib/gitlab/import_export/project_tree_saver.rb
@@ -6,7 +6,7 @@ module Gitlab
def initialize(project:, shared:)
@project = project
@shared = shared
- @full_path = File.join(@shared.export_path, project_filename)
+ @full_path = File.join(@shared.export_path, ImportExport.project_filename)
end
def save
@@ -20,11 +20,6 @@ module Gitlab
private
- # TODO remove magic keyword and move it to a shared config
- def project_filename
- "project.json"
- end
-
def project_json_tree
@project.to_json(Gitlab::ImportExport::ImportExportReader.new(shared: @shared).project_tree)
end
diff --git a/lib/gitlab/import_export/repo_bundler.rb b/lib/gitlab/import_export/repo_bundler.rb
index bcf976fb624..aff6e92be70 100644
--- a/lib/gitlab/import_export/repo_bundler.rb
+++ b/lib/gitlab/import_export/repo_bundler.rb
@@ -12,7 +12,7 @@ module Gitlab
def bundle
return false if @project.empty_repo?
- @full_path = File.join(@shared.export_path, project_filename)
+ @full_path = File.join(@shared.export_path, ImportExport.project_bundle_filename)
bundle_to_disk
end
@@ -26,11 +26,6 @@ module Gitlab
false
end
- # TODO remove magic keyword and move it to a shared config
- def project_filename
- "project.bundle"
- end
-
def path_to_repo
@project.repository.path_to_repo
end