diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-15 19:57:52 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-15 19:57:52 +0200 |
commit | afc828828ffffe7edeb4648a9d2aa4731191ae21 (patch) | |
tree | 8c85af7b1c0fa7fe1612d18f6d4573494f1d783b /railties/lib/rails/tasks | |
parent | d84b2f37d018621aea99bfe30611ab75a02a291a (diff) | |
download | rails-afc828828ffffe7edeb4648a9d2aa4731191ae21.tar.gz rails-afc828828ffffe7edeb4648a9d2aa4731191ae21.tar.bz2 rails-afc828828ffffe7edeb4648a9d2aa4731191ae21.zip |
Remove the ability for engines to serve assets from the public directory.
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r-- | railties/lib/rails/tasks/railties.rake | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/railties/lib/rails/tasks/railties.rake b/railties/lib/rails/tasks/railties.rake deleted file mode 100644 index 7d2170dd30..0000000000 --- a/railties/lib/rails/tasks/railties.rake +++ /dev/null @@ -1,29 +0,0 @@ -namespace :railties do - namespace :install do - # desc "Copies missing assets from Railties (e.g. plugins, engines). You can specify Railties to use with FROM=railtie1,railtie2" - task :public => :rails_env do - require 'rails/generators/base' - Rails.application.initialize! - - to_load = ENV["FROM"].blank? ? :all : ENV["FROM"].split(",").map {|n| n.strip } - app_public_path = Rails.application.paths["public"].first - - Rails.application.railties.all do |railtie| - next unless to_load == :all || to_load.include?(railtie.railtie_name) - - if railtie.respond_to?(:paths) && (path = railtie.paths["public"].first) && - (assets_dir = railtie.config.compiled_asset_path) && File.exist?(path) - - Rails::Generators::Base.source_root(path) - copier = Rails::Generators::Base.new - Dir[File.join(path, "**/*")].each do |file| - relative = file.gsub(/^#{path}\//, '') - if File.file?(file) - copier.copy_file relative, File.join(app_public_path, assets_dir, relative) - end - end - end - end - end - end -end |