lib/couch/generators/application/application_generator.rb in couch-0.0.2 vs lib/couch/generators/application/application_generator.rb in couch-0.0.3
- old
+ new
@@ -1,13 +1,9 @@
module Couch::Generators
class ApplicationGenerator < Base
argument :app_path, :type => :string
- class_option :skip_git, :type => :boolean, :aliases => "-G", :default => false,
- :desc => "Skip Git ignores and keeps"
-
-
def create_root
self.destination_root = File.expand_path(app_path, destination_root)
empty_directory '.'
FileUtils.cd(destination_root) if File.directory?(destination_root)
@@ -15,11 +11,11 @@
def create_root_files
template "couchrc", ".couchrc"
copy_file "README"
copy_file "gitignore", ".gitignore" unless options[:skip_git]
- template "_id"
+ template "_id.js"
copy_file "validate_doc_update.js"
empty_directory_with_gitkeep "lists"
empty_directory_with_gitkeep "shows"
empty_directory_with_gitkeep "updates"
empty_directory_with_gitkeep "views"
@@ -41,13 +37,8 @@
@app_name ||= File.basename(destination_root)
end
def app_title
@app_title ||= app_name.humanize
- end
-
- def empty_directory_with_gitkeep(destination, config = {})
- empty_directory(destination, config)
- create_file("#{destination}/.gitkeep") unless options[:skip_git]
end
end
end