Permalink
Browse files

Remove deprecated code used only in Sprockets < 2.0.0.beta.15

  • Loading branch information...
1 parent a4b7363 commit e7a86b9027602c6a0fe065c7b1b9200f7de9910d @guilleiguaran committed Aug 31, 2011
Showing with 13 additions and 20 deletions.
  1. +13 −20 actionpack/lib/sprockets/assets.rake
@@ -23,29 +23,22 @@ namespace :assets do
manifest = {}
manifest_path = config.assets.manifest || target
- if env.respond_to?(:each_logical_path)
- config.assets.precompile.each do |path|
- env.each_logical_path do |logical_path|
- if path.is_a?(Regexp)
- next unless path.match(logical_path)
- else
- next unless File.fnmatch(path.to_s, logical_path)
- end
+ config.assets.precompile.each do |path|
+ env.each_logical_path do |logical_path|
+ if path.is_a?(Regexp)
+ next unless path.match(logical_path)
+ else
+ next unless File.fnmatch(path.to_s, logical_path)
+ end
- if asset = env.find_asset(logical_path)
- manifest[logical_path] = asset.digest_path
- filename = target.join(asset.digest_path)
- mkdir_p filename.dirname
- asset.write_to(filename)
- asset.write_to("#{filename}.gz") if filename.to_s =~ /\.(css|js)$/
- end
+ if asset = env.find_asset(logical_path)
+ manifest[logical_path] = asset.digest_path
+ filename = target.join(asset.digest_path)
+ mkdir_p filename.dirname
+ asset.write_to(filename)
+ asset.write_to("#{filename}.gz") if filename.to_s =~ /\.(css|js)$/
end
end
- else
- # TODO: Remove this once we're depending on sprockets beta 15
- assets = config.assets.precompile.dup
- assets << {:to => target}
- env.precompile(*assets)
end
File.open("#{manifest_path}/manifest.yml", 'w') do |f|

0 comments on commit e7a86b9

Please sign in to comment.