File tree Expand file tree Collapse file tree 4 files changed +310
-46
lines changed Expand file tree Collapse file tree 4 files changed +310
-46
lines changed Original file line number Diff line number Diff line change 1010require 'sprockets/path_utils'
1111require 'sprockets/resolve'
1212require 'sprockets/server'
13+ require 'sprockets/loader'
1314
1415module Sprockets
1516 # `Base` class for `Environment` and `Cached`.
@@ -48,9 +49,10 @@ def file_digest(path)
4849 # Caveat: Digests are cached by the path's current mtime. Its possible
4950 # for a files contents to have changed and its mtime to have been
5051 # negligently reset thus appearing as if the file hasn't changed on
51- # disk. Also, the mtime is only read to the nearest second. Its
52+ # disk. Also, the mtime is only read to the nearest second. It's
5253 # also possible the file was updated more than once in a given second.
53- cache . fetch ( "file_digest:#{ path } :#{ stat . mtime . to_i } " ) do
54+ key = UnloadedAsset . new ( path , self ) . file_digest_key ( stat . mtime . to_i )
55+ cache . fetch ( key ) do
5456 self . stat_digest ( path , stat )
5557 end
5658 end
Original file line number Diff line number Diff line change @@ -51,13 +51,6 @@ def add_dependency(uri)
5151 end
5252 alias_method :depend_on , :add_dependency
5353
54- # Internal: Resolve set of dependency URIs.
55- #
56- # Returns Array of resolved Objects.
57- def resolve_dependencies ( uris )
58- uris . map { |uri | resolve_dependency ( uri ) }
59- end
60-
6154 # Internal: Resolve dependency URIs.
6255 #
6356 # Returns resolved Object.
You can’t perform that action at this time.
0 commit comments