lib/generators/skeleton.rb in padrino-gen-0.1.1 vs lib/generators/skeleton.rb in padrino-gen-0.1.2
- old
+ new
@@ -3,34 +3,34 @@
module Padrino
module Generators
class Skeleton < Thor::Group
# Define the source template root
def self.source_root; File.dirname(__FILE__); end
- def self.banner; "padrino-gen [app_name] [path] [options]"; end
+ def self.banner; "padrino-gen project [name] [path] [options]"; end
# Include related modules
include Thor::Actions
include Padrino::Generators::Actions
include Padrino::Generators::Components::Actions
- desc "Description:\n\n\tpadrino-gen generate a Padrino skeleton or application."
+ desc "Description:\n\n\tpadrino-gen project generates a new Padrino project"
- argument :name, :desc => "The name of your sinatra app"
- argument :path, :desc => "The path to create your app"
+ argument :name, :desc => "The name of your padrino project"
+ argument :path, :desc => "The path to create your padrino project"
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]
- # Copies over the base sinatra starting application
+ # Copies over the base sinatra starting project
def setup_skeleton
self.destination_root = File.join(path, name)
@class_name = name.classify
- directory("project/", self.destination_root)
+ directory("skeleton/", self.destination_root)
store_component_config('.components')
end
# For each component, retrieve a valid choice and then execute the associated generator
def setup_components