From 9e80c29cd5f82359730e7e7474c24b8ab844549d Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Fri, 20 Mar 2015 15:51:01 -0700 Subject: [PATCH] `rake initializer` -> `rake initializers` Also edited the copy to be more consistent with `rake routes`. See #19323. --- railties/CHANGELOG.md | 9 +++++---- railties/lib/rails/tasks.rb | 2 +- .../rails/tasks/{initializer.rake => initializers.rake} | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) rename railties/lib/rails/tasks/{initializer.rake => initializers.rake} (61%) diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index f4a8cf86b6..595a50dbdc 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -5,14 +5,15 @@ *arthurnn* -* Add `rake initializer` +* Add `rake initializers` - This task prints out initializers for an application. It is useful to - develop a rubygem which involves the initialization process. + This task prints out all defined initializers in the order they are invoked + by Rails. This is helpful for debugging issues related to the initialization + process. *Naoto Kaneko* -* Created rake restart task. Restarts your Rails app by touching the +* Created rake restart task. Restarts your Rails app by touching the `tmp/restart.txt`. Fixes #18876. diff --git a/railties/lib/rails/tasks.rb b/railties/lib/rails/tasks.rb index 5dfc96894c..2c3d278eca 100644 --- a/railties/lib/rails/tasks.rb +++ b/railties/lib/rails/tasks.rb @@ -4,7 +4,7 @@ require 'rake' %w( annotations framework - initializer + initializers log middleware misc diff --git a/railties/lib/rails/tasks/initializer.rake b/railties/lib/rails/tasks/initializers.rake similarity index 61% rename from railties/lib/rails/tasks/initializer.rake rename to railties/lib/rails/tasks/initializers.rake index 83b9dc6b71..c9d1b671b1 100644 --- a/railties/lib/rails/tasks/initializer.rake +++ b/railties/lib/rails/tasks/initializers.rake @@ -1,4 +1,4 @@ -desc "Prints out initializers for your application" +desc "Print out all defined initializers in the order they are invoked by Rails." task initializer: :environment do Rails.application.initializers.tsort_each do |initializer| puts initializer.name