-
-
Save surkin/60406 to your computer and use it in GitHub Desktop.
rails 2.3 template on heroku
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
# Based on: | |
# SUPER DARING APP TEMPLATE 1.0 | |
# By Peter Cooper | |
# | |
# Template for www.heroku.com with Rails 2.3 support | |
# Freeze gems of rails 2.3 | |
rake('rails:freeze:gems') | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" | |
run "rm public/robots.txt" | |
# Set up git repository | |
git :init | |
git :add => '.' | |
# Copy database.yml for distribution use | |
# run "cp config/database.yml config/database.yml.example" | |
# Set up .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/**/* | |
db/*.sqlite3 | |
END | |
# Install submoduled plugins | |
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git', :submodule => true | |
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git', :submodule => true | |
# Install all gems | |
gem 'thoughtbot-factory_girl', :lib => 'factory_girl', :source => 'http://gems.github.com' | |
gem 'sqlite3-ruby', :lib => 'sqlite3' | |
gem 'hpricot', :source => 'http://code.whytheluckystiff.net' | |
# gem 'RedCloth', :lib => 'redcloth' | |
gem 'rack', :version => '0.9.1' | |
# rake('gems:install', :sudo => true) | |
rake('gems:unpack:dependencies') | |
# Set up RSpec, etc, and run migrations | |
generate("rspec") | |
rake('db:migrate') | |
# Initialize submodules | |
git :submodule => "init" | |
# Commit all work so far to the repository | |
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