lockstep_rails 0.3.46 → 0.3.47

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: d70c650fa66da868875c775c5fb83a931c545366dcc154a34f365423c4e09536
4
- data.tar.gz: 24272417e430cc18de6f718d61ae4380b23bf2570b439115a412d110e135894d
3
+ metadata.gz: 7db9d59fbe7aa12ec5ea2c3985a1e898e94327dc0645a90278b14d7612382cf1
4
+ data.tar.gz: 47fc4750144c70cd99dd4cc765c38801f0e420e70af61d243a8d84b9ad67a67d
5
5
  SHA512:
6
- metadata.gz: e1465ae91bfe4479acd5a50f6b2b162e36792c9a411e8992d3e23c24cfd40a22435e0bc8e7ecbdef45ff5ddbef9fb112bd9e0b6f5ee2d3a238d7eac77c3d71d1
7
- data.tar.gz: a3890e4e4f0697817cd7ba9d739fc95acd970b16595a42f8b2db9ea79c35ef86473aea9f0d84ece5f630539295f43babf50d46b13500d25330cdc15551325761
6
+ metadata.gz: 45db88812fd762bcc175bce07bd8bcd89637940697f83321af415167467d842610512f8d434c2aac8b75386c0e63722e99f04fa19c3b86041bb47f35aa80fc35
7
+ data.tar.gz: 33ae1ed95b0b7d869916b25dc2596ba889739e81a21d42113d2eb54cb184b23e6c1b6ea26e14129c796ca8ddf24a4aa693db52b7ff1ad123b9b6d7081ad4f89c
@@ -299,19 +299,19 @@ class Lockstep::Query
299
299
  records = []
300
300
  loop do
301
301
  params[:pageNumber] = page
302
- params[:pageSize] = limit > 0 ? [limit - records.size, criteria[:chunk]].min : criteria[:chunk]
303
- break if params[:pageSize] == 0
302
+ params[:pageSize] = limit.positive? ? [limit - records.size, criteria[:chunk]].min : criteria[:chunk]
303
+ break if params[:pageSize].zero?
304
304
 
305
305
  results = get_results(params)
306
306
  break unless results.present?
307
307
 
308
308
  records += results
309
- break if limit > 0 and records.size >= limit
309
+ break if limit.positive? && records.size >= limit
310
310
 
311
311
  page += 1
312
312
  end
313
313
 
314
- records
314
+ records.uniq(&:attributes)
315
315
  end
316
316
 
317
317
  def first
@@ -1,3 +1,3 @@
1
1
  module LockstepRails
2
- VERSION = '0.3.46'
2
+ VERSION = '0.3.47'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockstep_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.46
4
+ version: 0.3.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-29 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails