Created
August 4, 2010 16:46
-
-
Save mconnell/508421 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
| # Create a fresh git repo | |
| git :init | |
| git :add => "." | |
| git :commit => "-m 'Initial commit.'" | |
| # Create the javascripts dir | |
| run 'mkdir public/javascripts' | |
| # pull down jquery, jquery-ui and the appropriate rails driver | |
| run 'curl -L http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js > public/javascripts/jquery.js' | |
| run 'curl -L http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js > public/javascripts/jquery-ui.js' | |
| run 'curl -L http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js' | |
| git :add => "." | |
| git :commit => "-m 'Pull in JQuery UJS.'" | |
| # I think the process of getting haml running is a bit broke as | |
| # we need the gem in the Gemfile and the plugin ATM | |
| append_file 'Gemfile', <<-GEMS | |
| gem 'haml' | |
| GEMS | |
| run 'bundle install' | |
| # Generate an application layout similiar to one created by the scaffold generator | |
| file 'app/views/layouts/application.html.haml', <<-CODE | |
| !!! 5 | |
| %html | |
| %head | |
| %title= controller.action_name | |
| = javascript_include_tag 'jquery', 'jquery-ui', 'rails' | |
| = csrf_meta_tag | |
| %body | |
| - if notice.present? | |
| %p.notice= notice | |
| = yield | |
| CODE | |
| git :add => "." | |
| git :commit => "-m 'Setup HAML.'" | |
| require 'rspec/version' | |
| require 'rspec/rails/version' | |
| append_file 'Gemfile', <<-GEMS | |
| group :test do | |
| gem 'webrat' | |
| gem 'rspec', '#{Rspec::Version::STRING}' | |
| gem 'rspec-rails', '#{Rspec::Rails::Version::STRING}' | |
| end | |
| GEMS | |
| run 'script/rails generate rspec:install' | |
| git :add => "." | |
| git :commit => "-m 'Setup rspec.'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment