deimos-ruby 1.19.1 → 1.19.2

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
  SHA256:
3
- metadata.gz: def002f5fdb8a3c4ea149bb025796628cb0e6031b62479c29d9973fa21778ac2
4
- data.tar.gz: 960e936dde3be10303bfacc2744a882bbebb87d2d9507c46d5f638f1490e76bd
3
+ metadata.gz: 34ab9629daca099d1745e192f379cdd5289c081fc241d2920966485c896611c1
4
+ data.tar.gz: 9dd093633667f4560312c0cd945083fb605d29cb4074d7807ea5a98c1a54d68a
5
5
  SHA512:
6
- metadata.gz: 00c456dffaf9a5547b1a9257dfcad9017a9336622685411f57562c5dc9272e4e3e71f3790dcf41c7d575c920cc2d618f1cbb694e33b67a709913800ce49dce5d
7
- data.tar.gz: 0c3abb41bf914154d5eec2977fb708b7fc5368d00fd2f255d2adc696605f5b42f287561ecd0ce1687b3b1b03ca799503aa78f88c0154c092d23b062407c8bfcd
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.send(:foreign_key)}=", entity.id) }
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} {column} to create the migration.'
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '1.19.1'
4
+ VERSION = '1.19.2'
5
5
  end
@@ -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} {column}'\
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.1
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-17 00:00:00.000000000 Z
11
+ date: 2023-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf