Added a couple more options to app generator.

This commit is contained in:
José Valim 2009-06-17 12:38:27 +02:00
parent 615527dcb0
commit b6f826376a
2 changed files with 8 additions and 1 deletions

View File

@ -17,4 +17,4 @@ require 'rails_generator/scripts/generate'
Rails::Generator::Base.use_application_sources!
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze
Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze

View File

@ -37,6 +37,13 @@ module Rails::Generators
class_option :no_prototype, :type => :boolean, :aliases => "-P", :default => false,
:desc => "Do not generate Prototype files"
# Add Rails options
class_option :version, :type => :boolean, :aliases => "-v", :group => :rails,
:desc => "Show Rails version number and quit"
class_option :help, :type => :boolean, :aliases => "-h", :group => :rails,
:desc => "Show this help message and quit"
def create_root
self.root = File.expand_path(app_path, root)
empty_directory '.'