sprockets-rails 2.2.4 → 2.3.0
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 +13 -0
- data/lib/sprockets/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 297298e54e64641392c2f8f338ee0f23f2bcdb32
|
4
|
+
data.tar.gz: ac1d41b39342e7e737e0d5708316bbdd3fbcabd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fd8e9443fd61f208445746ed4626749bd3673e954d3fb717dc12d719f810813c159e9ff22703b7d0680fe054aa09d439ad2ea13e46a0af0910745a6eca7d6cb
|
7
|
+
data.tar.gz: d936c88b840a7f528316ebe0c5f70f95f8d7d51df7aa138581393ae830a9daef6177a9542e60280096c314e5cdae9f71632ed35c78daf0ae280bd90516404ffd
|
@@ -38,6 +38,15 @@ module Sprockets
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
class AssetAliasUsed < StandardError
|
42
|
+
def initialize(actual, expected)
|
43
|
+
msg = "Asset was linked to from an alias rather than its exact path. " +
|
44
|
+
"Alias resolving may not be available in production.\n" +
|
45
|
+
"Use #{expected.inspect} instead of #{actual.inspect}"
|
46
|
+
super(msg)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
41
50
|
if defined? ActionView::Helpers::AssetUrlHelper
|
42
51
|
include ActionView::Helpers::AssetUrlHelper
|
43
52
|
include ActionView::Helpers::AssetTagHelper
|
@@ -121,6 +130,10 @@ module Sprockets
|
|
121
130
|
|
122
131
|
if environment = assets_environment
|
123
132
|
if asset = environment[path]
|
133
|
+
if self.raise_runtime_errors && path != asset.logical_path
|
134
|
+
raise AssetAliasUsed.new(path, asset.logical_path)
|
135
|
+
end
|
136
|
+
|
124
137
|
return asset.digest_path
|
125
138
|
end
|
126
139
|
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: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.4.5
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Sprockets Rails integration
|