Created
September 4, 2009 21:51
-
-
Save ariejan/181167 to your computer and use it in GitHub Desktop.
Rails 2.3.x template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Rails 2.3.x template will create a new git-based Rails project | |
# with Cucumber, RSpec and Remarkable pre-installed and ready to go. | |
# | |
# (C) 2009 under the MIT License by Ariejan de Vroom <[email protected]> | |
# | |
# USAGE: | |
# rails -d mysql -m http://gist.github.com/181167.txt APP_NAME | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" | |
run "rm public/robots.txt" | |
run "rm -f public/javascripts/*" | |
# Set up git repository | |
git :init | |
# Copy database.yml for distribution use | |
run "cp config/database.yml config/database.yml.example" | |
# Create the database, if necessary | |
run "rake db:create:all" | |
# 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/**/* | |
tmp/restart.txt | |
config/database.yml | |
db/*.sqlite3 | |
END | |
# Install gems | |
gem 'settingslogic' | |
gem 'factory_girl', :lib => false, :source => 'http://gemcutter.org' | |
gem 'remarkable_rails', :lib => false | |
gem 'remarkable_activerecord', :lib => false | |
gem 'cucumber', :lib => false | |
gem 'rspec', :lib => false | |
gem 'rspec-rails', :lib => false | |
gem 'haml' | |
# Plugins | |
plugin 'bootstrapper', :git => 'git://github.com/sevenwire/bootstrapper.git' | |
# Install any missing gems. | |
rake "gems:install", :sudo => true | |
# Set up sessions, RSpec and Cucumber | |
generate "rspec" | |
generate "cucumber" | |
# Setup HAML | |
run "haml --rails ." | |
# Commit all work so far to the repository | |
git :add => '.' | |
git :commit => "-a -m 'Generated new rails project from http://gist.github.com/gists/181167'" | |
# Success! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment