fixed TODOs left

This commit is contained in:
James Lopez 2016-05-13 17:39:03 +02:00
parent 8165e52045
commit 2dff04f24a
3 changed files with 10 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -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