diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-06 17:34:41 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-06 17:34:41 -0300 |
commit | 7c23c38b3317da7dee166ddaa5e492aa1d7b5759 (patch) | |
tree | e3d5caa379e9ce92a5719e315da9babcc85e0c77 | |
parent | ce1bd47698d63119d8a922620d1ae1c30c9ba2db (diff) | |
parent | 38f28f77049e7160491b71167471a2175253b742 (diff) | |
download | rails-7c23c38b3317da7dee166ddaa5e492aa1d7b5759.tar.gz rails-7c23c38b3317da7dee166ddaa5e492aa1d7b5759.tar.bz2 rails-7c23c38b3317da7dee166ddaa5e492aa1d7b5759.zip |
Merge pull request #21022
Fix STATS_DIRECTORIES warning by only loading statistics.rake once
-rw-r--r-- | railties/CHANGELOG.md | 9 | ||||
-rw-r--r-- | railties/lib/rails/tasks.rb | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 642fd90ae1..734fe8bc7a 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,4 +1,11 @@ -* Make enabling or disabling caching in development mode possible with +* Fix STATS_DIRECTORIES already defined warning when running rake from within + the top level directory of an engine that has a test app. + + Fixes #20510 + + *Ersin Akinci* + +* Make enabling or disabling caching in development mode possible with rake dev:cache. Running rake dev:cache will create or remove tmp/caching-dev.txt. When this diff --git a/railties/lib/rails/tasks.rb b/railties/lib/rails/tasks.rb index c029dbcf82..d3e33584d7 100644 --- a/railties/lib/rails/tasks.rb +++ b/railties/lib/rails/tasks.rb @@ -11,8 +11,9 @@ require 'rake' misc restart routes - statistics tmp -).each do |task| +).tap { |arr| + arr << 'statistics' if Rake.application.current_scope.empty? +}.each do |task| load "rails/tasks/#{task}.rake" end |