frozen_record 0.27.3 → 0.27.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: 47909eff31da52e0bf2da2699be17ce81f1aaf6f76bf3f662a63838549153561
4
- data.tar.gz: 7878df0dabb556e1820141ffde68bd5ca335665ac2796450563088c3010a1cf0
3
+ metadata.gz: d790a4c35575afe0294cdcaa88f0f75bdee110623f40bfddd1ea4edade4df7c0
4
+ data.tar.gz: 0c5e6cd922365269c4a320a92c7b196749ce2016f5a8bdeb887bdc191a83ebcf
5
5
  SHA512:
6
- metadata.gz: c1e7763e9119e0b174f326bf123e9d85114b6e2ec785897bcf07f65c54aaaa87c9f515364d505e2045f400b81fa68ba2d146529388fba1103eff4f47eac73beb
7
- data.tar.gz: 86c377e682706a4e39149e90adf47e932e1313b22d632cfcc003d7c3fc8dfad7e155aa2440f60053ee8c48f25ab6fb1e4baae5d331813a148a540c37da7a22a1
6
+ metadata.gz: af254fb45c82cd57300fd613b513f1e423f102dc9dd3ddc5a2c99f0abd4b44cbd72b104b471795c8e1b9e91cda27d27760eea30fde2c682caef91b5ef1cc30e9
7
+ data.tar.gz: db4fd7fc5e5d5f00566a246b29ba8c0f337bfbf7043b6925ce7492ac7862372f4098c85f341b6b01672de47345055b10a9269f691fb2d9f0ee0623d2d8425799
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # v0.27.4
4
+
5
+ - Also fix compatibility with Rails 8.0.0alpha: https://github.com/rails/rails/pull/52717. Missed a few places.
6
+
3
7
  # v0.27.3
4
8
 
5
9
  - Fix compatibility with Rails 8.0.0alpha: https://github.com/rails/rails/pull/52717
@@ -28,17 +28,13 @@ module FrozenRecord
28
28
  FIND_BY_PATTERN = /\Afind_by_(\w+)(!?)/
29
29
  FALSY_VALUES = [false, nil, 0, -''].to_set
30
30
 
31
- class_attribute :base_path, :primary_key, :backend, :auto_reloading, :default_attributes, instance_accessor: false
31
+ class_attribute :base_path, :_primary_key, :backend, :auto_reloading, :_default_attributes, instance_accessor: false
32
32
  class_attribute :index_definitions, instance_accessor: false
33
33
  class_attribute :attribute_deserializers, instance_accessor: false
34
34
  class_attribute :max_records_scan, instance_accessor: false
35
35
  self.index_definitions = {}.freeze
36
36
  self.attribute_deserializers = {}.freeze
37
37
 
38
- self.primary_key = 'id'
39
-
40
- self.backend = FrozenRecord::Backends::Yaml
41
-
42
38
  attribute_method_suffix '?'
43
39
 
44
40
  class ThreadSafeStorage
@@ -68,16 +64,20 @@ module FrozenRecord
68
64
  self.max_records_scan = previous_max_records_scan
69
65
  end
70
66
 
71
- alias_method :set_default_attributes, :default_attributes=
72
- private :set_default_attributes
67
+ def default_attributes
68
+ _default_attributes
69
+ end
70
+
73
71
  def default_attributes=(default_attributes)
74
- set_default_attributes(default_attributes.transform_keys(&:to_s))
72
+ self._default_attributes = default_attributes.transform_keys(&:to_s)
73
+ end
74
+
75
+ def primary_key
76
+ _primary_key
75
77
  end
76
78
 
77
- alias_method :set_primary_key, :primary_key=
78
- private :set_primary_key
79
79
  def primary_key=(primary_key)
80
- set_primary_key(-primary_key.to_s)
80
+ self._primary_key = -primary_key.to_s
81
81
  end
82
82
 
83
83
  attr_accessor :abstract_class
@@ -274,6 +274,10 @@ module FrozenRecord
274
274
 
275
275
  end
276
276
 
277
+ self.primary_key = 'id'
278
+
279
+ self.backend = FrozenRecord::Backends::Yaml
280
+
277
281
  def initialize(attrs = {})
278
282
  @attributes = attrs.freeze
279
283
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FrozenRecord
4
- VERSION = '0.27.3'
4
+ VERSION = '0.27.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.27.3
4
+ version: 0.27.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier