lib/sprockets/context.rb in sprockets-3.0.0.beta.5 vs lib/sprockets/context.rb in sprockets-3.0.0.beta.6

- old
+ new

@@ -117,11 +117,15 @@ def resolve(path, options = {}) _resolve(:resolve, path, options) end def locate(path, options = {}) - _resolve(:locate, path, options) + if AssetURI.valid?(path) + path + else + _resolve(:locate, path, options) + end end # `depend_on` allows you to state a dependency on a file without # including it. # @@ -163,10 +167,10 @@ # `stub_asset` blacklists `path` from being included in the bundle. # `path` must be an asset which may or may not already be included # in the bundle. def stub_asset(path) - @stubbed << @environment.locate(path, accept: @content_type, bundle: false) + @stubbed << locate(path, accept: @content_type, bundle: false) nil end # `link_asset` declares an external dependency on an asset without directly # including it. The target asset is returned from this function making it