bootsnap 1.7.7 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/bootsnap/compile_cache/yaml.rb +29 -1
- data/lib/bootsnap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a12930656b479ba9d0675f13bf1edd2a52e0d84314f1e528866110a1a36776df
|
4
|
+
data.tar.gz: 33f4c8ea77733e461c9fe95ba75110e9da0b707e818727ebf5c13605d58eec62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c366c8c65f4ce3fd73979b68c1201c2d7872d059a71ac79a561bc464b7fdaf1d0ba00acbe59e491d25d66efe967b3c0a25a9542727a43c101c4d2b719b82407c
|
7
|
+
data.tar.gz: 39d2ec6734c6234114c27f8665efe8a6170e6bcc58f98cec25f1c4386a644d0eec135ababc66b771dc0744c7df961f63d95669ebdb08db14c3b4982b320b5224
|
data/CHANGELOG.md
CHANGED
@@ -23,7 +23,7 @@ module Bootsnap
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def input_to_output(data, kwargs)
|
26
|
-
::YAML.
|
26
|
+
::YAML.unsafe_load(data, **(kwargs || {}))
|
27
27
|
end
|
28
28
|
|
29
29
|
def strict_load(payload, *args)
|
@@ -52,6 +52,13 @@ module Bootsnap
|
|
52
52
|
require('msgpack')
|
53
53
|
require('date')
|
54
54
|
|
55
|
+
if Patch.method_defined?(:unsafe_load_file) && !::YAML.respond_to?(:unsafe_load_file)
|
56
|
+
Patch.send(:remove_method, :unsafe_load_file)
|
57
|
+
end
|
58
|
+
if Patch.method_defined?(:load_file) && ::YAML::VERSION >= '4'
|
59
|
+
Patch.send(:remove_method, :load_file)
|
60
|
+
end
|
61
|
+
|
55
62
|
# MessagePack serializes symbols as strings by default.
|
56
63
|
# We want them to roundtrip cleanly, so we use a custom factory.
|
57
64
|
# see: https://github.com/msgpack/msgpack-ruby/pull/122
|
@@ -126,6 +133,27 @@ module Bootsnap
|
|
126
133
|
end
|
127
134
|
|
128
135
|
ruby2_keywords :load_file if respond_to?(:ruby2_keywords, true)
|
136
|
+
|
137
|
+
def unsafe_load_file(path, *args)
|
138
|
+
return super if args.size > 1
|
139
|
+
if kwargs = args.first
|
140
|
+
return super unless kwargs.is_a?(Hash)
|
141
|
+
return super unless (kwargs.keys - ::Bootsnap::CompileCache::YAML.supported_options).empty?
|
142
|
+
end
|
143
|
+
|
144
|
+
begin
|
145
|
+
::Bootsnap::CompileCache::Native.fetch(
|
146
|
+
Bootsnap::CompileCache::YAML.cache_dir,
|
147
|
+
File.realpath(path),
|
148
|
+
::Bootsnap::CompileCache::YAML,
|
149
|
+
kwargs,
|
150
|
+
)
|
151
|
+
rescue Errno::EACCES
|
152
|
+
::Bootsnap::CompileCache.permission_error(path)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
ruby2_keywords :unsafe_load_file if respond_to?(:ruby2_keywords, true)
|
129
157
|
end
|
130
158
|
end
|
131
159
|
end
|
data/lib/bootsnap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootsnap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|