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 +4 -4
- data/app/concepts/lockstep/query.rb +4 -4
- data/lib/lockstep_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7db9d59fbe7aa12ec5ea2c3985a1e898e94327dc0645a90278b14d7612382cf1
|
4
|
+
data.tar.gz: 47fc4750144c70cd99dd4cc765c38801f0e420e70af61d243a8d84b9ad67a67d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
303
|
-
break if params[:pageSize]
|
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
|
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
|
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.
|
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:
|
11
|
+
date: 2023-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|