From 38f28f77049e7160491b71167471a2175253b742 Mon Sep 17 00:00:00 2001 From: Ersin Akinci Date: Fri, 24 Jul 2015 16:51:10 -0700 Subject: Only load statistics.rake once from inside engine When running rake stats from inside an engine, the engine's Rakefile attempts to reload statistics.rake after the test app loads it, which results in STATS_DIRECTORIES being redefined and an annoying warning. This patch skips loading statistics.rake from tasks.rb if rake's current scope isn't empty, i.e. if we are running from inside an engine and not the test app dir or a normal app. Fixes #20510. --- railties/CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'railties/CHANGELOG.md') 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 -- cgit v1.2.3