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 +4 -4
- data/lib/bulk_loader/loader.rb +3 -0
- data/lib/bulk_loader/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: 721fc43705d557cc96492ab6cc7258af8afe18e25a10e99c354820c6a005887d
|
4
|
+
data.tar.gz: 7d38476506e6e00ea0d0778b91688cb6168c78256c1b0bca9b566a5e7c942ee4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99fd383a9e420767a2d59685bfc81d8a37bdb1553cd6729bdbaa8a0f3c63ec674cfadaf33be701e1684756167903d34bad25cc8d6f6edd12f70f90cf2cba0d47
|
7
|
+
data.tar.gz: 98de89ed43d3708737da4743dbe00e7e2b3df85a94c3bf37fd91f42a712c5a78d57a9ebd80d6c92820ee3047af4c828922f218df7b79f349034a4d116ee19e25
|
data/lib/bulk_loader/loader.rb
CHANGED
@@ -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
|
data/lib/bulk_loader/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|