diff options
author | Naoto Kaneko <naoty.k@gmail.com> | 2015-03-14 01:41:21 +0900 |
---|---|---|
committer | Naoto Kaneko <naoty.k@gmail.com> | 2015-03-14 01:41:21 +0900 |
commit | baa9ffb82238a3d586a9213db0dbdc971de06037 (patch) | |
tree | fff0a321968095dfb58c443e5676139d31f62ecd /railties | |
parent | 5c83f51740201f1976c8bdcdecce46947bab6e0f (diff) | |
download | rails-baa9ffb82238a3d586a9213db0dbdc971de06037.tar.gz rails-baa9ffb82238a3d586a9213db0dbdc971de06037.tar.bz2 rails-baa9ffb82238a3d586a9213db0dbdc971de06037.zip |
Add `rake initializer`
This task prints out initializers for an application. It is useful to
develop a rubygem which involves the initialization process.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG.md | 7 | ||||
-rw-r--r-- | railties/lib/rails/tasks.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/tasks/initializer.rake | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index cb85401920..b538c81428 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,10 @@ +* Add `rake initializer` + + This task prints out initializers for an application. It is useful to + develop a rubygem which involves the initialization process. + + *Naoto Kaneko* + * Created rake restart task. Restarts your Rails app by touching the `tmp/restart.txt`. diff --git a/railties/lib/rails/tasks.rb b/railties/lib/rails/tasks.rb index a5e4d2935e..5dfc96894c 100644 --- a/railties/lib/rails/tasks.rb +++ b/railties/lib/rails/tasks.rb @@ -4,6 +4,7 @@ require 'rake' %w( annotations framework + initializer log middleware misc diff --git a/railties/lib/rails/tasks/initializer.rake b/railties/lib/rails/tasks/initializer.rake new file mode 100644 index 0000000000..83b9dc6b71 --- /dev/null +++ b/railties/lib/rails/tasks/initializer.rake @@ -0,0 +1,6 @@ +desc "Prints out initializers for your application" +task initializer: :environment do + Rails.application.initializers.tsort_each do |initializer| + puts initializer.name + end +end |