Skip to content

Instantly share code, notes, and snippets.

@lukeledet
Created March 17, 2011 19:36
Show Gist options
  • Save lukeledet/874974 to your computer and use it in GitHub Desktop.
Save lukeledet/874974 to your computer and use it in GitHub Desktop.
# Fix the problem with github's SSL cert
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
git :init
# Ignore certain files
file '.gitignore',
%q{Gemfile.lock
.bundle
log/*.log
db/*.db
db/*.sqlite3
db/*.sqlite3-journal
db/schema.rb
tmp/
.DS_Store
._*
config/database.yml
test/fixtures/*
public/javascripts/all.js
public/stylesheets/all.js
}
# Don't store the database config in the repository
run "cp config/database.yml config/database.yml.example"
# Remove unnecessary files
run "rm README"
run "rm doc/*"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
run "rm public/images/*"
# Clear the standard routes file (remove everything but the first and last lines)
run "sed -i '' -e '2,57d' config/routes.rb"
# Clear the test helper of fixture info
file 'test/test_helper.rb',
%q{ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
end
}
# Use mongrel instead of webrick
gem 'mongrel', :group => :development
# Add testing gems
if yes?('Install testing tools?')
gem "factory_girl_rails", :group => :test
gem "ffaker", :group => :test
gem "rspec-rails", :group => [:test, :development]
gem "cucumber-rails", :group => [:test, :development]
gem "pickle", :group => :test
gem "capybara", :group => :test
gem "spork", :group => [:test, :development]
gem "launchy", :group => [:test, :development]
generate 'rspec:install'
generate 'cucumber:install --capybara'
generate :pickle, '-f --paths --email'
# Setup spork for cucumber and rspec
file 'features/support/env.rb', open('https://gist.github.com/867274.txt').read
file 'spec/spec_helper.rb', open('https://gist.github.com/867292.txt').read
file 'config/cucumber.yml', open('https://gist.github.com/867818.txt').read
file 'lib/tasks/spork.rake', open('https://gist.github.com/874469.txt').read
file '.rspec', "--colour\n--drb"
end
if yes?('Install user authentication?')
gem "devise"
generate 'devise:install'
generate 'devise User'
end
gem 'jquery-rails'
generate 'jquery:install'
git :add => "."
git :commit => "-m 'Initial commit'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment