Created
May 5, 2011 06:42
-
-
Save Psli/956645 to your computer and use it in GitHub Desktop.
rails 3.1 m
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
# remove files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm app/assets/images/rails.png" | |
run "cp config/database.yml config/database.yml.example" | |
# install gems | |
run "rm Gemfile" | |
run "curl -L https://gist.github.com/956650.txt > Gemfile" | |
# bundle install | |
run "bundle install" | |
gsub_file 'config/application.rb', /(config.generators.test_framework = false)/, | |
"config.generators.test_framework = :rspec" | |
# generate rspec | |
generate "rspec:install" | |
# copy files | |
run "curl -L https://github.com/Psli/rails3-app-template/raw/master/watchr.rb > script/watchr.rb" | |
run "curl -L https://github.com/Psli/rails3-app-template/raw/master/dev.rake > lib/tasks/dev.rake" | |
# add time format | |
# environment 'Time::DATE_FORMATS.merge!(:default => "%Y-%m-%d %I:%M %p", :ymd => "%Y-%m-%d")' | |
# .gitignore | |
append_file '.gitignore', <<-CODE | |
config/database.yml | |
*.tmproj | |
cmd.txt | |
Thumbs.db | |
.DS_Store | |
tmp/* | |
coverage/* | |
.sass-cache | |
CODE | |
# keep tmp and log | |
run "touch tmp/.gitkeep" | |
run "touch log/.gitkeep" | |
# git commit | |
git :init | |
git :add => '.' | |
git :add => 'tmp/.gitkeep -f' | |
git :add => 'log/.gitkeep -f' | |
git :commit => "-a -m 'init'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment