Created
April 24, 2009 16:37
-
-
Save kfaustino/101196 to your computer and use it in GitHub Desktop.
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
# sexy_template.rb | |
# by Kevin Faustino | |
# Delete all unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" | |
run "rm public/robots.txt" | |
run "rm -f public/images/*" | |
run "rm -f public/javascripts/*" | |
run "rm -rf test" | |
# Set example database connection | |
run "cp config/database.yml config/database.yml.sample" | |
# Download jQuery | |
run "curl -L http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js > public/javascripts/jquery.js" | |
run "curl -L http://jquery.malsup.com/form/jquery.form.js?2.36 > public/javascripts/plugins/jquery.form.js" | |
# Set .gitignore defaults | |
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore" | |
run %{find . -type d -empty | grep -v "vendor" | grep -v ".git" | grep -v "tmp" | xargs -I xxx touch xxx/.gitignore} | |
file '.gitignore', <<-END | |
config/database.yml | |
db/*.sqlite3 | |
log/* | |
public/cache/ | |
public/stylesheets/compiled/ | |
public/system/ | |
spec/profile.txt | |
test/ | |
tmp/**/* | |
# Bundler specific ignores | |
bin/* | |
vendor/bundler_gems/ruby/1.8/gems/* | |
!vendor/bundler_gems/ruby/1.8/ | |
END | |
file 'config/preinitializer.rb', <<-CODE | |
require '#{RAILS_ROOT}/vendor/bundler_gems/environment' | |
CODE | |
file 'Gemfile', <<-END | |
bundle_path "vendor/bundler_gems" | |
disable_system_gems | |
gem "rails", "2.3.5" | |
gem "rack", "1.0.1" | |
gem "haml", "2.2.17" | |
gem "compass", "0.8.17" | |
only :test do | |
gem "cucumber", "0.6.1" | |
gem "factory_girl", "1.2.3" | |
gem "rspec", "1.2.9" | |
gem "rspec-rails", 1.2.9"" | |
gem "webrat", "0.5.3" | |
end | |
END | |
run "gem bundle" | |
run "bin/compass . --rails -f blueprint" | |
# Setup BDD Suite | |
generate("rspec") | |
generate("cucumber") | |
# Commit all work so far to the repository | |
git :init | |
git :add => '.' | |
git :commit => "-a -m 'Initial commit'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment