batching 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/batching.gemspec +1 -1
  3. data/lib/batching.rb +2 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc2a55db2140a48860bdd5ecb8d01f914cc2e2ee7f6e80552398f2f417e74017
4
- data.tar.gz: 8d87c88fd3cef9ab7be40d2260c7eaa6c91220ee41ac43c156e38e0fe8ca6164
3
+ metadata.gz: 7e4813782585923ade79ec25ae6790bb0a5f4383ae1a8194a18036767b9d5c0a
4
+ data.tar.gz: 720799ea13be659cfa62f01b67ef30d77740c8efc1d66fa7be59918c1f8374b6
5
5
  SHA512:
6
- metadata.gz: 2fdcb1e9646fb2cb0a418237a45d27414e98452ea61d684655864e1081ee04c0ea16a0b830bb0c8b1412903e18d437bb9d6714ff83bd69899bb273a5efa0a538
7
- data.tar.gz: 2a2cc53aafd8da857fb394f7cd93be0d7e8d4e4877a0f2e4dbe8ac7b1068b6ca63d2e2dfce4cd89a487791f373e8e8e9e851ad1a159e59fbcf68172811831a1d
6
+ metadata.gz: bff4de4a5bb2d9b2e1b4ac45ac9b530b6513522175160337e427a8833f62fb41f9c39e5ea3a7e91e22205eceec32058b0e7350255ab251a5bd51aa4b18f43c50
7
+ data.tar.gz: 1000caffa64250faa2a763728a11fbd2a619f7e1964ecfd44adb3c1598d1e273118ae01b243bc0ad21c05625b3292e0b94340ac1681fd28ca125b2065368ef8a
data/batching.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'batching'
5
- s.version = '0.2.0'
5
+ s.version = '0.3.0'
6
6
  s.licenses = ['MIT']
7
7
  s.summary = 'Batch processing'
8
8
  s.description = 'Adds an in_batches to Enumerable'
data/lib/batching.rb CHANGED
@@ -12,6 +12,8 @@ module Batching
12
12
  end
13
13
 
14
14
  def in_batches(batch_size: 1_000)
15
+ return to_enum(:in_batches, batch_size: batch_size) unless block_given?
16
+
15
17
  batch = Batch.new
16
18
 
17
19
  process_batch_proc = proc do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: batching
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch