Skip to content

Commit

Permalink
Added a couple more options to app generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jun 19, 2009
1 parent 615527d commit b6f8263
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion railties/bin/rails
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions railties/lib/generator/generators/app.thor
Original file line number Diff line number Diff line change
Expand Up @@ -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 '.'
Expand Down

0 comments on commit b6f8263

Please sign in to comment.