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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a500788d5205aab0ae2737cd77ed4286ee713c4c
4
- data.tar.gz: 4bab31e54846ed9bdf3cfa2d0054cbdb16b8d2b9
3
+ metadata.gz: 297298e54e64641392c2f8f338ee0f23f2bcdb32
4
+ data.tar.gz: ac1d41b39342e7e737e0d5708316bbdd3fbcabd7
5
5
  SHA512:
6
- metadata.gz: 621a78c415f8ae641d28ad7a06de570c60aae770b7390abfe448aedc270a0908e33472d5a208cb029f3b6d42cad4199f19643860641b3def9f24eb2f16986797
7
- data.tar.gz: e03f4b9d4ff4b11a55725fe8a92e7f0f3ee3ca8cf5d7cf705ffcf821797f5ac8725c34b96869df0687342d9f2e77d3571306f36a0b12a1bd1e45b970e1a8acc7
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
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Rails
3
- VERSION = "2.2.4"
3
+ VERSION = "2.3.0"
4
4
  end
5
5
  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.2.4
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-01-22 00:00:00.000000000 Z
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.2.2
152
+ rubygems_version: 2.4.5
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Sprockets Rails integration