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: aa91c7ca59af567024be0ac8cb9d13ffff059fe7c04fb075101609b3fc78fe4f
4
- data.tar.gz: 8f4e9744ed47825c119e4725c506bf8a55a0dca44d045f49c239e272eed3ea7d
3
+ metadata.gz: b77546f58b3db164d3121fecdfb6de07d708e46a7673d7abeee45682d5390b45
4
+ data.tar.gz: c4ca76da8b99d56c2a1d9db6f9ef9be793ee0f74ca3ef4f59ad494f67f8a596c
5
5
  SHA512:
6
- metadata.gz: 9a6213cb2348019af23683bfa1847e6f0025dd81269fe0950f6a0217acd15565d74096cbcc536bdd42eea8d214f1a5e8a67f8fd6f5188a09aa5442d8f7a26ac7
7
- data.tar.gz: 8a502df328aff5498bf191bc6b3ef73ed91c32b1bcdf2b0f9aa1ec14ce8f0aaf9c908284c8e51da61b2ce51c97df43af0461c297dcb1b0b48252aab8b0240cad
6
+ metadata.gz: e1e655a7e5a202dd13a80f650538c6576c2998a15e35334fda932cf4b49485ad0cf5be2de2e79458f71e317cd21380375876c5cc5b3d7c5858e6071468b4421f
7
+ data.tar.gz: c1f5c91a3f01429fc0f588240f83003e78a46d8de29ce64020b7c36d2c7d582cd4b6f66743ab4f6c2c0be443ae9f32650e48d35a36434a1bb85d2636d371b84c
@@ -4,7 +4,6 @@ class CreateUsers < ActiveRecord::Migration[5.1]
4
4
  def change
5
5
  create_table :users do |t|
6
6
  t.bigint :canvas_id, null: false
7
- t.string :sis_id
8
7
  t.string :email
9
8
  t.string :first_name
10
9
  t.string :last_name
@@ -23,7 +23,14 @@ module CanvasSync
23
23
  end
24
24
  end
25
25
 
26
- def self.perform_in_batches(report_file_path, mapping, klass, conflict_target, import_args: {})
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
 
@@ -7,6 +7,7 @@ users:
7
7
  user_id:
8
8
  database_column_name: sis_id
9
9
  type: string
10
+ deprecated: true
10
11
  email:
11
12
  database_column_name: email
12
13
  type: string
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.17.37".freeze
2
+ VERSION = "0.17.38".freeze
3
3
  end