blob: fde24cf3646f6fdcc3efae0e3fb01534059847ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# frozen_string_literal: true
module BulkImports
module Pipeline
class Context
attr_accessor :extra
attr_reader :tracker
def initialize(tracker, extra = {})
@tracker = tracker
@extra = extra
end
def entity
@entity ||= tracker.entity
end
def portable
@portable ||= entity.group || entity.project
end
def import_export_config
@import_export_config ||= ::BulkImports::FileTransfer.config_for(portable)
end
def group
@group ||= entity.group
end
def bulk_import
@bulk_import ||= entity.bulk_import
end
def bulk_import_id
@bulk_import_id ||= bulk_import.id
end
def current_user
@current_user ||= bulk_import.user
end
def configuration
@configuration ||= bulk_import.configuration
end
end
end
end
|