Permalink
Browse files

setup git

  • Loading branch information...
xdite committed Oct 7, 2012
1 parent f6a2182 commit 12e1e409b782f0b03292ba68af2b1a7fc22f65b3
Showing with 37 additions and 0 deletions.
  1. +15 −0 lib/bootstrapers/app_builder.rb
  2. +15 −0 lib/bootstrapers/generators/app_generator.rb
  3. +7 −0 templates/bootstrapers_gitignore
@@ -72,5 +72,20 @@ def remove_routes_comment_lines
replace_in_file 'config/routes.rb', /Application\.routes\.draw do.*end/m, "Application.routes.draw do\nend"
end
def gitignore_files
concat_file 'bootstrapers_gitignore', '.gitignore'
['app/models',
'app/assets/images',
'app/views/pages',
'db/migrate',
'log',
].each do |dir|
empty_directory_with_gitkeep dir
end
end
def init_git
run 'git init'
end
end
end
@@ -25,6 +25,7 @@ def bootstrapers_customization
invoke :setup_stylesheets
invoke :remove_routes_comment_lines
invoke :setup_root_route
invoke :setup_git
end
def remove_files_we_dont_need
@@ -95,6 +96,20 @@ def setup_root_route
build :setup_root_route
end
def setup_git
say 'Initializing git'
invoke :setup_gitignore
invoke :init_git
end
def setup_gitignore
build :gitignore_files
end
def init_git
build :init_git
end
protected
def get_builder_class
@@ -0,0 +1,7 @@
*.DS_Store
*.swp
.env
public/uploads
vendor/bundler_gems
config/database.yml
config/config.yml

0 comments on commit 12e1e40

Please sign in to comment.