# Create Git repository
git :init
# Create database and schema
rake "db:create:all"
rake "db:schema:dump"
# Create ignore files
["tmp/.gitignore", "log/.gitignore"].each do |path|
file path, "*"
git :add => "-f #{path}"
end
file "db/.gitignore", "*.sqlite3"
file "README", "Another Outstanding Point Slope Application"
# Gems
gem 'haml-edge', :version => '2.1.24', :lib => 'haml'
gem 'authlogic', :version => '2.0.13'
gem 'mislav-will_paginate', :version => '2.3.11', :lib => 'will_paginate'
gem 'thoughtbot-shoulda', :lib => 'shoulda/rails', :version => '2.10.1'
gem 'thoughtbot-factory_girl', :lib => 'factory_girl', :version => '1.2.1'
# Setup HAML
run "haml --rails ."
# Setup Compass
run "yes | compass --rails -f blueprint ."
# Create a Compass-ready application layout
application_layout = <<EOF
!!!
%html
%head
%title= (yield(:title) || 'Welcome')
= stylesheet_link_tag 'compiled/application.css', :media => 'screen, projection'
= stylesheet_link_tag 'compiled/print.css', :media => 'print'
/[if IE]
= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
%body
.container
EOF
file "app/views/layouts/application.html.haml", application_layout
# Make application helper more useful
application_helper = <<EOF
module ApplicationHelper
def title(content)
content_for :title, content
end
end
EOF
file "app/helpers/application_helper.rb", application_helper
# Add Capistrano deployment support
run "capify ."
git :add => "."
git :ci => "-m 'Setup default Point Slope Rails stack'"