Gemfileにomniauthを追加してbundle install

$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0)
Using i18n (0.6.5)
Using minitest (4.7.5)
Using multi_json (1.7.9)
Using atomic (1.1.13)
Using thread_safe (0.1.2)
Using tzinfo (0.3.37)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using mime-types (1.25)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.0)
Using activemodel (4.0.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.0)
Using activerecord (4.0.0)
Using bcrypt-ruby (3.1.1)
Using sass (3.2.10)
Using bootstrap-sass (2.3.2.2)
Using bundler (1.3.5)
Using coffee-script-source (1.6.3)
Using execjs (2.0.1)
Using coffee-script (2.2.0)
Using thor (0.18.1)
Using railties (4.0.0)
Using coffee-rails (4.0.0)
Using orm_adapter (0.4.0)
Using warden (1.2.3)
Using devise (3.0.2)
Installing hashie (2.0.5)
Using hike (1.2.3)
Using jbuilder (1.5.1)
Using jquery-rails (3.0.4)
Using json (1.8.0)
Installing oauth (0.4.7)
Installing omniauth (1.1.4)
Installing omniauth-oauth (1.0.1)
Installing omniauth-twitter (1.0.0)
Using tilt (1.4.1)
Using sprockets (2.10.0)
Using sprockets-rails (2.0.0)
Using rails (4.0.0)
Using rdoc (3.12.2)
Using sass-rails (4.0.0)
Using sdoc (0.3.20)
Using sqlite3 (1.3.8)
Using turbolinks (1.3.0)
Using uglifier (2.2.1)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
usersテーブルにomniauth用のカラムを追加

$ rails g migration AddColumnsToUsers provider uid name
      invoke  active_record
      create    db/migrate/20130924003151_add_columns_to_users.rb
$ rake db:migrate
twitterのappidなどを登録
ログインリンクを追加
twitterコールバックのルーティングを追加
コールバックを処理するコントローラーを追加

$ mkdir app/controllers/users
$ touch app/controllers/users/omniauth_callbacks_controller.rb
Userモデルにtwitterからの登録ユーザを探すメソッドを追加
Merge pull request #2 from ytkt/day3

Day3