frozen_record 0.25.1 → 0.25.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/frozen_record/base.rb +1 -0
- data/lib/frozen_record/compact.rb +1 -1
- data/lib/frozen_record/scope.rb +1 -5
- data/lib/frozen_record/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: 45e9d1a344670234462c22c5d74da8b8e1bf4b726b14b447d1abe646632aae26
|
4
|
+
data.tar.gz: 96c4daa09b3b7b46f332e082ff94f91683d5da82b378bf32398bcbc88f4c4c7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a78872e27a9341f152867b4ee1d281c4512cff485e8c07fd343abab52fd71bb461e0c98c221460e3bce95bf63b7eaff49dd66d1c9166ca4f357eccd65531dcf8
|
7
|
+
data.tar.gz: 3b05ceacab2a957f44818338b2b71555d65baa66dd6cf1e5ee55b21cc0e6c8eb307d4c3ea8af9e7d00bc09ea0d3ce0712e8598225e9f952c0422cb2ddad1694c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Unreleased
|
2
2
|
|
3
|
+
# v0.25.4
|
4
|
+
|
5
|
+
- Minor Ruby 3.2 compatiblity fix (regarding `ruby2_keywords`).
|
6
|
+
|
7
|
+
# v0.25.3
|
8
|
+
|
9
|
+
- Also disable max_records_scan when loading `Compact` records.
|
10
|
+
|
11
|
+
# v0.25.2
|
12
|
+
|
13
|
+
- Fix FrozenRecord.ignore_max_records_scan not applying
|
14
|
+
|
3
15
|
# v0.25.1
|
4
16
|
|
5
17
|
- More reliable way to disable max_records_scan checks when loading records.
|
data/lib/frozen_record/base.rb
CHANGED
@@ -19,7 +19,7 @@ module FrozenRecord
|
|
19
19
|
@attributes = list_attributes(records).freeze
|
20
20
|
build_attributes_cache
|
21
21
|
define_attribute_methods(@attributes.to_a)
|
22
|
-
records = records.map { |r| load(r) }.freeze
|
22
|
+
records = FrozenRecord.ignore_max_records_scan { records.map { |r| load(r) }.freeze }
|
23
23
|
index_definitions.values.each { |index| index.build(records) }
|
24
24
|
records
|
25
25
|
end
|
data/lib/frozen_record/scope.rb
CHANGED
@@ -242,17 +242,13 @@ module FrozenRecord
|
|
242
242
|
if array_delegable?(method_name)
|
243
243
|
to_a.public_send(method_name, *args, &block)
|
244
244
|
elsif @klass.respond_to?(method_name)
|
245
|
-
|
245
|
+
scoping { @klass.public_send(method_name, *args, &block) }
|
246
246
|
else
|
247
247
|
super
|
248
248
|
end
|
249
249
|
end
|
250
250
|
ruby2_keywords :method_missing if respond_to?(:ruby2_keywords, true)
|
251
251
|
|
252
|
-
def delegate_to_class(*args, &block)
|
253
|
-
scoping { @klass.public_send(*args, &block) }
|
254
|
-
end
|
255
|
-
|
256
252
|
def array_delegable?(method)
|
257
253
|
Array.method_defined?(method) && !DISALLOWED_ARRAY_METHODS.include?(method)
|
258
254
|
end
|