Browse files

Sort the files in the manifest before generating the key to ensure a …

…consistent manifest across multiple processes.
  • Loading branch information...
1 parent 4b92a41 commit 1af5e6e00597692c975270f7770fb2a6250f5dcf @dsrw dsrw committed Feb 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/offline.rb
View
2 lib/rack/offline.rb
@@ -72,7 +72,7 @@ def call(env)
private
def precache_key!
- hash = @config.cache.map do |item|
+ hash = @config.cache.sort!.map do |item|
path = @root.join(item)
Digest::SHA2.hexdigest(path.read) if ::File.file?(path)
end

0 comments on commit 1af5e6e

Please sign in to comment.