Permalink
Browse files

Add bytesize to manifest

  • Loading branch information...
1 parent 4f611d2 commit 7c59834de683132bca2564878644c8f4e5eedd17 @josh josh committed Feb 11, 2012
Showing with 3 additions and 0 deletions.
  1. +1 −0 lib/sprockets/manifest.rb
  2. +2 −0 test/test_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
@@ -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

0 comments on commit 7c59834

Please sign in to comment.