abstract_importer 1.3.2 → 1.3.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3c6b8d26de8bab191b1284a03f2bc563f394b17
|
4
|
+
data.tar.gz: a9ae38851ed8554c95cf4d8265283f2a5d141832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c25ef8ea38b675426863a7299835c05a5a46dd124dd08d39453b66a81f9e3338d2706e3f41c18056926f2e44a32af1c23d5c3d2164de512d1aedc4ea581e35e
|
7
|
+
data.tar.gz: e4b471c39b1f775219efab5d9767e2fef4855a0d783526e991b9165e8e0e3ca4659f042268c7e6da3b8c191ef1569fa217b86e0427b4f653c4a143b90ac04091
|
@@ -47,8 +47,11 @@ module AbstractImporter
|
|
47
47
|
retry
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
|
50
|
+
ids = collection.scope.where(legacy_id: @batch.map { |hash| hash[:legacy_id] })
|
51
|
+
id_map.merge! collection.table_name, ids
|
52
|
+
|
53
|
+
summary.created += ids.length
|
54
|
+
|
52
55
|
@batch = []
|
53
56
|
end
|
54
57
|
|
@@ -21,6 +21,16 @@ class ImporterTest < ActiveSupport::TestCase
|
|
21
21
|
import!
|
22
22
|
assert_equal [456, 457, 458], account.students.pluck(:legacy_id)
|
23
23
|
end
|
24
|
+
|
25
|
+
should "report that it found 3 records" do
|
26
|
+
summary = import!
|
27
|
+
assert_equal 3, summary[:students].total
|
28
|
+
end
|
29
|
+
|
30
|
+
should "report that it created 3 records" do
|
31
|
+
summary = import!
|
32
|
+
assert_equal 3, summary[:students].created
|
33
|
+
end
|
24
34
|
end
|
25
35
|
|
26
36
|
context "with a complex data source" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abstract_importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|