Created
March 18, 2009 23:27
-
-
Save davidlee/81477 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
#!/usr/bin/env ruby | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" | |
run "rm public/robots.txt" | |
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore" | |
run "for i in tmp/*; do touch tmp/$i; done" | |
file '.gitignore', <<-END | |
.swo | |
.swp | |
.#* | |
#* | |
*~ | |
*.gz | |
*.tar | |
*.zip | |
*.bz2 | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
END | |
# cucumber | |
run "mkdir -p features/step_definitions" | |
run "mkdir -p features/support" | |
run 'echo -e "default: --format profile features\n\n" > cucumber.yml' | |
rakefile("cucumber.rake") do | |
<<-TASK | |
require 'cucumber/rake/task' | |
Cucumber::Rake::Task.new(:features) do |t| | |
t.cucumber_opts = "--format pretty" | |
end | |
TASK | |
end | |
git :init | |
git :add => "." | |
git :commit => "-a -m 'Initial commit'" | |
def hashify a | |
Hash[a.map { |u| u =~ /\/([\w]+)\.git/; [$1,u] }] | |
end | |
plugins = hashify %w{ | |
git://github.com/rotuka/annotate_models.git | |
git://github.com/technoweenie/acts_as_paranoid.git | |
git://github.com/rails/exception_notification.git | |
git://github.com/notahat/machinist.git | |
git://github.com/ntalbott/query_trace.git | |
git://github.com/dchelimsky/rspec.git | |
git://github.com/dchelimsky/rspec-rails.git | |
git://github.com/mbleigh/seed-fu.git | |
git://github.com/josephwilk/rspec-rr.git | |
git://github.com/mmower/simply_versioned.git | |
git://github.com/sbecker/asset_packager.git | |
git://github.com/timcharper/role_requirement.git | |
git://github.com/aslakhellesoy/cucumber.git | |
git://github.com/nex3/haml.git | |
git://github.com/binarylogic/authlogic.git | |
} | |
# git://github.com/technoweenie/restful-authentication.git | |
plugins.each { |name, uri| plugin name, :git => uri, :submodule => true } | |
git :submodule => "init" | |
gem :eventmachine | |
gem :rr | |
gem 'rubyist-aasm', :source => 'http://gems.github.com' | |
# config.active_record.timestamped_migrations = false | |
generate( :rspec ) | |
# generate( :authenticated, "user session") | |
# generate( :session_migration ) | |
# databases | |
# replace development, test user w/ local dev account | |
db_cfg_file = 'config/database.yml' | |
db_cfg = YAML.load_file( db_cfg_file ) | |
db_cfg["development"]["username"] = ENV['USER'] | |
db_cfg["test"]["username"] = ENV['USER'] | |
File.open( db_cfg_file, 'w' ) { |fh|fh.write( db_cfg.to_yaml ) } | |
rake("db:create", "development") | |
rake("db:create", "test") | |
# route "map.root :controller => :home" | |
# rake ("gems:install", :sudo => true) if yes?("Freeze rails gems?") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment