1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Print information about .railsrc to users

This commit is contained in:
Guillermo Iguaran 2011-10-02 01:06:39 -05:00
parent 7039def6e1
commit 101fb42106
2 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@ else
if File.exist?(railsrc) if File.exist?(railsrc)
extra_args_string = File.open(railsrc).read extra_args_string = File.open(railsrc).read
extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten
puts "Using #{extra_args.join(" ")} from #{railsrc}"
ARGV << extra_args ARGV << extra_args
ARGV.flatten! ARGV.flatten!
end end

View file

@ -2,6 +2,12 @@ Description:
The 'rails new' command creates a new Rails application with a default The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify. 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: Example:
rails new ~/Code/Ruby/weblog rails new ~/Code/Ruby/weblog