Skip to content

Instantly share code, notes, and snippets.

@andrew
Created October 10, 2010 10:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrew/619123 to your computer and use it in GitHub Desktop.
Save andrew/619123 to your computer and use it in GitHub Desktop.
rails 3 template
# 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