Created
May 12, 2010 18:26
-
-
Save danieljohnmorris/398936 to your computer and use it in GitHub Desktop.
r3 app tpl - obvious stuff ie. remove public.html etc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage (in app dir): | |
# rake rails:template LOCATION=http://gist.github.com/398938.txt | |
# make a sensible gitignore | |
file ".gitignore", <<-EOF | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
db/schema.rb | |
EOF | |
# Stub readme file | |
run "echo TODO > README" | |
# get rid of logs before adding files to git | |
run "rm log/*.log" | |
# setup git repo, make sure some folders ignored, and move db.yml to sample conf (leaving actual unversioned) | |
git :init | |
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore .bundle/.gitignore" | |
run "cp config/database.yml config/example_database.yml" | |
git :add => ".", :commit => "-m 'initial commit.'" | |
# TODO - Could move home controller into an optional 'yes?' block, or make the name assigned through 'ask' | |
# setup initial controller & remove public.html | |
generate :controller, "home index" | |
route "map.root :controller => 'home'" | |
git :rm => "public/index.html" | |
git :add => ".", :commit => "-m 'adding home controller.'" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment