Skip to content

Instantly share code, notes, and snippets.

@hunter
Created February 5, 2009 12:45
Show Gist options
  • Save hunter/58694 to your computer and use it in GitHub Desktop.
Save hunter/58694 to your computer and use it in GitHub Desktop.
# syndeo_template.rb
# from Hunter Nield
# Creates a new rails application using git
# rails:rm_tmp_dirs
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f|
run("rmdir ./#{f}")
end
# git:hold_empty_dirs
run("find . \\( -type d -empty \\) -and \\( -not -regex ./\\.git.* \\) -exec touch {}/.gitignore \\;")
# git:rails:new_app
git :init
initializer '.gitignore', <<-CODE
log/\\*.log
log/\\*.pid
db/\\*.db
db/\\*.sqlite3
db/schema.rb
tmp/\\*\\*/\\*
.DS_Store
doc/api
doc/app
config/database.yml
CODE
run "cp config/database.yml config/database.yml.sample"
git :add => "."
git :commit => "-a -m 'Setting up a new rails app. Copy config/database.yml.sample to config/database.yml and customize.'"
# gem 'rubyist-aasm', :source => "http://gems.github.com"
gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
gem "authlogic"
gem "mbleigh-acts-as-taggable-on", :source => "http://gems.github.com", :lib => "acts-as-taggable-on"
gem "webrat"
gem 'rspec', :lib => "spec"
#gem 'rspec-rails', :lib => "spec/rails"
#gem "aslakhellesoy-cucumber", :source => "http://gems.github.com", :lib => "cucumber"
rake("gems:install", :sudo => true)
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'rpx_now', :git => "git://github.com/grosser/rpx_now.git"
plugin 'jrails', :git => "git://github.com/aaronchi/jrails.git"
plugin 'headliner', :git => "git://github.com/mokolabs/headliner.git"
plugin 'flash-message-conductor', :git => "git://github.com/planetargon/flash-message-conductor.git"
generate("session", "user_session")
generate("rspec")
generate("cucumber")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment