Skip to content

Commit

Permalink
Fix RAILS_ASSET_ID being inserted before opening quotation in CSS url…
Browse files Browse the repository at this point in the history
…(). Closes #2.
  • Loading branch information
jgarber committed Apr 15, 2010
1 parent ff2cd1d commit 5ca7cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/morning_glory.rake
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace :morning_glory do
DIRECTORIES.each do |directory|
Dir[File.join(TEMP_DIRECTORY, directory, '**', "*.{css}")].each do |file|
puts " ** Renaming image references within #{file}"
buffer = File.new(file,'r').read.gsub(REGEX_ROOT_RELATIVE_CSS_URL) { |m| m.insert m.index('(') + 1, '/'+ENV['RAILS_ASSET_ID'] }
buffer = File.new(file,'r').read.gsub(REGEX_ROOT_RELATIVE_CSS_URL) { |m| m.insert m.index('(') + ($1 ? 2 : 1), '/'+ENV['RAILS_ASSET_ID'] }
File.open(file,'w') {|fw| fw.write(buffer)}
end
end
Expand Down

0 comments on commit 5ca7cd1

Please sign in to comment.