Created
April 13, 2010 17:43
-
-
Save cfcosta/364864 to your computer and use it in GitHub Desktop.
This file contains 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
#encoding: utf-8 | |
# GIT configuration | |
git :init | |
git :add => '.', :commit => %(-m "Initial Commit") | |
append_file '.gitignore', "*~" | |
append_file '.gitignore', "\n#*#" | |
append_file '.gitignore', "\n*.swp" | |
append_file '.gitignore', "\nnbproject" | |
# Project tidying | |
run 'rm public/index.html' | |
run 'rm -rf doc README' | |
# Fixes :) | |
if RUBY_VERSION.to_f >= 1.9 | |
gsub_file 'Gemfile', /sqlite3-ruby/, 'sqlite3' | |
end | |
# Dependencies | |
gem 'rspec-rails', '>= 2.0.0.beta.1' | |
gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git' | |
gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git' | |
gem 'cucumber-rails', :git => 'git://github.com/aslakhellesoy/cucumber-rails.git' | |
gem 'devise', '>= 1.1.rc0' | |
run 'bundle install' | |
# Gem configurations | |
generate 'rspec:install' | |
generate :cucumber, '--rspec --capybara' | |
generate :devise_install | |
gsub_file 'config/environments/development.rb', /^end\n/, " config.action_mailer.default_url_options = { :host => 'localhost:3000' }\nend" | |
generate :devise_views | |
generate :devise, 'User' | |
# Application setup | |
generate :controller, 'homepage' | |
route %(root :to => "homepage#index") | |
file '.rvmrc', 'rvm ruby-1.9.1' | |
initializer 'monkey_patching.rb', <<-CODE | |
class Object | |
def not_nil? | |
!nil? | |
end | |
def not_blank? | |
!blank? | |
end | |
end | |
class Array | |
def not_empty? | |
!empty? | |
end | |
end | |
CODE | |
git :add => '.', :commit => %(-a -m "Automatic project tidying and setup") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment