Skip to content

Instantly share code, notes, and snippets.

@cmar
Created October 8, 2011 13:50
Show Gist options
  • Save cmar/1272298 to your computer and use it in GitHub Desktop.
Save cmar/1272298 to your computer and use it in GitHub Desktop.
Base Rails Template
gem 'devise'
gem "rspec-rails", :group => [ :development, :test ]
gem "factory_girl_rails", :group => [:test]
run 'bundle install'
generate "devise:install"
generate "devise", "User"
rake "db:migrate", :env => 'development'
rake "db:migrate", :env => 'test'
remove_dir 'test'
generate 'rspec:install'
create_file 'spec/factories.rb' do
%q{FactoryGirl.define do
factory :user do
sequence(:email) { |n| "foo#{n}@example.com" }
password "secret"
end
end
}
end
insert_into_file "spec/spec_helper.rb", :after => "RSpec.configure do |config|\n" do
%q{ config.include Devise::TestHelpers, :type => :controller
}
end
remove_file 'public/index.html'
remove_file 'rm public/images/rails.png'
remove_file 'README'
create_file "README.md" do
"built by #{__FILE__}"
end
append_to_file '.gitignore' do
%q{*.swp
.rvmrc
}
end
git :init
git :add => "."
git :commit => "-m 'first commit!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment