Skip to content

Instantly share code, notes, and snippets.

@ihower
Created October 6, 2009 08:15
Show Gist options
  • Save ihower/202843 to your computer and use it in GitHub Desktop.
Save ihower/202843 to your computer and use it in GitHub Desktop.
Rails app template
# rails foobar -m http://gist.github.com/202843.txt
run "rm README"
run "rm public/index.html"
run "rm -f public/javascripts/*"
run "rm -f publuc/images/*"
generate :controller, "welcome index"
route "map.root :controller => 'welcome'"
if yes?("Do you want to use BDD framework?")
# sudo gem install rspec rspec-rails cucumber webrat
generate("cucumber")
generate("rspec")
end
if yes?("Do you want to use restful-authentication?")
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git'
generate("authenticated", "user session")
end
plugin 'handicraft_helper', :git => 'git://github.com/ihower/handicraft_helper.git'
plugin 'handicraft_ujs', :git => 'git://github.com/ihower/handicraft_ujs.git'
plugin 'stickies', :git => 'git://github.com/handlino/stickies.git'
plugin 'will_paginate', :git => 'git://github.com/mislav/will_paginate.git'
plugin 'action_mailer_optional_tls', :git => 'git://github.com/collectiveidea/action_mailer_optional_tls.git'
plugin 'delayed_job', :git => 'git://github.com/collectiveidea/delayed_job.git'
plugin 'paperclip', :git => 'http://github.com/thoughtbot/paperclip'
# plugin 'thinking-sphinx', :git => 'http://github.com/freelancing-god/thinking-sphinx'
git :init
run %{find . -type d -empty | xargs -I xxx touch xxx/.gitignore}
file '.gitignore', <<-CODE
Thumbs.db
.DS_Store
tmp/
sphinx_*.*
*.log
*.pid
config/database.yml
*~
db/schema.rb
db/development_structure.sql
public/javascripts/all.js
public/stylesheets/all.css
coverage/
rcov/
public/system/*
config/*.sphinx.conf
db/sphinx/*
db/*.sqlite3
test/*
CODE
run "cp config/database.yml config/database.yml.example"
run "cp vendor/plugins/handicraft_ujs/javascripts/* public/javascripts/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment