#template.rb # Set up initializer initializer 'myconfig.rb', <<-END Rails::Initializer.run do |config| config.action_controller.session = { :key => '_myapp_session', :secret => '#{(1..40).map { |x| (65 + rand(26)).chr }.join}' } config.action_controller.relative_url_root='/myapp' config.time_zone = 'UTC' config.i18n.default_locale = :ja end END # Download JQuery run "curl -L http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js > public/javascripts/jquery.js" run "curl -L http://jqueryjs.googlecode.com/svn/trunk/plugins/form/jquery.form.js > public/javascripts/jquery.form.js" # Plugins plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git' plugin 'rspec-rails',:git => 'git://github.com/dchelimsky/rspec-rails.git' plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git' plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git' plugin 'selenium-on-rails', :git => 'git://github.com/paytonrules/selenium-on-rails.git' plugin 'will_paginate', :git => 'git://github.com/mislav/will_paginate.git' # Gems #gem 'capistrano' gem 'termios' gem 'will_paginate' gem 'rubyist-aasm' gem 'ruby-openid' gem 'mocha' rake("gems:install", :sudo => true) if yes?("Install dependent gems ?") rake("gems:unpack:dependencies") if yes?("Freeze gems?") # Capify capify! current = Dir.pwd file 'config/deploy.rb', <<-END set :application, "APP_NAME" set :scm, :git set :repository, "#{current}/APP_NAME/.git" set :branch, 'master' set :deploy_to, "#{current}/dep/APP_NAME/" set :deploy_via, :copy role :app, "localhost" role :web, "localhost" role :db, "localhost", :primary => true set :use_sudo, false END # Copy database.yml run "cp config/database.yml config/database.yml.example" # Set up .gitignore files file '.gitignore', <<-END .DS_Store log/*.log tmp/**/* config/database.yml db/*.sqlite3 END # Set up RSpec, OpenID, etc, and run migrations rake 'db:sessions:create' generate "rspec" generate "authenticated", "user session --stateful" rake 'open_id_authentication:db:create' rake 'db:migrate' # git git :init git :add => "." git :commit => "-a -m 'Initial commit'"