Unified · Split
| @@ -215,18 +215,18 @@ class App < Sinatra::Application · 214 unmodified lines | |||
| 215 | end | 215 | end |
| 216 | 216 | ||
| 217 | digest = Sprockets::Manifest | 217 | digest = Sprockets::Manifest |
| 218 | .new(nil, App.assets_manifest_path) | 218 | .new(nil, App.assets_manifest_path) |
| 219 | .files | 219 | .files |
| 220 | .values | 220 | .values |
| 221 | .map {|file| file["digest"]} | 221 | .map {|file| file["digest"]} |
| 222 | .join | 222 | .join |
| 223 | 223 | ||
| 224 | return @@service_worker_cache_name ||= Digest::MD5.hexdigest(digest) | 224 | return @@service_worker_cache_name ||= Digest::MD5.hexdigest(digest) |
| 225 | else | 225 | else |
| 226 | paths = App.sprockets | 226 | paths = App.sprockets |
| 227 | .each_file | 227 | .each_file |
| 228 | .to_a | 228 | .to_a |
| 229 | .reject {|file| file.start_with?(App.docs_path)} | 229 | .reject {|file| file.start_with?(App.docs_path)} |
| 230 | 230 | ||
| 231 | return App.sprockets.pack_hexdigest(App.sprockets.files_digest(paths)) | 231 | return App.sprockets.pack_hexdigest(App.sprockets.files_digest(paths)) |
| 232 | end | 232 | end |