Technology Stack for Rails
Core
- Rails 3.0.1
- Ruby 1.9.2 (use RVM for mgmt.)
Development
- Bundler – manage gem dependencies
/* `XHTML, HTML4, HTML5 Reset | |
----------------------------------------------------------------------------------------------------*/ | |
a, | |
abbr, | |
acronym, | |
address, | |
applet, | |
article, | |
aside, |
# Easy download examples | |
# | |
# First example, downloads 10 files from the same server sequencially using the same | |
# easy handle with a persistent connection | |
# | |
# Second example, sends all 10 requests in parallel using 10 easy handles | |
# | |
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'ext'))) | |
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))) | |
require 'curb' |
=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') |
source :rubygems | |
gem 'sinatra', '1.0' | |
gem 'oauth2' | |
gem 'json' | |
group :development do | |
gem 'shotgun' | |
end |
source :rubygems | |
gem 'sinatra', '1.0' | |
gem 'gowalla', '~> 0.2.0' | |
group :development do | |
gem 'shotgun' | |
end |
# In reply to my own question | |
# (http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/#comment-69995567) | |
# about using git-flow with existing git repos I experimented with a dummy | |
# git repo and it appears rather straight-forward | |
kold@Macintosh-27 $ git init test_git_flow | |
Initialized empty Git repository in /private/tmp/test_git_flow/.git/ | |
(/tmp) | |
kold@Macintosh-27 $ cd test_git_flow/ |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
Technology Stack for Rails
Core
Development
source 'http://rubygems.org' | |
gem 'rails', '3.0.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
#gem 'mysql2' | |
gem "sqlite3-ruby" |
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |