# 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!"