Added a couple more options to app generator.
This commit is contained in:
parent
615527dcb0
commit
b6f826376a
|
@ -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
|
||||
|
|
|
@ -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 '.'
|
||||
|
|
Loading…
Reference in New Issue