Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add bytesize to manifest

  • Loading branch information...
commit 7c59834de683132bca2564878644c8f4e5eedd17 1 parent 4f611d2
@josh josh authored
Showing with 3 additions and 0 deletions.
  1. +1 −0  lib/sprockets/manifest.rb
  2. +2 −0  test/test_manifest.rb
View
1  lib/sprockets/manifest.rb
@@ -91,6 +91,7 @@ def compile(*args)
files[asset.digest_path] = {
'logical_path' => asset.logical_path,
'mtime' => asset.mtime.iso8601,
+ 'size' => asset.bytesize,
'digest' => asset.digest
}
assets[asset.logical_path] = asset.digest_path
View
2  test/test_manifest.rb
@@ -50,6 +50,8 @@ def teardown
data = JSON.parse(File.read(@manifest.path))
assert data['files'][digest_path]
+ assert_equal "application.js", data['files'][digest_path]['logical_path']
+ assert_equal 226, data['files'][digest_path]['size']
assert_equal digest_path, data['assets']['application.js']
end
Please sign in to comment.
Something went wrong with that request. Please try again.