canvas_sync 0.17.37 → 0.17.38
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b77546f58b3db164d3121fecdfb6de07d708e46a7673d7abeee45682d5390b45
|
4
|
+
data.tar.gz: c4ca76da8b99d56c2a1d9db6f9ef9be793ee0f74ca3ef4f59ad494f67f8a596c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1e655a7e5a202dd13a80f650538c6576c2998a15e35334fda932cf4b49485ad0cf5be2de2e79458f71e317cd21380375876c5cc5b3d7c5858e6071468b4421f
|
7
|
+
data.tar.gz: c1f5c91a3f01429fc0f588240f83003e78a46d8de29ce64020b7c36d2c7d582cd4b6f66743ab4f6c2c0be443ae9f32650e48d35a36434a1bb85d2636d371b84c
|
@@ -23,7 +23,14 @@ module CanvasSync
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def self.perform_in_batches(report_file_path,
|
26
|
+
def self.perform_in_batches(report_file_path, raw_mapping, klass, conflict_target, import_args: {})
|
27
|
+
mapping = {}.with_indifferent_access
|
28
|
+
raw_mapping.each do |db_col, opts|
|
29
|
+
next if opts[:deprecated] && !klass.column_names.include?(db_col.to_s)
|
30
|
+
|
31
|
+
mapping[db_col] = opts
|
32
|
+
end
|
33
|
+
|
27
34
|
csv_column_names = mapping.values.map { |value| value[:report_column].to_s }
|
28
35
|
database_column_names = mapping.keys
|
29
36
|
|
data/lib/canvas_sync/version.rb
CHANGED