n1_loader 1.6.6 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -0
- data/lib/n1_loader/core/loader.rb +1 -1
- data/lib/n1_loader/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9be9c5e7d5e551d253a327cd3d130a38821ef49a43cab60235cc5363a4093d0
|
4
|
+
data.tar.gz: 55c8e748bf52fc05b8648d81d907963b4a60eae0b7aa680d0c491987b43303d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b626c836856198a9e0d0f54daedd0299b2cd7eb0648ddde369a6b7f923751b31d402c8ba03ab67bb064b884e5c5f035babcd1f59d0bef93db26968f7e6fca7ae
|
7
|
+
data.tar.gz: 640e8decd4c53e4f09451041392b964b5f0e59a273719673978e4bf62d26543364b5b4166d97833b7a5084ebacfe7921a921a5c0aae3938c3ce9394f6627bfc8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,44 @@
|
|
1
|
+
## [1.6.7] - 2023/07/30
|
2
|
+
|
3
|
+
Extend the flexibility of loading data comparison. Thanks [Nazar Matus](https://github.com/FunkyloverOne) for suggesting it!
|
4
|
+
|
5
|
+
**BREAKING CHANGES:**
|
6
|
+
|
7
|
+
Loose comparison of loaded data. Before loaded data was initialized with identity comparator in mind:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
@loaded = {}.compare_by_identity
|
11
|
+
```
|
12
|
+
|
13
|
+
Now it will be:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
@loaded = {}
|
17
|
+
```
|
18
|
+
|
19
|
+
This might bring unwanted results for cases when strict comparison was wanted.
|
20
|
+
|
21
|
+
On the other hand, it gives more flexibility for many other cases, especially with isolated loader.
|
22
|
+
For example, this will work now, when it wasn't working before.
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
# ActiveRecord object
|
26
|
+
object = Entity.first
|
27
|
+
|
28
|
+
# Initialize isolated loader
|
29
|
+
instance = loader.new([object])
|
30
|
+
|
31
|
+
# This was working before because the loaded object is identical to passed object by `#object_id`
|
32
|
+
instance.for(object)
|
33
|
+
|
34
|
+
# This wasn't working before because the loaded object is not identical to passed one by `#object_id`
|
35
|
+
#
|
36
|
+
# But it will be working now, because object == Entity.find(object.id)
|
37
|
+
instance.for(Entity.find(object.id))
|
38
|
+
```
|
39
|
+
|
40
|
+
If you need strict comparison support, please feel free to open the issue or the PR.
|
41
|
+
|
1
42
|
## [1.6.6] - 2023/07/30
|
2
43
|
|
3
44
|
- Fix naive check of required arguments. Thanks [Nazar Matus](https://github.com/FunkyloverOne) for the issue!
|
data/lib/n1_loader/version.rb
CHANGED