Created
October 10, 2010 10:20
-
-
Save andrew/619123 to your computer and use it in GitHub Desktop.
rails 3 template
This file contains 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
# Delete unnecessary files | |
run "rm public/index.html" | |
run "rm app/views/layouts/application.html.erb" | |
run "rm public/favicon.ico" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/application.js" | |
run "rm public/javascripts/prototype.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/controls.js" | |
run "rm public/javascripts/rails.js" | |
# Copy database.yml for distribution use | |
run "cp config/database.yml config/database.yml.example" | |
file '.rvmrc', 'rvm 1.8.7@rails3' | |
# Commands | |
run "curl -L http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js > public/javascripts/jquery.js" | |
run "curl -L http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js" | |
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore" | |
# add a layout | |
run "touch app/views/layouts/application.html.haml" | |
# make some stylesheets | |
inside('public/stylesheets/sass') do | |
run "curl -L http://gist.github.com/629161.txt > reset.sass" | |
run "touch application.sass" | |
end | |
# Set up git repository and Commit all work so far to the repository | |
file '.gitignore', <<-END | |
.DS_Store | |
.bundle | |
log/*.log | |
tmp/**/* | |
config/*.sphinx.conf | |
db/*.sqlite3 | |
db/schema.rb | |
db/sphinx/**/* | |
log/*.pid | |
public/system/**/* | |
public/stylesheets/*.css | |
tmp/restart.txt | |
coverage/ | |
coverage.data | |
datadumps | |
*.tmproj | |
tmtags | |
*~ | |
\#* | |
.\#* | |
*.swp | |
rdoc | |
pkg | |
END | |
git :init | |
git :add => '.' | |
git :commit => "-a -m 'Initial commit'" | |
# Success! | |
puts "SUCCESS!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment