Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 7a101c1fc3c6a255ef7fed9fdb0830590a035ffb 1 parent b5d264e
@jeremy jeremy authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 railties/lib/rails_generator/options.rb
View
6 railties/lib/rails_generator/options.rb
@@ -118,6 +118,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:'
opt.on('-p', '--pretend', 'Run but do not make any changes.') { |options[:pretend]| }
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.