Skip to content

Instantly share code, notes, and snippets.

@amasses
Created September 8, 2009 07:37
Show Gist options
  • Save amasses/182773 to your computer and use it in GitHub Desktop.
Save amasses/182773 to your computer and use it in GitHub Desktop.
My base rails template
# Template created by You've Got Rails (http://www.youvegotrails.com)
# Remove unnecessary Rails files
run 'rm README'
run 'rm public/index.html'
run 'rm public/favicon.ico'
run 'rm public/images/rails.png'
# Remove Prototype files
run 'rm public/javascripts/*.js'
gem "rspec", :lib => false, :version => ">= 1.2.0", :source => 'git://github.com/dchelimsky/rspec.git'
gem "rspec-rails", :lib => false, :version => ">= 1.2.0", :source => 'git://github.com/dchelimsky/rspec-rails.git'
gem "webrat", :source => 'git://github.com/brynary/webrat.git'
gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => "http://gems.github.com"
gem "cucumber", :source => 'git://github.com/aslakhellesoy/cucumber.git'
gem "thoughtbot-clearance", :lib => "clearance", :source => "git://github.com/thoughtbot/clearance.git"
gem "bullet"
plugin 'asset_packager', :git => 'git://github.com/sbecker/asset_packager.git'
plugin 'heroku_asset_packager', :git => "git://github.com/amasses/heroku_asset_packager.git"
plugin 'hoptoad_notifier', :git => "git://github.com/thoughtbot/hoptoad_notifier.git"
plugin 'jrails', :git => 'git://github.com/aaronchi/jrails.git'
plugin 'validates_date_time', :svn => "http://svn.viney.net.nz/things/rails/plugins/validates_date_time"
plugin 'smtp_tls', :git => "git://github.com/yzhang/smtp_tls.git"
plugin 'formtastic', :git => "git://github.com/justinfrench/formtastic.git"
plugin 'xilence', :git => "git://github.com/inem/xilence.git"
plugin 'typus', :git => "git://github.com/fesplugas/typus.git"
# initializer 'hoptoad.rb', <<-FILE
# HoptoadNotifier.configure do |config|
# config.api_key = 'HOPTOAD-KEY'
# end
# FILE
# Run rspec generator
generate("rspec")
generate("typus")
# Install and configure capistrano
capify!
file 'Capfile', <<-FILE
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
FILE
# Create .gitignore file
file '.gitignore', <<-FILE
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
.idea
FILE
# Set up git repository
git :init
git :add => '.'
git :commit => " -a -m 'Initial Commit'"
if yes?("Would you like to create a Heroku application")
name = ask("What would you like to call the app?")
run "heroku create #{name}" unless name.empty?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment