canvas_sync 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/canvas_sync/importers/bulk_importer.rb +3 -3
- data/lib/canvas_sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a293cba36f2b3825678a9ec989c118e6e3f868f9b5a7924f5db1b945738b7a1c
|
|
4
|
+
data.tar.gz: 448679e4bda068d3ca29289759976d63589f833c8a2a46738005ab1aba702a2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c78cd61d4caaf3e986f21b5b97fa7b8d59a286d559de54a8a84738d82e6b9a93f8d5db0efc1fc83c3cdf96f2412fbe6972ad4215cc7ad99beefc39d7c751056
|
|
7
|
+
data.tar.gz: 8e94e9271cfb57a8a834bbe85314ec37b42d65b32a86c85ce78262bd4d206a64d6ee08da8ea46d1c1acc5974fce474facd7aa3c9cb34253030226c31183356d4
|
|
@@ -11,8 +11,8 @@ module CanvasSync
|
|
|
11
11
|
# @param mapping [Hash] a hash of the values to import. See `model_mappings.yml` for a
|
|
12
12
|
# format example
|
|
13
13
|
# @param klass [Object] e.g., User
|
|
14
|
-
# @param conflict_target [Symbol]
|
|
15
|
-
# or insert a given row. e.g.,: canvas_user_id
|
|
14
|
+
# @param conflict_target [Symbol] the csv column name that maps to the database column
|
|
15
|
+
# that will determine if we need to update or insert a given row. e.g.,: canvas_user_id
|
|
16
16
|
# @param import_args [Hash] Any arguments passed here will be passed through to ActiveRecord::BulkImport.
|
|
17
17
|
# Note: passing the key [:on_duplicate_key_ignore] will override the default behavior of [:on_duplicate_key_update]
|
|
18
18
|
# @yieldparam [Array] row if a block is passed in it will yield the current row from the CSV.
|
|
@@ -47,7 +47,7 @@ module CanvasSync
|
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
perform_import(klass, database_column_names, rows, conflict_target, import_args)
|
|
50
|
+
perform_import(klass, database_column_names, rows, mapping[conflict_target][:database_column_name], import_args)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
private
|
data/lib/canvas_sync/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: canvas_sync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nate Collings
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-01-
|
|
11
|
+
date: 2018-01-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|