bootsnap 1.15.0 → 1.16.0

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: 68bf895082a1d27386514357e36c1b53972f7f2e22f50b2f9b77cde53fec9110
4
- data.tar.gz: dcc033dc6522aa59d853f7840d228430aa5591892d063d91c061fb1c7edcb820
3
+ metadata.gz: 1bf1eca00971c561ca1e15941903dcf193ec8fc84c68736177a3aa72558c536b
4
+ data.tar.gz: bcd5596d1b4b00905af82cf25693fb72e71897685e024b27311353eef6f588bf
5
5
  SHA512:
6
- metadata.gz: b640bf89d0448536c17f88352e97aa4b5a321cec6abfcd011d1f442ec9c9170b0b08e0329e398919140da1b0d1e65d343b761be392d25eb75540425c42d766cb
7
- data.tar.gz: 97080b27ccca5dd741bfccc0c3cd412c7fcea917fad2e79961ef2a7c18a1dd5478fc33f2a4d9f59a5f8765696760aef76799f401b1cf13b9a68d7ffc0d0a326b
6
+ metadata.gz: 0d3e37e56d994647ac88a1c9b83f087f137d32acfc09bfba1e71a85ce254697b1dcf6c9e1c90b5c71728ce0f3c0a63ee86680455a8f95003d237671435042859
7
+ data.tar.gz: 270bf8fc609981d25441c9c4bd975348130177564f2e1a0744f18720d7f59cda3c3da24bea0c07f2498a185308647b05715e1b1dd5a6045e653600ab2f5907a1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Unreleased
2
2
 
3
+ # 1.16.0
4
+
5
+ * Use `RbConfig::CONFIG["rubylibdir"]` instead of `RbConfig::CONFIG["libdir"]` to check for stdlib files. See #431.
6
+ * Fix the cached version of `YAML.load_file` being slightly more permissive than the default `Psych` one. See #434.
7
+ `Date` and `Time` values are now properly rejected, as well as aliases.
8
+ If this causes a regression in your application, it is recommended to load *trusted* YAML files with `YAML.unsafe_load_file`.
9
+
3
10
  # 1.15.0
4
11
 
5
12
  * Add a readonly mode, for environments in which the updated cache wouldn't be persisted. See #428 and #423.
data/README.md CHANGED
@@ -68,7 +68,7 @@ will help optimize boot time further if you have an extremely large `$LOAD_PATH`
68
68
  Note: Bootsnap and [Spring](https://github.com/rails/spring) are orthogonal tools. While Bootsnap
69
69
  speeds up the loading of individual source files, Spring keeps a copy of a pre-booted Rails process
70
70
  on hand to completely skip parts of the boot process the next time it's needed. The two tools work
71
- well together, and are both included in a newly-generated Rails applications by default.
71
+ well together.
72
72
 
73
73
  ### Environment variables
74
74
 
@@ -82,7 +82,7 @@ well together, and are both included in a newly-generated Rails applications by
82
82
  - `BOOTSNAP_LOG` configure bootsnap to log all caches misses to STDERR.
83
83
  - `BOOTSNAP_IGNORE_DIRECTORIES` a comma separated list of directories that shouldn't be scanned.
84
84
  Useful when you have large directories of non-ruby files inside `$LOAD_PATH`.
85
- It default to ignore any directory named `node_modules`.
85
+ It defaults to ignore any directory named `node_modules`.
86
86
 
87
87
  ### Environments
88
88
 
@@ -65,7 +65,7 @@ module Bootsnap
65
65
  end
66
66
 
67
67
  unless const_defined?(:NoTagsVisitor)
68
- visitor = Class.new(Psych::Visitors::ToRuby) do
68
+ visitor = Class.new(Psych::Visitors::NoAliasRuby) do
69
69
  def visit(target)
70
70
  if target.tag
71
71
  raise UnsupportedTags, "YAML tags are not supported: #{target.tag}"
@@ -129,7 +129,10 @@ module Bootsnap
129
129
  ast = ::YAML.parse(payload)
130
130
  return ast unless ast
131
131
 
132
- NoTagsVisitor.create.visit(ast)
132
+ loader = ::Psych::ClassLoader::Restricted.new(["Symbol"], [])
133
+ scanner = ::Psych::ScalarScanner.new(loader)
134
+
135
+ NoTagsVisitor.new(scanner, loader).visit(ast)
133
136
  end
134
137
  end
135
138
 
@@ -116,8 +116,8 @@ module Bootsnap
116
116
  VOLATILE = :volatile
117
117
 
118
118
  # Built-in ruby lib stuff doesn't change, but things can occasionally be
119
- # installed into sitedir, which generally lives under libdir.
120
- RUBY_LIBDIR = RbConfig::CONFIG["libdir"]
119
+ # installed into sitedir, which generally lives under rubylibdir.
120
+ RUBY_LIBDIR = RbConfig::CONFIG["rubylibdir"]
121
121
  RUBY_SITEDIR = RbConfig::CONFIG["sitedir"]
122
122
 
123
123
  def stability
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootsnap
4
- VERSION = "1.15.0"
4
+ VERSION = "1.16.0"
5
5
  end
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.15.0
4
+ version: 1.16.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: 2022-11-25 00:00:00.000000000 Z
11
+ date: 2023-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack