sprockets-preload 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/preload.rb +6 -2
- data/lib/sprockets/preload/version.rb +1 -1
- data/spec/helpers/assets/direct/test1.js +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9662868a467492b5eef4a0e08bb869de8180cd98
|
4
|
+
data.tar.gz: ade68c20abf5be41e9c36f6decb3f0ab1d5cff87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 655c12c2405fe68955f7871b7ea5e7e18d8b5f0383114610062df569803415dd587874d09cf7709cdbf9200d10dcd2d9a6bda4842801452da2f6b93c1b5c1626
|
7
|
+
data.tar.gz: 436c1416aecf1627747e1e1dcc494f617c500d4b0fba1891677e02e9f6cbf7a3268b265a2e7a6d277b21d9150eb94f788f1def0f7317d3ae50a4a42d04771ca9
|
data/lib/sprockets/preload.rb
CHANGED
@@ -71,11 +71,15 @@ module Sprockets
|
|
71
71
|
end
|
72
72
|
|
73
73
|
# Going deeper
|
74
|
-
dependencies = context._required_paths.
|
74
|
+
dependencies = context._required_paths.select do |dependency|
|
75
|
+
dependency != pathname.to_s
|
76
|
+
end
|
77
|
+
|
78
|
+
dependencies.map! do |dependency|
|
75
79
|
environment.attributes_for(dependency).logical_path
|
76
80
|
end
|
77
81
|
|
78
|
-
dependencies -= context._stubbed_assets.to_a
|
82
|
+
dependencies -= context._stubbed_assets.to_a + [pathname.to_s]
|
79
83
|
|
80
84
|
dependencies.each do |dependency|
|
81
85
|
to_preload += collect(environment, dependency)
|