lockstep_rails 0.3.61 → 0.3.62

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: b1b2f86a916165804f73ef81e9e0ee5b6e17e8740ac15a28c3135d6856827775
4
- data.tar.gz: 03d3c1c288257eec7b7caff5c74648a1acf2c61965318826c887e609f1e239e7
3
+ metadata.gz: 9be38b7152f518344bb64998dc99c2ffbf4e0cc2bcf8bdbede10db7bf0a753ca
4
+ data.tar.gz: 5451642d8f5a986a6a568868b85734222a2b241e2f7f6d226a4652cedef7f8cb
5
5
  SHA512:
6
- metadata.gz: e2cd04beea877119aea35c700c1881c8f614428588e2e454bb4dd7b5444e5d2cafa04c7bbe9836ede5208ae5ca9c4ebd56d69434bfe73ae351f5f900316b470f
7
- data.tar.gz: addb310f7afcd0d91715142d94893f93ca0d7d498eb24490ed110bb73d174075602f36991faecce1aab96389693a9f8ff3cb8679922635ea1dc882b8386b1476
6
+ metadata.gz: bb9b19ccbba26424a2eb571e622f73e8dba2f1cf913969757af232577d1449f88f031e75622a3a73c1916747988e357937af97ea77f48bf90207ff58e91fa229
7
+ data.tar.gz: 939add76110fce864a6fa02758e34b95124ef5db2eee221498d66266b56a11b8b9d21425a307a76cbb010ec7b9b653d401e4cf6cbfec974c94d6dd6ee06107cd
@@ -423,9 +423,12 @@ module Lockstep
423
423
  # raise StandardError.new("delete_all doesn't exist. Did you mean destroy_all?")
424
424
  # end
425
425
 
426
- def self.bulk_import(new_objects, slice_size = 20)
426
+ def self.bulk_import(new_objects, slice_size = nil)
427
427
  return [] if new_objects.blank?
428
428
 
429
+ # default slice size to 1000, if its blank or if its 0
430
+ slice_size = 1000 if slice_size.blank? || slice_size.to_i == 0
431
+
429
432
  # Batch saves seem to fail if they're too big. We'll slice it up into multiple posts if they are.
430
433
  new_objects.each_slice(slice_size) do |objects|
431
434
  # attributes_for_saving
@@ -1,3 +1,3 @@
1
1
  module LockstepRails
2
- VERSION = '0.3.61'
2
+ VERSION = '0.3.62'
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.61
4
+ version: 0.3.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-16 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails