deimos-ruby 1.19.1 → 1.19.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
  SHA256:
3
- metadata.gz: def002f5fdb8a3c4ea149bb025796628cb0e6031b62479c29d9973fa21778ac2
4
- data.tar.gz: 960e936dde3be10303bfacc2744a882bbebb87d2d9507c46d5f638f1490e76bd
3
+ metadata.gz: fe0d7f6acfcb82d19d90d45c5c53863163b4154d233a60006c1e54c252f15cf3
4
+ data.tar.gz: b037f552343e9dd83165ae3268432c99ded588dece10d98dd4fca950c1629ab0
5
5
  SHA512:
6
- metadata.gz: 00c456dffaf9a5547b1a9257dfcad9017a9336622685411f57562c5dc9272e4e3e71f3790dcf41c7d575c920cc2d618f1cbb694e33b67a709913800ce49dce5d
7
- data.tar.gz: 0c3abb41bf914154d5eec2977fb708b7fc5368d00fd2f255d2adc696605f5b42f287561ecd0ce1687b3b1b03ca799503aa78f88c0154c092d23b062407c8bfcd
6
+ metadata.gz: 393ae3ff6518c8ceca06f753e5c4f2fd4e516839e1320d90b5eb39db556887513cbf2d2b1fd787abe8d8514d3b78a9552b14e0adb8d4d3433b01e9d60df87bb4
7
+ data.tar.gz: b2f93cd56249c11d51b313ca2e10e94a0a543365c6752e7e6e6baa90658179c3082245a1fc3e1766a46ce3078e933fd4b965d8bebc66845a1dc280daeeb20e8e
data/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
+ # 1.19.3 - 2023-03-22
11
+
12
+ - Fix: Allow `have_sent` matcher to work with schema classes.
13
+
14
+ # 1.19.2 - 2023-03-20
15
+
16
+ - Fix for saving associations where the primary key is not `id`.
17
+
10
18
  # 1.19.1 - 2023-03-17
11
19
 
12
20
  - 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.
@@ -143,7 +143,7 @@ module Deimos
143
143
  Deimos::Backends::Test.sent_messages.any? do |m|
144
144
  hash_matcher = RSpec::Matchers::BuiltIn::Match.new(message)
145
145
  hash_matcher.send(:match,
146
- message,
146
+ message.to_h,
147
147
  m[:payload]&.with_indifferent_access) &&
148
148
  topic == m[:topic] &&
149
149
  (key.present? ? key == m[:key] : true) &&
@@ -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.3'
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.3
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-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf