diff options
author | James Lopez <james@jameslopez.es> | 2016-05-13 17:39:03 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-05-13 17:39:03 +0200 |
commit | 2dff04f24a8446216e12d43fab6841f28f3dd406 (patch) | |
tree | 82509b26ade902e9b8236f979b398df0e0c7a2d9 /lib/gitlab | |
parent | 8165e52045711958abbb94ee9ea2c00056ccadda (diff) | |
download | gitlab-ce-2dff04f24a8446216e12d43fab6841f28f3dd406.tar.gz |
fixed TODOs left
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/import_export.rb | 8 | ||||
-rw-r--r-- | lib/gitlab/import_export/project_tree_saver.rb | 7 | ||||
-rw-r--r-- | lib/gitlab/import_export/repo_bundler.rb | 7 |
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 |