Skip to content

Instantly share code, notes, and snippets.

@iain
Created February 13, 2009 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iain/63953 to your computer and use it in GitHub Desktop.
Save iain/63953 to your computer and use it in GitHub Desktop.
First try Rails template
# File management
run "rm README"
file "README.rdoc", "TODO add readme content"
run "cp config/database.yml config/database.example.yml"
run "rm public/index.html"
# RSpec as plugin, because it won't freeze easily as gem
plugin "rspec", :git => "git://github.com/dchelimsky/rspec.git"
plugin "rspec-rails", :git => "git://github.com/dchelimsky/rspec-rails.git"
generate :rspec
run "rm -r test/"
# Bunch of gems!
gem 'authlogic'
gem 'haml'
gem 'faker'
gem 'cucumber'
gem 'RedCloth', :lib => 'redcloth'
gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
gem 'thoughtbot-factory_girl', :lib => 'factory_girl', :source => 'http://gems.github.com'
gem 'brynary-webrat', :lib => 'webrat', :source => 'http://gems.github.com'
rake "gems:unpack"
rake "rails:freeze:gems"
generate :cucumber
# My favorite plugins
plugin "mr.-t", :git => "git://github.com/iain/mr.-t.git"
plugin "acts_as_translatable_model", :git => "git://github.com/iain/acts_as_translatable_model.git"
plugin "i18n_label", :git => "git://github.com/iain/i18n_label.git"
if yes?("Do you need to use subversion?")
plugin "rake_svn", :git => "git://github.com/iain/rake_svn.git"
rake "svn:init_rails" if system("svn info")
else
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
file ".gitignore", <<-END
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
END
git :init
git :add => '.', :commit => '-m "Initial Commit"'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment