diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-20 18:00:32 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-20 18:00:32 +0000 |
commit | 7a101c1fc3c6a255ef7fed9fdb0830590a035ffb (patch) | |
tree | 7013cabf0a7a76caef96d66e7b98c3b1459b492e /railties/lib/rails_generator | |
parent | b5d264effae63c36f8daed0eba4c3831e55df42e (diff) | |
download | rails-7a101c1fc3c6a255ef7fed9fdb0830590a035ffb.tar.gz rails-7a101c1fc3c6a255ef7fed9fdb0830590a035ffb.tar.bz2 rails-7a101c1fc3c6a255ef7fed9fdb0830590a035ffb.zip |
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
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/options.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/options.rb b/railties/lib/rails_generator/options.rb index 8301f5c5b5..4329f930a3 100644 --- a/railties/lib/rails_generator/options.rb +++ b/railties/lib/rails_generator/options.rb @@ -118,6 +118,11 @@ module Rails # 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 @@ module Rails 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 |