fixed TODOs left
This commit is contained in:
parent
8165e52045
commit
2dff04f24a
3 changed files with 10 additions and 12 deletions
|
@ -9,5 +9,13 @@ module Gitlab
|
||||||
def storage_path
|
def storage_path
|
||||||
File.join(Settings.shared['path'], 'tmp/project_exports')
|
File.join(Settings.shared['path'], 'tmp/project_exports')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def project_filename
|
||||||
|
"project.json"
|
||||||
|
end
|
||||||
|
|
||||||
|
def project_bundle_filename
|
||||||
|
"project.bundle"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ module Gitlab
|
||||||
def initialize(project:, shared:)
|
def initialize(project:, shared:)
|
||||||
@project = project
|
@project = project
|
||||||
@shared = shared
|
@shared = shared
|
||||||
@full_path = File.join(@shared.export_path, project_filename)
|
@full_path = File.join(@shared.export_path, ImportExport.project_filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
def save
|
def save
|
||||||
|
@ -20,11 +20,6 @@ module Gitlab
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# TODO remove magic keyword and move it to a shared config
|
|
||||||
def project_filename
|
|
||||||
"project.json"
|
|
||||||
end
|
|
||||||
|
|
||||||
def project_json_tree
|
def project_json_tree
|
||||||
@project.to_json(Gitlab::ImportExport::ImportExportReader.new(shared: @shared).project_tree)
|
@project.to_json(Gitlab::ImportExport::ImportExportReader.new(shared: @shared).project_tree)
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,7 @@ module Gitlab
|
||||||
|
|
||||||
def bundle
|
def bundle
|
||||||
return false if @project.empty_repo?
|
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
|
bundle_to_disk
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,11 +26,6 @@ module Gitlab
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO remove magic keyword and move it to a shared config
|
|
||||||
def project_filename
|
|
||||||
"project.bundle"
|
|
||||||
end
|
|
||||||
|
|
||||||
def path_to_repo
|
def path_to_repo
|
||||||
@project.repository.path_to_repo
|
@project.repository.path_to_repo
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue