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
rvm gemset empty |
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
CREATE USER 'export'@'localhost' IDENTIFIED BY 'xxx'; | |
GRANT ALL PRIVILEGES | |
ON dbname.* | |
TO 'export'@'localhost' | |
WITH GRANT OPTION; |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
#!/bin/bash | |
source ".rvmrc" | |
ruby .git/hooks/run_tests.rb | |
run_tests.rb | |
----------- | |
puts "Running tests..." | |
`bundle exec rspec spec/* > /dev/null 2>&1 && cucumber -r features > /dev/null 2>&1` | |
if $? != 0 |
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
!!! 5 | |
/[if lt IE 7] <html lang="en" class="no-js ie6"> | |
/[if IE 7 ] <html lang="en" class="no-js ie7"> | |
/[if IE 8 ] <html lang="en" class="no-js ie8"> | |
/[if IE 9 ] <html lang="en" class="no-js ie9"> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> | |
%head | |
%meta{:charset => "utf-8"}/ | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
%title |
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
gem "will_paginate", "~> 3.0.pre2" |
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
!!! 5 | |
%html{:lang => 'en', :class => 'no-js'} | |
%head | |
%meta{ :charset => 'utf-8' } | |
/[if IE] | |
%meta{ "http-equiv" => 'X-UA-Compatible', :content => 'IE=edge,chrome=1' } | |
%title Theo W. Mills | |
%meta{ :name => 'description', :content => '' } | |
%meta{ :name => 'author', :content => '' } | |
%meta{ :name => 'viewport', :content => 'width=device-width; initial-scale=1.0; maximum-scale=1.0;' } |
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
#---------------------------------------------------------------------------- | |
# Capistrano | |
#---------------------------------------------------------------------------- | |
capify! | |
file 'Capfile', <<-FILE | |
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' | |
FILE |
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
#---------------------------------------------------------------------------- | |
# Git Setup | |
#---------------------------------------------------------------------------- | |
append_file '.gitignore', %{ | |
/.bundle | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 |
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
puts "setting up Gemfile for Mongoid..." | |
gsub_file 'Gemfile', /gem \'sqlite3-ruby/, '# gem \'sqlite3-ruby' | |
append_file 'Gemfile', "\n# Bundle gems needed for Mongoid\n" | |
gem 'mongoid', '2.0.0.beta.16' | |
gem 'bson_ext', '1.0.4' | |
puts "installing Mongoid gems (takes a few minutes!)..." | |
run 'bundle install' | |
puts "creating 'config/mongoid.yml' Mongoid configuration file..." |