Skip to content

Instantly share code, notes, and snippets.

View rishav's full-sized avatar

Rishav Rastogi rishav

View GitHub Profile

Ruby on Rails 3.0 Release Notes

Rails 3.0 is a landmark release as it delivers on the Merb/Rails merge promise made in December 2008. Rails 3.0 provides many major upgrades to all of the major components of Rails, including a major overhaul of the router and query APIs.

One of the major achievements of this release, is that while there are loads of new features, old APIs have been deprecated with warnings wherever possible, so that you can implement the new features and conventions at your own pace. There is a backwards compatibility layer that will be supported during 3.0.x and removed in 3.1.

Rails 3.0 adds Active Model ORM abstraction, Abstract Controller generic controller abstraction as well as a consistent Plugin API giving developers full access to all the Rails internals that make Action Mailer, Action Controller, Action View, Active Record and Active Resource work.

These release notes cover the major upgrades, but don’t include every little bug fix and change. If you want to see everything,

@rishav
rishav / license
Created January 27, 2010 11:50 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
year=`date "+%Y"`
cat <<EOF
Copyright (c) $year Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
@rishav
rishav / gist:267477
Created January 2, 2010 12:11 — forked from rkh/gist:267470
# Installing Rails 3.0.pre in it's own gemset using rvm.
# I use Rube Enterprise Edition for rails development.
# You might want to replace ree with Your Favorite Ruby Implementation(tm)
rvm use ree%rails3 # Create new gemset called rails3.
gem install rake test-spec thor sqlite3-ruby # Get some gems we'll need (rails3 gemset should be empty)
git clone git://github.com/rails/rails.git && cd rails # Get rails source.
git submodule init && git submodule update # Get git dependencies.
cd rack && rake gem && gem install rack-1.1.*.gem # Install rack 1.1
cd ../arel && thor :build && thor :install && cd ../.. # Install arel
@rishav
rishav / url_dsl.rb
Created December 27, 2009 16:17 — forked from defunkt/url_dsl.rb
require 'open-uri'
# url dsl -- the ultimate url dsl!
#
# You just can't beat this:
#
# $ irb -r url_dsl
# >> include URLDSL
# => Object
# >> http://github.com/defunkt.json
@rishav
rishav / archfear.rb
Created May 24, 2009 19:21 — forked from archfear/archfear.rb
another Rails Temolate
# Template which configures a generic Rails app with Shoulda, Factory Girl,
# HAML, etc while commiting each step into git.
#
# Make sure you have Rails 2.3rc1 or greater installed and run:
# rails -d mysql -m http://gist.github.com/raw/57458/06345c42a92048e699af3140ccd28bbcd8915bc5/archfear.rb my_app
# Helper methods
def environment(data = nil, options = {}, &block)
options = { :sentinel => 'Rails::Initializer.run do |config|' }.merge(options)
@rishav
rishav / quiz.rb
Created May 15, 2009 19:23 — forked from intinig/quiz.rb
# COMMUNITY CHALLENGE
#
# A little modification to @intinig solution ( to test the order as well )
# May not be the best way to solve the problem.
#
class Quiz
def initialize(input = STDIN, output = STDOUT)
@input = input
@output = output
end
# COMMUNITY CHALLENGE
#
# How would you test this Quiz#problem method? Only two rules:
#
# 1. No mocks or stubs allowed. I'm looking for a other alternatives.
# Mocks can get messy in complex scenarios, and this is intended to
# be a high level test which executes all code. I don't think mocking
# would be a very clean solution anyway, but if you want to try it
# and prove me wrong feel free.
#