frozen_record 0.22.1 → 0.22.2

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: 1f9b741714b43651cc824bf8fe992752dd4425f2357eaf6a995531cc37b3a224
4
- data.tar.gz: c3700095fba0b7f56722e3b4ee515a81fed36542fc8e1dadc3854610a32f4ff1
3
+ metadata.gz: 46d80cfe87901ec547852256bff7eed06ac990a7bb9705b93fa13464354c5af5
4
+ data.tar.gz: 63f48c770a8e86d867382f0333f1c5d6d48b64ece3b849717fd840945f0781ff
5
5
  SHA512:
6
- metadata.gz: 6783fd2e014e11c2348cab5ab4926b12edf5927f347f311d4e7ecea80ab556db2952489c4e9a607936e3d32e052b89874050895c3fb27816c8a907bda7656d9d
7
- data.tar.gz: 6afe414bdce72a1eb9ed68f780af2f20dde1e4aa43b155a5542096a64361434716b14cbaface580de7893e1e15416b6daffe4b875e30878c9acdffce9b1e5662
6
+ metadata.gz: 0a5c7c217742022ff5d23532cc54c04f040ae83e9e05c191783a49db5012c2c95f2815a85a8743e00bd467bbff9fb451d94ba5a75cdd80bde71dee66ccb2a256
7
+ data.tar.gz: 587dc2bcd6cec261cd53c9be8cfe696b7f4944d1c55b5cea55945b7826112eed2829a323c617c906dfcd039d72578e4b4ba5cb790a1ba1131277c6076dafcafc
@@ -54,7 +54,15 @@ module FrozenRecord
54
54
  false
55
55
  end
56
56
 
57
- if supports_freeze
57
+ if YAML.respond_to?(:unsafe_load_file)
58
+ def load_file(path)
59
+ YAML.unsafe_load_file(path, freeze: true) || Dedup::EMPTY_ARRAY
60
+ end
61
+
62
+ def load_string(yaml)
63
+ YAML.unsafe_load(yaml, freeze: true) || Dedup::EMPTY_ARRAY
64
+ end
65
+ elsif supports_freeze
58
66
  def load_file(path)
59
67
  YAML.load_file(path, freeze: true) || Dedup::EMPTY_ARRAY
60
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FrozenRecord
4
- VERSION = '0.22.1'
4
+ VERSION = '0.22.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frozen_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.1
4
+ version: 0.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-30 00:00:00.000000000 Z
11
+ date: 2021-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.1.4
133
+ rubygems_version: 3.3.0.dev
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: ActiveRecord like interface to read only access and query static YAML files