bootsnap 1.4.0.pre2 → 1.4.0.pre3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 183730814ecdc4b8fe707083b1bdb0c2560cbf5a53efb150ccaa83c984570eff
|
4
|
+
data.tar.gz: c383caff1fa9c151fdb9e32a34dfd05a9092df90ea520152e40b178b5230edac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82ddd2485682ac7dbb233850cee0491bacb489e4ddcf8b01debe53e3b600de35a466b968bf6c43d00247f15c79c7fa4566f1944d88cf9859f0c51ea48664f069
|
7
|
+
data.tar.gz: 5716447964e8109dab8537eb3415f50da5408003f8b16625d8a6ea8f585510d238c8973035b3cc03df4be7c31c949c2b74928a613d7b03f65cc07fc8580f3bb4
|
@@ -19,10 +19,6 @@ module Kernel
|
|
19
19
|
def require_with_bootsnap_lfi(path, resolved = nil)
|
20
20
|
Bootsnap::LoadPathCache.loaded_features_index.register(path, resolved) do
|
21
21
|
require_without_bootsnap(resolved || path)
|
22
|
-
# TODO(burke): if resolved was nil, the correct thing here is probably to
|
23
|
-
# ingress the appended contents to $LOADED_FEATURES into the LFI, but
|
24
|
-
# it's hard to imagine how to do this without creating a bunch of
|
25
|
-
# redundant work, since require can call itself a bunch of times.
|
26
22
|
end
|
27
23
|
end
|
28
24
|
|
@@ -74,9 +74,16 @@ module Bootsnap
|
|
74
74
|
# 2. Inspect $LOADED_FEATURES upon return from yield to find the matching
|
75
75
|
# entry.
|
76
76
|
def register(short, long = nil)
|
77
|
-
|
77
|
+
if long.nil?
|
78
|
+
pat = %r{/#{Regexp.escape(short)}(\.[^/]+)?$}
|
79
|
+
len = $LOADED_FEATURES.size
|
80
|
+
ret = yield
|
81
|
+
long = $LOADED_FEATURES[len..-1].detect { |feat| feat =~ pat }
|
82
|
+
else
|
83
|
+
ret = yield
|
84
|
+
end
|
78
85
|
|
79
|
-
hash = long.hash
|
86
|
+
hash = long.hash
|
80
87
|
|
81
88
|
# do we have 'bundler' or 'bundler.rb'?
|
82
89
|
altname = if File.extname(short) != ''
|
data/lib/bootsnap/version.rb
CHANGED