提交 7a101c1f 编写于 作者: J Jeremy Kemper

Include rails -v / rails --version in app generator usage. Closes #5440.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4471 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 b5d264ef
......@@ -117,6 +117,11 @@ def add_options!(opt)
# Adds general options like -h and --quiet. Usually don't override.
def add_general_options!(opt)
opt.separator ''
opt.separator 'Rails Info:'
opt.on('-v', '--version', 'Show the Rails version number and quit.')
opt.on('-h', '--help', 'Show this help message and quit.') { |options[:help]| }
opt.separator ''
opt.separator 'General Options:'
......@@ -125,7 +130,6 @@ def add_general_options!(opt)
opt.on('-s', '--skip', 'Skip files that already exist.') { options[:collision] = :skip }
opt.on('-q', '--quiet', 'Suppress normal output.') { |options[:quiet]| }
opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |options[:backtrace]| }
opt.on('-h', '--help', 'Show this help message.') { |options[:help]| }
opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do
options[:svn] = `svn status`.inject({}) do |opt, e|
opt[e.chomp[7..-1]] = true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册