Last active
December 18, 2015 11:48
-
-
Save cgrusden/5777772 to your computer and use it in GitHub Desktop.
Steven H. Allen & Co.'s (http://stevenhallen.com) rails 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
# Steven H. Allen & Co. (http://stevenhallen.com) | |
# | |
# NOTICE: This template uses Postgresql exclusively for now | |
# | |
# | |
# To use this template: | |
# | |
# $ rails new <rails_app_name> -m https://gist.github.com/5777772.txt -S -T -d postgresql | |
# Install gems | |
gem "haml" | |
gem_group :development do | |
gem "better_errors" | |
end | |
gem_group :development, :test do | |
gem "database_cleaner" | |
gem "factory_girl_rails" | |
gem "jazz_hands" | |
gem "rspec-rails" | |
gem "shoulda" | |
gem "valid_attribute" | |
end | |
run "rvm gemset create #{app_name}" | |
run "rvm gemset use #{app_name}" | |
run "bundle install" | |
# Create .rspec defaults | |
file '.rspec', <<-CODE | |
--color | |
CODE | |
# Create database user | |
run "createuser -d #{app_name}" | |
# Create database | |
rake "db:create:all" | |
rake "db:migrate" | |
# Run the Rails Generator on whatever | |
generate "rspec:install" | |
# Add syntactic goodness to spec_helper (via Mark M) | |
inject_into_file "spec/spec_helper.rb", :after => 'config.order = "random"' do <<-CODE | |
config.include FactoryGirl::Syntax::Methods | |
CODE | |
end | |
# Clean everything up that we don't need before we check-in | |
remove_file 'public/index.html' | |
git :init | |
git :add => "." | |
git :commit => "-a -m 'Initial'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Template system was adding an extra 'gem "pg"' to the Gemfile. Template system does not check if the gem exists already