Created
March 10, 2010 14:23
-
-
Save epid/327906 to your computer and use it in GitHub Desktop.
Base Template for Rails Projects
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
# Setup git repository | |
git :init | |
# Setup .gitignore files | |
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore" | |
run %{find . -type d -empty | grep -v "vendor" | grep -v ".git" | grep -v "tmp" | xargs -I xxx touch xxx/.gitignore} | |
file '.gitignore', <<-END | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
END | |
run "perl -i -pe 's/UTC/Central Time (US \\& Canada)/' config/environment.rb" if yes?("Change to Central Time?") | |
run "perl -i -pe 's/^end/\\n # Use old style migration numbering\\n config.active_record.timestamped_migrations = false\\n\\nend/' config/environment.rb" if yes?("Old migration numbering?") | |
# Remove unnecessary files | |
run "rm README" | |
git :add => "." | |
git :commit => "-m 'Initial commit'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment