deimos-ruby 1.19.beta1 → 1.19.beta2

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: e73c9ad8e132353f906ffd5ffe91820e8ad9d5225dbf091c7889752c8d699703
4
- data.tar.gz: ac5d117e07aa5881bfd484ce74bd1715cb1f483004b2a0609b2b9e45a1a42937
3
+ metadata.gz: c460892f0e27ef50137442b4ca2a1328479c54fe47b65850575e7ef3ff769ff7
4
+ data.tar.gz: 57cbd04c1d2bb0582579ef9b0413c38cd4de4dcca682ca0ff201564815960d6e
5
5
  SHA512:
6
- metadata.gz: 1762491acddff361c0290837911eaf862697c9c1a1f2cb054636fdbc097290efb5babe43c9b6e85217a4c43892cf34f899011e5c22485b568bed1a690fd2fcc3
7
- data.tar.gz: 56ce518a0b9d8bb62ebb8e799fa51f95ccf5f275e4e3231d7b01084d8a35c73c1d08998035694dde72ff530e6b72c001b6c99ab44ebde82357aee0d456ba6575
6
+ metadata.gz: c07bdf21830aa08b0151ad5db8291ebe597fac4265592ab549db6583ada6043765d92052cd7a6bae6f2264b2cbd15242659b8e108572bb32aaca710eb3fdc740
7
+ data.tar.gz: 5c51d92c8956f54fe8a689015e46c195ab8ee2b543555c2b8e9b1263d3e58c3411b2263283a46e2f29bdf467f4b8d1cb49af528c8dc2d5450d98e5f5481b60ff
@@ -87,7 +87,7 @@ module Deimos
87
87
  # records to either be updated or inserted.
88
88
  # @return [void]
89
89
  def upsert_records(messages)
90
- key_cols = key_columns(messages, nil)
90
+ key_cols = key_columns(messages, @klass)
91
91
 
92
92
  # Create ActiveRecord Models with payload + key attributes
93
93
  upserts = build_records(messages)
@@ -172,12 +172,10 @@ module Deimos
172
172
  # batch. Requires at least one record.
173
173
  # The parameters are mutually exclusive. records is used by default implementation.
174
174
  # @param records [Array<Message>] Non-empty list of messages.
175
- # @param klass [ActiveRecord::Class] Class Name can be used to fetch columns
175
+ # @param _klass [ActiveRecord::Class] Class Name can be used to fetch columns
176
176
  # @return [Array<String>] List of attribute names.
177
177
  # @raise If records is empty.
178
- def key_columns(records, klass)
179
- raise 'Must implement key_columns method for associations!' unless klass.nil?
180
-
178
+ def key_columns(records, _klass)
181
179
  raise 'Cannot determine key from empty batch' if records.empty?
182
180
 
183
181
  first_key = records.first.key
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '1.19.beta1'
4
+ VERSION = '1.19.beta2'
5
5
  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.beta1
4
+ version: 1.19.beta2
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-02-01 00:00:00.000000000 Z
11
+ date: 2023-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf