-
-
Save jacquescrocker/492387 to your computer and use it in GitHub Desktop.
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
file 'Gemfile', <<-GEMS | |
source 'http://gemcutter.org' | |
gem "rails", "3.0.0.rc1" | |
gem "bson_ext" | |
gem "mongoid", "2.0.0.beta.12" | |
gem "haml", ">= 3.0" | |
gem "compass", "0.10.0.rc4" | |
group :test do | |
gem "rspec-rails", ">= 2.0.0.beta.12" | |
gem "capybara" | |
gem 'database_cleaner' | |
gem 'cucumber-rails' | |
gem 'factory_girl' | |
end | |
GEMS | |
# Bundle | |
run 'bundle install' | |
# Initialize testing suite | |
run 'script/rails g mongoid:config' | |
# Remove default javascript files and initialize jQuery in application.js | |
run "rm public/javascripts/*.js" | |
run "curl -L http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js" | |
config = <<-CONFIG | |
config.generators do |g| | |
g.orm :mongoid | |
g.test_framework :rspec, :fixture => false | |
end | |
CONFIG | |
inject_into_file 'config/application.rb', "#{config}", :after => "# end\n", :verbose => true | |
# Remove index.html, application.html.erb and rails.png | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm app/views/layouts/application.html.erb" | |
# Remove test directory since we're not using test/unit | |
run "rm -rf test" | |
readme = <<-README | |
=============================================================================== | |
Phew! All work done. | |
* Your application is configured to use Mongoid, HAML/SASS, | |
Compass with blueprint, RSpec, Cucumber, Capybara, and jQuery. | |
* Gems are locked. After modifying your Gemfile, run bundle install | |
* You can see all the included generators by 'rails generate'. | |
* The MongoDB databases are prefixed by your application's name. | |
* jQuery 1.4.2 (via google cdn) and its Rails helpers are in public/javascripts. | |
* ActiveRecord is not being used. If you want to use it, uncomment the following | |
line in application.rb: | |
require "active_record/railtie" | |
and these lines in features/support/env.rb: | |
require 'cucumber/rails/active_record' | |
Cucumber::Rails::World.use_transactional_fixtures = true | |
Get coding! | |
=============================================================================== | |
README | |
puts readme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment