Permalink
Browse files

from compressing algorithm, removed adding of timestamps to images in…

… css as was causing issue with many many images do not exist(neglected css) or remote images
  • Loading branch information...
1 parent b4512ac commit 000a51d7e73749005f8c03361eaca89c2db521d8 @zaczheng committed Sep 24, 2011
Showing with 10 additions and 10 deletions.
  1. +10 −10 lib/synthesis/asset_package.rb
@@ -211,20 +211,20 @@ def compress_css(source)
source.gsub!(/; \}/, "}") # trim inside brackets
# add timestamps to images in css
- source.gsub!(/url\(['"]?([^'"\)]+?(?:gif|png|jpe?g))['"]?\)/i) do |match|
+ # source.gsub!(/url\(['"]?([^'"\)]+?(?:gif|png|jpe?g))['"]?\)/i) do |match|
- file = $1
- path = File.join(Rails.root, 'public')
+ # file = $1
+ # path = File.join(Rails.root, 'public')
- if file.starts_with?('/')
- path = File.join(path, file)
- else
- path = File.join(path, 'stylesheets', file)
- end
+ # if file.starts_with?('/')
+ # path = File.join(path, file)
+ # else
+ # path = File.join(path, 'stylesheets', file)
+ # end
- match.gsub(file, "#{file}?#{File.new(path).mtime.to_i}")
- end
+ # match.gsub(file, "#{file}?#{File.new(path).mtime.to_i}")
+ # end
source
end

0 comments on commit 000a51d

Please sign in to comment.