batch-loader 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/batch_loader.rb +8 -1
- data/lib/batch_loader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9c2a37ad6f642d238140812bad2ec413e220c0d
|
4
|
+
data.tar.gz: e57a956992150ef4578edb133075b4ac3b1eb741
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 024e3fc9ad27f32668f38a83260ea9f642094518f94e26144559c06240a2fe9ebe236e6028678362218276d9da8f5a603a943c712e4cb0b160ab7b7573e6fb45
|
7
|
+
data.tar.gz: 9caaea9dfeadb9d3534cf850a221a68a7296ced09c1f8aa2e5af8c13777c3eb3c2b1fae527a8d4fed351f7a38aa09a50baa1978b66c039d9acc2b77587495c6a
|
data/CHANGELOG.md
CHANGED
@@ -8,10 +8,14 @@ one of the following labels: `Added`, `Changed`, `Deprecated`,
|
|
8
8
|
to manage the versions of this gem so
|
9
9
|
that you can set version constraints properly.
|
10
10
|
|
11
|
-
#### [Unreleased](https://github.com/exAspArk/batch-loader/compare/v1.2.
|
11
|
+
#### [Unreleased](https://github.com/exAspArk/batch-loader/compare/v1.2.1...HEAD)
|
12
12
|
|
13
13
|
* WIP
|
14
14
|
|
15
|
+
#### [v1.2.1](https://github.com/exAspArk/batch-loader/compare/v1.2.0...v1.2.1)
|
16
|
+
|
17
|
+
* `Fixed`: Do not depend on `method_missing` for `respond_to?`. [#14](https://github.com/exAspArk/batch-loader/pull/14)
|
18
|
+
|
15
19
|
#### [v1.2.0](https://github.com/exAspArk/batch-loader/compare/v1.1.1...v1.2.0)
|
16
20
|
|
17
21
|
* `Added`: `key` argument for the `BatchLoader#batch` method. [#12](https://github.com/exAspArk/batch-loader/pull/12)
|
data/lib/batch_loader.rb
CHANGED
@@ -36,7 +36,9 @@ class BatchLoader
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def respond_to?(method_name, include_private = false)
|
39
|
-
LEFT_INSTANCE_METHODS.include?(method_name)
|
39
|
+
return true if LEFT_INSTANCE_METHODS.include?(method_name)
|
40
|
+
|
41
|
+
__loaded_value.respond_to?(method_name, include_private)
|
40
42
|
end
|
41
43
|
|
42
44
|
def inspect
|
@@ -60,6 +62,11 @@ class BatchLoader
|
|
60
62
|
|
61
63
|
private
|
62
64
|
|
65
|
+
def __loaded_value
|
66
|
+
result = __sync!
|
67
|
+
@cache ? @loaded_value : result
|
68
|
+
end
|
69
|
+
|
63
70
|
def method_missing(method_name, *args, &block)
|
64
71
|
__sync!.public_send(method_name, *args, &block)
|
65
72
|
end
|
data/lib/batch_loader/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: batch-loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- exAspArk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|