johnreilly (owner)

Revisions

gist: 93703 Download_button fork
public
Public Clone URL: git://gist.github.com/93703.git
Embed All Files: show embed
git_template.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
### Get rid of unneeded files
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f|
  run("rmdir #{f}")
end
 
["./README", "./doc/README_FOR_APP", "./public/index.html", "./public/favicon.ico", "./public/images/rails.png", "./public/robots.txt"].each do |f|
  run("rm #{f}")
end
 
### Don't ignore empty directories
run("find . \\( -type d -empty \\) -and \\( -not -regex ./\\.git.* \\) -exec touch {}/.gitignore \\;")
 
### Create sample db config
run "cp config/database.yml config/database.yml.sample"
 
### Set up .gitignore file
run "echo \"log/*.log
log/*.pid
db/*.db
db/*.sqlite3
tmp/**/*
.DS_Store
doc/api
doc/app
config/database.yml\" > .gitignore"
 
### Git 'er up.
git :init
git :add => "."
git :commit => "-a -m 'Initial commit.'"