Commit e923cb35 authored by Kassio Borges's avatar Kassio Borges

Prepare `...Group::TreeRestorer` to ndjson

Renaming `Gitlab::ImportExport::Group::TreeRestorer` to
`Gitlab::ImportExport::Group::LegacyTreeRestorer` is part of the effort
to enable `ndjson` on the Group Import/Export feature.
With `ndjson` enabled all the structure of restoring a group-tree is
different, so to make the maintenance easier the "non-ndjson"
structure is being renamed.
parent a661d092
...@@ -33,10 +33,12 @@ module Groups ...@@ -33,10 +33,12 @@ module Groups
end end
def restorer def restorer
@restorer ||= Gitlab::ImportExport::Group::TreeRestorer.new(user: @current_user, @restorer ||= Gitlab::ImportExport::Group::LegacyTreeRestorer.new(
shared: @shared, user: @current_user,
group: @group, shared: @shared,
group_hash: nil) group: @group,
group_hash: nil
)
end end
def remove_import_file def remove_import_file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::ImportExport::Group::TreeRestorer do describe Gitlab::ImportExport::Group::LegacyTreeRestorer do
include ImportExport::CommonUtil include ImportExport::CommonUtil
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
module Group module Group
class TreeRestorer class LegacyTreeRestorer
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
attr_reader :user attr_reader :user
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::ImportExport::Group::TreeRestorer do describe Gitlab::ImportExport::Group::LegacyTreeRestorer do
include ImportExport::CommonUtil include ImportExport::CommonUtil
let(:shared) { Gitlab::ImportExport::Shared.new(group) } let(:shared) { Gitlab::ImportExport::Shared.new(group) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment