deimos-ruby 1.19.1 → 1.19.2
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: 34ab9629daca099d1745e192f379cdd5289c081fc241d2920966485c896611c1
|
4
|
+
data.tar.gz: 9dd093633667f4560312c0cd945083fb605d29cb4074d7807ea5a98c1a54d68a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02276cba6707533b241b0ea2b0f3c8bf74ebf8120515b7ca883a080f4bdd80a1e15e3120097d3b0627a6519b4dc4ccdf5fc4f4e2950111ae69c12a262ec5ac9b
|
7
|
+
data.tar.gz: 4a6236f8d659c90ef864a3b99b04518c5f045235079f7168540b4d25f862ac2554d228c9ea94d10f93dd1ead0c1edd8476a66c6b360cbb572ccdaf9740212dfa
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## UNRELEASED
|
9
9
|
|
10
|
+
# 1.19.2 - 2023-03-20
|
11
|
+
|
12
|
+
- Fix for saving associations where the primary key is not `id`.
|
13
|
+
|
10
14
|
# 1.19.1 - 2023-03-17
|
11
15
|
|
12
16
|
- Fix for `rails g deimos:bulk_import_id` generator.
|
@@ -137,7 +137,7 @@ module Deimos
|
|
137
137
|
# Get associated `has_one` or `has_many` records for each entity
|
138
138
|
sub_records = Array(entity.send(assoc.name))
|
139
139
|
# Set IDS from master to each of the records in `has_one` or `has_many` relation
|
140
|
-
sub_records.each { |d| d.send("#{assoc.
|
140
|
+
sub_records.each { |d| d.send("#{assoc.foreign_key}=", entity.send(assoc.active_record_primary_key)) }
|
141
141
|
sub_records
|
142
142
|
}.flatten
|
143
143
|
|
@@ -243,7 +243,7 @@ module Deimos
|
|
243
243
|
return if entities.first.respond_to?(@bulk_import_id_column)
|
244
244
|
|
245
245
|
raise "Create bulk_import_id on #{entities.first.class} and set it in `build_records` for associations." \
|
246
|
-
' Run rails g deimos:bulk_import_id {table}
|
246
|
+
' Run rails g deimos:bulk_import_id {table} to create the migration.'
|
247
247
|
end
|
248
248
|
|
249
249
|
# Fills Primary Key ID on in-memory objects.
|
data/lib/deimos/version.rb
CHANGED
@@ -108,7 +108,7 @@ module ActiveRecordBatchConsumerTest
|
|
108
108
|
publish_batch([{ key: 2,
|
109
109
|
payload: { test_id: 'xyz', some_int: 5, title: 'Widget Title' } }])
|
110
110
|
}.to raise_error('Create bulk_import_id on ActiveRecordBatchConsumerTest::Widget'\
|
111
|
-
' and set it in `build_records` for associations. Run rails g deimos:bulk_import_id {table}
|
111
|
+
' and set it in `build_records` for associations. Run rails g deimos:bulk_import_id {table}'\
|
112
112
|
' to create the migration.')
|
113
113
|
end
|
114
114
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deimos-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.19.
|
4
|
+
version: 1.19.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Orner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avro_turf
|