abstract_importer 1.8.0 → 1.9.0

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: 14a8a74653aaaf12e7dfa92c53d45220c23ffcab5899a6a39d0094f6ae5b80b2
4
- data.tar.gz: be3ee5d19164f9ef5fb8b3cbecb7d9ab07abd39dca0ae15684d3a2b407cb1b9c
3
+ metadata.gz: 0c34dc2d6f5558255316b38ea0f37d7090e18081a7d86a0af0d0a9a9370e30b5
4
+ data.tar.gz: ccd295d5ff7fe47394b8629db231ca8933501e9c55bec8af8d303ab7e8e1d384
5
5
  SHA512:
6
- metadata.gz: 8cb7cd6d795367ed66d09fd6bd36f09c50c5cbbd663fe3ed9a84e44582bdf1b6dc66c570b77e6c1e57e9adb7babcf845ba2ceb0b4a36cf7de99bf6ecb84c25cf
7
- data.tar.gz: 9db676b2fdd24b9200ddcf102cac0eccf3c8b527f3ce97d171e2526fb5132592eea1eb8ba399a300df15ec187bdd0d57122b56d8b1c979c2c02a6dce7ae2f1ba
6
+ metadata.gz: dbeb628bcc04d3f1572721f7c97de4f0a2ec83c0b06ede1c4f61456318ce3da42fe129eecec6edb376ae4bdc656de25e993291ed6c2375788f1f11dc4cdcfb62
7
+ data.tar.gz: ea4e8446bda13ca443274afb141a0f9c2e965ba010da76cca5dcc3b6a6e480654e109a15d154a3510a94f10f9246adfaf7c65b774f9f7c8ff70f6a0e26c16448
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.3
1
+ 3.0.5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v1.9.0 (2023 Mar 8)
2
+ * Updated to support Ruby version 3.0+
3
+
1
4
  ## v1.8.0 (2021 Dec 10)
2
5
  * Added `prepare_scope` as another callback that can be used when importing a collection
3
6
 
@@ -61,7 +61,7 @@ module AbstractImporter
61
61
 
62
62
  scope = invoke_callback(:prepare_scope, scope) || scope
63
63
 
64
- result = scope.public_send(@bulk_operation, batch, @insert_options)
64
+ result = scope.public_send(@bulk_operation, batch, **@insert_options)
65
65
  add_batch_to_id_map(result) if remap_ids?
66
66
  end
67
67
 
@@ -1,3 +1,3 @@
1
1
  module AbstractImporter
2
- VERSION = "1.8.0"
2
+ VERSION = "1.9.0"
3
3
  end
@@ -17,7 +17,7 @@ class InsertStrategyTest < ActiveSupport::TestCase
17
17
  end
18
18
 
19
19
  should "import the records in batches" do
20
- mock.proxy(Student).insert_all(satisfy { |arg| arg.length == 3 }, anything)
20
+ mock.proxy(Student).insert_all(satisfy { |arg| arg.length == 3 }, returning: anything)
21
21
  import!
22
22
  assert_equal [456, 457, 458], account.students.pluck(:legacy_id)
23
23
  end
@@ -17,7 +17,7 @@ class UpsertStrategyTest < ActiveSupport::TestCase
17
17
  end
18
18
 
19
19
  should "import the records in batches" do
20
- mock.proxy(Student).upsert_all(satisfy { |arg| arg.length == 3 }, anything)
20
+ mock.proxy(Student).upsert_all(satisfy { |arg| arg.length == 3 }, unique_by: anything, returning: anything)
21
21
  import!
22
22
  assert_equal [456, 457, 458], account.students.pluck(:legacy_id)
23
23
  end
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.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-10 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -206,7 +206,7 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
- description:
209
+ description:
210
210
  email:
211
211
  - bob.lail@cph.org
212
212
  executables: []
@@ -260,7 +260,7 @@ homepage: https://github.com/cph/abstract_importer
260
260
  licenses:
261
261
  - MIT
262
262
  metadata: {}
263
- post_install_message:
263
+ post_install_message:
264
264
  rdoc_options: []
265
265
  require_paths:
266
266
  - lib
@@ -275,8 +275,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
275
  - !ruby/object:Gem::Version
276
276
  version: '0'
277
277
  requirements: []
278
- rubygems_version: 3.0.3
279
- signing_key:
278
+ rubygems_version: 3.2.33
279
+ signing_key:
280
280
  specification_version: 4
281
281
  summary: Provides services for the mass-import of complex relational data
282
282
  test_files: