Created
September 12, 2009 08:50
-
-
Save saberma/185762 to your computer and use it in GitHub Desktop.
rails template
This file contains 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
#rails . -d mysql -m http://gist.github.com/185762.txt | |
#http://m.onkey.org/2008/12/4/rails-templates | |
run "rm doc/README_FOR_APP" | |
run "rm public/index.html" | |
run "rm README" | |
run "rm public/favicon.ico" | |
# Set up git repository | |
git :init | |
# Copy database.yml for distribution use | |
run "cp config/database.yml config/database.yml.example" | |
# Set up .gitignore files | |
file '.gitignore', <<-END | |
#db | |
config/database.yml | |
db/schema.rb | |
#log | |
log/** | |
*.log | |
*.pid | |
#tmp | |
tmp/** | |
#vim swap file | |
**.swp | |
**.swo | |
**.swn | |
**.*~ | |
#rcov | |
coverage/** | |
#selenium | |
vendor/plugins/selenium-on-rails/log/** | |
#doc | |
doc/api | |
doc/app | |
#bundle-fu | |
public/javascripts/cache | |
public/stylesheets/cache | |
#sitemap | |
public/sitemap* | |
#share by capistrano | |
public/photos/** | |
#swf_fu | |
public/swfs | |
#taobao | |
config/taobao.yml | |
END | |
#lib=false,we don't need rails to load test lib | |
gem 'rspec', :lib => false | |
gem 'rspec-rails', :lib => false | |
gem 'thoughtbot-factory_girl', :lib => false | |
gem 'binarylogic-authlogic', :lib => 'authlogic' | |
gem 'haml' | |
#for haml use :textile | |
gem "RedCloth" | |
gem 'mysql' | |
gem 'mislav-will_paginate', :lib => 'will_paginate' | |
gem 'sitemap_generator', :lib => false | |
#for haml generator | |
gem 'haml_scaffold', :lib => false | |
gem 'whenever', :lib => false | |
rake 'gems:install' if yes?('get all gems?') | |
generate 'rspec' | |
rake 'gems:install' | |
plugin 'bundle-fu', :git => 'git://github.com/timcharper/bundle-fu.git' | |
plugin 'jrails', :git => 'git://github.com/aaronchi/jrails.git' | |
plugin 'selenium-on-rails', :git => 'git://github.com/paytonrules/selenium-on-rails.git' | |
#open-taobao | |
if yes?('need taobao open api?') | |
plugin 'rest-client', :git => 'git://github.com/archiloque/rest-client.git' | |
plugin 'crack', :git => 'git://github.com/jnunemaker/crack.git' | |
plugin 'open-taobao', :git => 'git://github.com/wear/open-taobao.git' | |
end | |
p "please do:" | |
p "sudo cp /usr/local/ruby/lib/ruby/gems/1.8/gems/haml-*/bin /usr/bin" | |
run 'haml --rails .' | |
rake 'jrails:js:install' | |
rake 'jrails:js:scrub' | |
# Success! | |
puts "SUCCESS!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment