lib/padrino-gen/generators/app.rb in padrino-gen-0.5.0 vs lib/padrino-gen/generators/app.rb in padrino-gen-0.6.1

- old
+ new

@@ -17,18 +17,24 @@ include Padrino::Generators::Components::Actions desc "Description:\n\n\tpadrino-gen project generates a new Padrino project" argument :name, :desc => "The name of your padrino project" - argument :path, :desc => "The path to create your padrino project" + argument :path, :desc => "The path to create your padrino project", :default => "." class_option :run_bundler, :aliases => '-b', :default => false, :type => :boolean # Definitions for the available customizable components component_option :orm, "database engine", :aliases => '-d', :choices => [:datamapper, :mongomapper, :activerecord, :sequel, :couchrest] component_option :test, "testing framework", :aliases => '-t', :choices => [:bacon, :shoulda, :rspec, :testspec, :riot] component_option :mock, "mocking library", :aliases => '-m', :choices => [:mocha, :rr] component_option :script, "javascript library", :aliases => '-s', :choices => [:jquery, :prototype, :rightjs] component_option :renderer, "template engine", :aliases => '-r', :choices => [:erb, :haml] + + # Show help if no argv given + def self.start(given_args=ARGV, config={}) + given_args = ["-h"] if given_args.empty? + super + end # Copies over the Padrino base application App def setup_app self.destination_root = File.join(path, name) @class_name = name.classify