bulk_loader 1.2.0 → 1.3.0

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: 3b828de71b675977a5e13ee65e0f46a7929717d712b54f38df4fd9f31442b8a8
4
- data.tar.gz: d8dd3a45609fad64fc8a6f35f557b7660ca81c1e65b3bc889bfdad6ff06eea26
3
+ metadata.gz: 721fc43705d557cc96492ab6cc7258af8afe18e25a10e99c354820c6a005887d
4
+ data.tar.gz: 7d38476506e6e00ea0d0778b91688cb6168c78256c1b0bca9b566a5e7c942ee4
5
5
  SHA512:
6
- metadata.gz: ed99f135707732b203fd5ab7517a808dbe5a54f46f5ad802099c77cf29337d38406715ef70d4c591d46f1c2ce1dfe3c2fec39c6e8f9249446be867494c368de1
7
- data.tar.gz: 7e58ad0d7dea88ac8592a9a4261c67edf7efd55fcf5dfe0e35c2a9b8f6fe172abe963f46e7e61b8b00af2032e328da3d9bbe3ec626927d48fd9fa5eb2c0f46ce
6
+ metadata.gz: 99fd383a9e420767a2d59685bfc81d8a37bdb1553cd6729bdbaa8a0f3c63ec674cfadaf33be701e1684756167903d34bad25cc8d6f6edd12f70f90cf2cba0d47
7
+ data.tar.gz: 98de89ed43d3708737da4743dbe00e7e2b3df85a94c3bf37fd91f42a712c5a78d57a9ebd80d6c92820ee3047af4c828922f218df7b79f349034a4d116ee19e25
@@ -13,6 +13,8 @@ module BulkLoader
13
13
  end
14
14
 
15
15
  def load(lazy_objs, *args)
16
+ return if lazy_objs.empty?
17
+
16
18
  mapping_of = get_mapping(lazy_objs)
17
19
 
18
20
  result_of = call_block(mapping_of, *args)
@@ -32,6 +34,7 @@ module BulkLoader
32
34
  raise ArgumentError, message
33
35
  end
34
36
  result_of = @block.call(mapping_of.keys, *args)
37
+
35
38
  raise 'block shuold return Hash' unless result_of.is_a?(Hash)
36
39
 
37
40
  result_of
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BulkLoader
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulk_loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keiji Yoshimi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-23 00:00:00.000000000 Z
11
+ date: 2019-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler