Skip to content

Instantly share code, notes, and snippets.

@defeated
Created August 14, 2010 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save defeated/524546 to your computer and use it in GitHub Desktop.
Save defeated/524546 to your computer and use it in GitHub Desktop.
# create fresh git repo
git :init
git :add => '.'
git :commit => '-a -m "fresh rails app"'
# include gems
gem 'rspec', '>= 2.0.0.beta.19', :group => :test
gem 'rspec-rails', '>= 2.0.0.beta.19', :group => :test
gem 'cucumber', '>= 0.8.5', :group => :test
gem 'cucumber-rails', '>= 0.3.2', :group => :test
gem 'webrat', :group => :test
# run cucumber and rspec generators
generate 'rspec:install'
generate 'cucumber:install --rspec --webrat'
# create rspec.rb in the config/initializers directory to use rspec as the default test framework
initializer 'rspec.rb', <<-EOF
Rails.application.config.generators.test_framework :rspec
EOF
# download latest unobtrusive rails adapter for jquery
get 'http://github.com/rails/jquery-ujs/raw/master/src/rails.js', 'public/javascripts/rails.js'
# create jquery.rb in the config/initializers directory to use jquery as the default javascript framework
initializer 'jquery.rb', <<-EOF
Rails.application.config.action_view.javascript_expansions[:defaults] = %w(http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js rails)
EOF
# commit template results to repo
git :commit => '-a -m "applied application template"'
@defeated
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment