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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c4f3cb4248d83050752933b1a2c48d0bf0914a73e695932650a03cae9feffa0
4
- data.tar.gz: fb8517287957255269ffec7ab7bac5740c6d7e45b4f1c3c0b321ce4fc5badf4f
3
+ metadata.gz: 45e9d1a344670234462c22c5d74da8b8e1bf4b726b14b447d1abe646632aae26
4
+ data.tar.gz: 96c4daa09b3b7b46f332e082ff94f91683d5da82b378bf32398bcbc88f4c4c7c
5
5
  SHA512:
6
- metadata.gz: 1d66248c13f74ccaa779db89359467e54c1ee18979683fcd42e62485ac5657345115985329f07be02f0ffe6f347334646e26bb920df1b1efad2d3ef55ab24d74
7
- data.tar.gz: f395e256aca6a133fe684f3e28a94cbdca4f70ea6a2c565a63f30bb4f52144f62529a6b20c24d806e97a4ba0bb11a5ca0e2402d521c700f13bc5b1bb49331578
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.
@@ -11,6 +11,7 @@ module FrozenRecord
11
11
 
12
12
  def ignore_max_records_scan
13
13
  previous = enforce_max_records_scan
14
+ self.enforce_max_records_scan = false
14
15
  yield
15
16
  ensure
16
17
  self.enforce_max_records_scan = previous
@@ -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
@@ -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
- delegate_to_class(method_name, *args, &block)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FrozenRecord
4
- VERSION = '0.25.1'
4
+ VERSION = '0.25.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frozen_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.1
4
+ version: 0.25.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier