sprockets-rails 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/rails/helper.rb +1 -2
- data/lib/sprockets/rails/version.rb +1 -1
- data/lib/sprockets/railtie.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 441aad85291e3c33ca4ccbf5cf9acb9fd7ebf43c
|
4
|
+
data.tar.gz: 234aac3001536c29088b8997c81ec3a935c4ddfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7a3ab9d1423a2d2b96c2576e8e895a3db8a7b280a0d64df13d057daceb91040d5dd5a52f52b9e5e8349e91f0eeca468aada9810c3b0693e7ef8a26c82f26aec
|
7
|
+
data.tar.gz: 0bc29f5363d1eaea49eb19a285ec03329aaf751f8ac06a37773fda0f989a83172843cbdec0034dabe8744a29e28e7e5203ad2c5a0bfa81eea58f685f5db5705e
|
@@ -18,8 +18,7 @@ module Sprockets
|
|
18
18
|
"`//= link_directory ../javascripts .js`\n" +
|
19
19
|
"`//= link_directory ../stylesheets .css`\n" +
|
20
20
|
"`//= link_tree ../javascripts .js`\n" +
|
21
|
-
"`//= link_tree ../images`\n"
|
22
|
-
"and restart your server"
|
21
|
+
"`//= link_tree ../images`\n"
|
23
22
|
else
|
24
23
|
"Asset was not declared to be precompiled in production.\n" +
|
25
24
|
"Add `Rails.application.config.assets.precompile += " +
|
data/lib/sprockets/railtie.rb
CHANGED
@@ -31,13 +31,21 @@ module Rails
|
|
31
31
|
# Called from asset helpers to alert you if you reference an asset URL that
|
32
32
|
# isn't precompiled and hence won't be available in production.
|
33
33
|
def asset_precompiled?(logical_path)
|
34
|
-
precompiled_assets.include?
|
34
|
+
if precompiled_assets.include?(logical_path)
|
35
|
+
true
|
36
|
+
elsif !config.cache_classes
|
37
|
+
# Check to see if precompile list has been updated
|
38
|
+
precompiled_assets(true).include?(logical_path)
|
39
|
+
else
|
40
|
+
false
|
41
|
+
end
|
35
42
|
end
|
36
43
|
|
37
44
|
# Lazy-load the precompile list so we don't cause asset compilation at app
|
38
45
|
# boot time, but ensure we cache the list so we don't recompute it for each
|
39
46
|
# request or test case.
|
40
|
-
def precompiled_assets
|
47
|
+
def precompiled_assets(clear_cache = false)
|
48
|
+
@precompiled_assets = nil if clear_cache
|
41
49
|
@precompiled_assets ||= assets_manifest.find(config.assets.precompile).map(&:logical_path).to_set
|
42
50
|
end
|
43
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|