fix bundle_fu to handle relative roots

applied pending patches from bundle_fu issues 3 and 6
reverted previous workaround in standard.css for relative roots
This commit is contained in:
Reinier Balt 2009-02-07 20:09:09 +01:00
parent d41c369f09
commit 48fb00b24e
3 changed files with 38 additions and 31 deletions

View file

@ -9,10 +9,11 @@ class BundleFu
def bundle_files(filenames=[])
output = ""
filenames.each{ |filename|
output << "/* --------- #{filename} --------- */ "
filename_no_root = filename.sub(/^#{ActionController::Base.relative_url_root}/, '')
output << "/* --------- #{filename} - #{filename_no_root} --- ------ */ "
output << "\n"
begin
content = (File.read(File.join(RAILS_ROOT, "public", filename)))
content = (File.read(File.join(RAILS_ROOT, "public", filename_no_root)))
rescue
output << "/* FILE READ ERROR! */"
next