From 101fb42106db4e7e8221a3fec252e51dd84e0bb4 Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Sun, 2 Oct 2011 01:06:39 -0500 Subject: [PATCH] Print information about .railsrc to users --- railties/lib/rails/commands/application.rb | 1 + railties/lib/rails/generators/rails/app/USAGE | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb index dcd4c7a529..60d1aed73a 100644 --- a/railties/lib/rails/commands/application.rb +++ b/railties/lib/rails/commands/application.rb @@ -13,6 +13,7 @@ else if File.exist?(railsrc) extra_args_string = File.open(railsrc).read extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten + puts "Using #{extra_args.join(" ")} from #{railsrc}" ARGV << extra_args ARGV.flatten! end diff --git a/railties/lib/rails/generators/rails/app/USAGE b/railties/lib/rails/generators/rails/app/USAGE index 9e7a78d132..691095f33f 100644 --- a/railties/lib/rails/generators/rails/app/USAGE +++ b/railties/lib/rails/generators/rails/app/USAGE @@ -2,6 +2,12 @@ Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. + You can specify extra command-line arguments to be used every time + 'rails new' runs in the .railsrc configuration file in your home directory. + + Note that the arguments specified in the .railsrc file don't affect the + defaults values shown above in this help message. + Example: rails new ~/Code/Ruby/weblog