Skip to content

Instantly share code, notes, and snippets.

@elomar
Forked from andersondias/template.rb
Created May 14, 2009 02:12
Show Gist options
  • Save elomar/111430 to your computer and use it in GitHub Desktop.
Save elomar/111430 to your computer and use it in GitHub Desktop.
# template.rb
# from Anderson Dias
#====================
# PLUGINS
#====================
# Testing
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'cucumber', :git => 'git://github.com/aslakhellesoy/cucumber.git'
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git'
# Auth
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git'
plugin 'role_requirement', :git => 'git://github.com/timcharper/role_requirement.git'
# Others
plugin 'hoptoad_notifier', :git => 'git://github.com/thoughtbot/hoptoad_notifier.git'
plugin 'asset_packager', :git => 'git://github.com/sbecker/asset_packager.git'
plugin 'squirrel', :git => 'git://github.com/thoughtbot/squirrel.git'
plugin 'i18n_label', :git => 'git://github.com/iain/i18n_label.git'
plugin 'aasm', :git => 'git://github.com/rubyist/aasm.git'
#====================
# GEMS
#====================
# Testing
if yes?('Do you want to use machinist instead of factory_girl?')
gem 'notahat-machinist ', :source => 'http://gems.github.com'
else
gem 'thoughtbot-factory_girl', :source => 'http://gems.github.com'
end
gem 'remarkable_rails'
gem 'rcov'
# Others
gem 'mislav-will_paginate', :source => "http://gems.github.com"
gem 'thoughtbot-pacecar', :source => 'http://gems.github.com'
gem 'haml'
# ====================
# TEST
# ====================
inside ('test') do
run 'mkdir factories'
end
# ====================
# FINALIZE
# ====================
# Delete unnecessary files
run 'rm README'
run 'rm public/index.html'
run 'rm public/robots.txt'
run 'rm public/favicon.ico'
run 'rm public/images/rails.png'
run 'rm -f public/javascripts/*'
# Initialize app
rake('gems:install', :sudo => true)
rake('gems:unpack')
generate :rspec
generate :cucumber
generate :authenticated, 'user session'
generate :roles, 'Role User'
# Git
file '.gitignore', <<-GITIGNORE
log/\\*.log
log/\\*.pid
db/\\*.db
db/\\*.sqlite3
db/schema.rb
tmp/\\*\\*/\\*
.DS_Store
ToDo
tmp/**/*
sphinx/*.sp*
coverage
# Other useful tidbits
.DS_Store
doc/api
doc/app
# Config files
config/pa_billing.yml
config/database.yml
# database schema
db/schema.rb
GITIGNORE
run 'find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;'
git :init
git :add => '.'
git :commit => '-a -m "Initial project commit"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment