Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Create fresh Rails 3.1.0.beta1 app"

This reverts commit 3714c20.
  • Loading branch information...
commit 2edbba1dfb279d834f18fd9f7e4376f6ab29aca8 1 parent 3714c20
@sferik sferik authored
Showing with 491 additions and 766 deletions.
  1. +2 −1  .gitignore
  2. +2 −0  .rspec
  3. +7 −24 Gemfile
  4. +104 −86 Gemfile.lock
  5. +0 −256 README
  6. +30 −0 README.md
  7. +2 −2 Rakefile
  8. BIN  app/assets/images/rails.png
  9. +0 −6 app/assets/javascripts/application.js
  10. +0 −5 app/assets/stylesheets/application.css
  11. +27 −0 app/controllers/application_controller.rb
  12. +28 −0 app/controllers/sessions_controller.rb
  13. +2 −0  app/helpers/sessions_helper.rb
  14. 0  app/mailers/.gitkeep
  15. 0  app/models/.gitkeep
  16. +2 −4 app/views/layouts/application.html.erb
  17. +49 −0 app/views/sessions/new.html.erb
  18. +1 −1  config.ru
  19. +3 −14 config/application.rb
  20. +10 −3 config/boot.rb
  21. +0 −22 config/database.yml
  22. +1 −1  config/environment.rb
  23. +4 −3 config/environments/development.rb
  24. +12 −15 config/environments/production.rb
  25. +3 −7 config/environments/test.rb
  26. +1 −1  config/initializers/secret_token.rb
  27. +2 −2 config/initializers/session_store.rb
  28. +0 −12 config/initializers/wrap_parameters.rb
  29. +1 −1  config/locales/en.yml
  30. +4 −57 config/routes.rb
  31. +2 −2 db/seeds.rb
  32. +43 −0 lib/twitter/authentication_helpers.rb
  33. 0  log/.gitkeep
  34. BIN  public/images/sign-in-with-twitter.png
  35. +0 −241 public/index.html
  36. 0  {vendor/assets/stylesheets → public/javascripts}/.gitkeep
  37. 0  {test/unit → public/stylesheets}/.gitkeep
  38. +45 −0 spec/controllers/sessions_controller_spec.rb
  39. +76 −0 spec/fixtures/verify_credentials.json
  40. +11 −0 spec/spec_helper.rb
  41. +17 −0 spec/support/twitter_stubs.rb
  42. 0  test/fixtures/.gitkeep
  43. 0  test/functional/.gitkeep
  44. 0  test/integration/.gitkeep
View
3  .gitignore
@@ -1,4 +1,5 @@
.bundle
+*.rbc
db/*.sqlite3
log/*.log
-tmp/
+tmp/**/*
View
2  .rspec
@@ -0,0 +1,2 @@
+--colour
+--format documentation
View
31 Gemfile
@@ -1,29 +1,12 @@
source 'http://rubygems.org'
-gem 'rails', '3.1.0.beta1'
-
-# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
-
-gem 'sqlite3'
-
-# Asset template engines
-gem 'sass'
-gem 'coffee-script'
-gem 'uglifier'
-
-gem 'jquery-rails'
-
-# Use unicorn as the web server
-# gem 'unicorn'
-
-# Deploy with Capistrano
-# gem 'capistrano'
-
-# To use debugger
-# gem 'ruby-debug19', :require => 'ruby-debug'
+gem 'rails', '~> 3.0.7'
+gem 'oauth', '~> 0.4.4'
+gem 'twitter', '~> 1.4.1'
group :test do
- # Pretty printed test output
- gem 'turn', :require => false
+ gem 'rspec'
+ gem 'rspec-rails'
+ gem 'webmock'
+ gem 'webrat'
end
View
190 Gemfile.lock
@@ -1,109 +1,127 @@
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.1.0.beta1)
- actionpack (= 3.1.0.beta1)
- mail (~> 2.3.0)
- actionpack (3.1.0.beta1)
- activemodel (= 3.1.0.beta1)
- activesupport (= 3.1.0.beta1)
- builder (~> 3.0.0)
- erubis (~> 2.7.0)
- i18n (~> 0.6.0beta1)
- rack (~> 1.3.0.beta)
- rack-cache (~> 1.0.1)
- rack-mount (~> 0.7.2)
- rack-test (~> 0.6.0)
- sprockets (~> 2.0.0.beta.2)
- tzinfo (~> 0.3.27)
- activemodel (3.1.0.beta1)
- activesupport (= 3.1.0.beta1)
- bcrypt-ruby (~> 2.1.4)
- builder (~> 3.0.0)
- i18n (~> 0.6.0beta1)
- activerecord (3.1.0.beta1)
- activemodel (= 3.1.0.beta1)
- activesupport (= 3.1.0.beta1)
- arel (~> 2.1.0)
- tzinfo (~> 0.3.27)
- activeresource (3.1.0.beta1)
- activemodel (= 3.1.0.beta1)
- activesupport (= 3.1.0.beta1)
- activesupport (3.1.0.beta1)
- multi_json (~> 1.0)
- ansi (1.2.5)
- arel (2.1.0)
- bcrypt-ruby (2.1.4)
- builder (3.0.0)
- coffee-script (2.2.0)
- coffee-script-source
- execjs
- coffee-script-source (1.1.0)
- erubis (2.7.0)
- execjs (0.3.3)
- multi_json (~> 1.0)
- hike (1.0.0)
- i18n (0.6.0beta1)
- jquery-rails (1.0)
- rails (~> 3.0)
- thor (~> 0.14)
- json (1.5.1)
- mail (2.3.0)
+ abstract (1.0.0)
+ actionmailer (3.0.7)
+ actionpack (= 3.0.7)
+ mail (~> 2.2.15)
+ actionpack (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.7)
+ activesupport (= 3.0.7)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
+ arel (~> 2.0.2)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
+ activesupport (3.0.7)
+ addressable (2.2.5)
+ arel (2.0.9)
+ builder (2.1.2)
+ crack (0.1.8)
+ diff-lcs (1.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ faraday (0.6.1)
+ addressable (~> 2.2.4)
+ multipart-post (~> 1.1.0)
+ rack (< 2, >= 1.1.0)
+ faraday_middleware (0.6.3)
+ faraday (~> 0.6.0)
+ hashie (1.0.0)
+ i18n (0.5.0)
+ mail (2.2.19)
+ activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.1)
+ multi_xml (0.2.2)
+ multipart-post (1.1.0)
+ nokogiri (1.4.4)
+ nokogiri (1.4.4-java)
+ weakling (>= 0.0.3)
+ oauth (0.4.4)
polyglot (0.3.1)
- rack (1.3.0.beta)
- rack-cache (1.0.1)
- rack (>= 0.4)
- rack-mount (0.7.2)
+ rack (1.2.2)
+ rack-mount (0.6.14)
rack (>= 1.0.0)
- rack-ssl (1.3.2)
- rack
- rack-test (0.6.0)
+ rack-test (0.5.7)
rack (>= 1.0)
- rails (3.1.0.beta1)
- actionmailer (= 3.1.0.beta1)
- actionpack (= 3.1.0.beta1)
- activerecord (= 3.1.0.beta1)
- activeresource (= 3.1.0.beta1)
- activesupport (= 3.1.0.beta1)
+ rails (3.0.7)
+ actionmailer (= 3.0.7)
+ actionpack (= 3.0.7)
+ activerecord (= 3.0.7)
+ activeresource (= 3.0.7)
+ activesupport (= 3.0.7)
bundler (~> 1.0)
- railties (= 3.1.0.beta1)
- railties (3.1.0.beta1)
- actionpack (= 3.1.0.beta1)
- activesupport (= 3.1.0.beta1)
- rack-ssl (~> 1.3.2)
+ railties (= 3.0.7)
+ railties (3.0.7)
+ actionpack (= 3.0.7)
+ activesupport (= 3.0.7)
rake (>= 0.8.7)
- thor (~> 0.14.6)
+ thor (~> 0.14.4)
rake (0.8.7)
- sass (3.1.1)
- sprockets (2.0.0.beta.2)
- hike (~> 1.0)
- rack (~> 1.0)
- tilt (~> 1.0)
- sqlite3 (1.3.3)
+ rash (0.3.0)
+ hashie (~> 1.0.0)
+ rspec (2.5.0)
+ rspec-core (~> 2.5.0)
+ rspec-expectations (~> 2.5.0)
+ rspec-mocks (~> 2.5.0)
+ rspec-core (2.5.2)
+ rspec-expectations (2.5.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.5.0)
+ rspec-rails (2.5.0)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.5.0)
+ simple_oauth (0.1.4)
thor (0.14.6)
- tilt (1.3)
treetop (1.4.9)
polyglot (>= 0.3.1)
- turn (0.8.2)
- ansi (>= 1.2.2)
+ twitter (1.4.1)
+ faraday (~> 0.6.1)
+ faraday_middleware (~> 0.6.3)
+ hashie (~> 1.0.0)
+ multi_json (~> 1.0.0)
+ multi_xml (~> 0.2.0)
+ rash (~> 0.3.0)
+ simple_oauth (~> 0.1.4)
tzinfo (0.3.27)
- uglifier (0.5.1)
- execjs
- json
+ weakling (0.0.4-java)
+ webmock (1.6.2)
+ addressable (>= 2.2.2)
+ crack (>= 0.1.7)
+ webrat (0.7.3)
+ nokogiri (>= 1.2.0)
+ rack (>= 1.0)
+ rack-test (>= 0.5.3)
PLATFORMS
+ java
ruby
DEPENDENCIES
- coffee-script
- jquery-rails
- rails (= 3.1.0.beta1)
- sass
- sqlite3
- turn
- uglifier
+ oauth (~> 0.4.4)
+ rails (~> 3.0.7)
+ rspec
+ rspec-rails
+ twitter (~> 1.4.1)
+ webmock
+ webrat
View
256 README
@@ -1,256 +0,0 @@
-== Welcome to Rails
-
-Rails is a web-application framework that includes everything needed to create
-database-backed web applications according to the Model-View-Control pattern.
-
-This pattern splits the view (also called the presentation) into "dumb"
-templates that are primarily responsible for inserting pre-built data in between
-HTML tags. The model contains the "smart" domain objects (such as Account,
-Product, Person, Post) that holds all the business logic and knows how to
-persist themselves to a database. The controller handles the incoming requests
-(such as Save New Account, Update Product, Show Post) by manipulating the model
-and directing data to the view.
-
-In Rails, the model is handled by what's called an object-relational mapping
-layer entitled Active Record. This layer allows you to present the data from
-database rows as objects and embellish these data objects with business logic
-methods. You can read more about Active Record in
-link:files/vendor/rails/activerecord/README.html.
-
-The controller and view are handled by the Action Pack, which handles both
-layers by its two parts: Action View and Action Controller. These two layers
-are bundled in a single package due to their heavy interdependence. This is
-unlike the relationship between the Active Record and Action Pack that is much
-more separate. Each of these packages can be used independently outside of
-Rails. You can read more about Action Pack in
-link:files/vendor/rails/actionpack/README.html.
-
-
-== Getting Started
-
-1. At the command prompt, create a new Rails application:
- <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
-
-2. Change directory to <tt>myapp</tt> and start the web server:
- <tt>cd myapp; rails server</tt> (run with --help for options)
-
-3. Go to http://localhost:3000/ and you'll see:
- "Welcome aboard: You're riding Ruby on Rails!"
-
-4. Follow the guidelines to start developing your application. You can find
-the following resources handy:
-
-* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
-* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
-
-
-== Debugging Rails
-
-Sometimes your application goes wrong. Fortunately there are a lot of tools that
-will help you debug it and get it back on the rails.
-
-First area to check is the application log files. Have "tail -f" commands
-running on the server.log and development.log. Rails will automatically display
-debugging and runtime information to these files. Debugging info will also be
-shown in the browser on requests from 127.0.0.1.
-
-You can also log your own messages directly into the log file from your code
-using the Ruby logger class from inside your controllers. Example:
-
- class WeblogController < ActionController::Base
- def destroy
- @weblog = Weblog.find(params[:id])
- @weblog.destroy
- logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
- end
- end
-
-The result will be a message in your log file along the lines of:
-
- Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
-
-More information on how to use the logger is at http://www.ruby-doc.org/core/
-
-Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
-several books available online as well:
-
-* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
-* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
-
-These two books will bring you up to speed on the Ruby language and also on
-programming in general.
-
-
-== Debugger
-
-Debugger support is available through the debugger command when you start your
-Mongrel or WEBrick server with --debugger. This means that you can break out of
-execution at any point in the code, investigate and change the model, and then,
-resume execution! You need to install ruby-debug to run the server in debugging
-mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
-
- class WeblogController < ActionController::Base
- def index
- @posts = Post.all
- debugger
- end
- end
-
-So the controller will accept the action, run the first line, then present you
-with a IRB prompt in the server window. Here you can do things like:
-
- >> @posts.inspect
- => "[#<Post:0x14a6be8
- @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
- #<Post:0x14a6620
- @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
- >> @posts.first.title = "hello from a debugger"
- => "hello from a debugger"
-
-...and even better, you can examine how your runtime objects actually work:
-
- >> f = @posts.first
- => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
- >> f.
- Display all 152 possibilities? (y or n)
-
-Finally, when you're ready to resume execution, you can enter "cont".
-
-
-== Console
-
-The console is a Ruby shell, which allows you to interact with your
-application's domain model. Here you'll have all parts of the application
-configured, just like it is when the application is running. You can inspect
-domain models, change values, and save to the database. Starting the script
-without arguments will launch it in the development environment.
-
-To start the console, run <tt>rails console</tt> from the application
-directory.
-
-Options:
-
-* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
- made to the database.
-* Passing an environment name as an argument will load the corresponding
- environment. Example: <tt>rails console production</tt>.
-
-To reload your controllers and models after launching the console run
-<tt>reload!</tt>
-
-More information about irb can be found at:
-link:http://www.rubycentral.org/pickaxe/irb.html
-
-
-== dbconsole
-
-You can go to the command line of your database directly through <tt>rails
-dbconsole</tt>. You would be connected to the database with the credentials
-defined in database.yml. Starting the script without arguments will connect you
-to the development database. Passing an argument will connect you to a different
-database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
-PostgreSQL and SQLite 3.
-
-== Description of Contents
-
-The default directory structure of a generated Ruby on Rails application:
-
- |-- app
- | |-- controllers
- | |-- helpers
- | |-- mailers
- | |-- models
- | `-- views
- | `-- layouts
- |-- config
- | |-- environments
- | |-- initializers
- | `-- locales
- |-- db
- |-- doc
- |-- lib
- | `-- tasks
- |-- log
- |-- public
- | |-- images
- | |-- javascripts
- | `-- stylesheets
- |-- script
- |-- test
- | |-- fixtures
- | |-- functional
- | |-- integration
- | |-- performance
- | `-- unit
- |-- tmp
- | |-- cache
- | |-- pids
- | |-- sessions
- | `-- sockets
- `-- vendor
- `-- plugins
-
-app
- Holds all the code that's specific to this particular application.
-
-app/controllers
- Holds controllers that should be named like weblogs_controller.rb for
- automated URL mapping. All controllers should descend from
- ApplicationController which itself descends from ActionController::Base.
-
-app/models
- Holds models that should be named like post.rb. Models descend from
- ActiveRecord::Base by default.
-
-app/views
- Holds the template files for the view that should be named like
- weblogs/index.html.erb for the WeblogsController#index action. All views use
- eRuby syntax by default.
-
-app/views/layouts
- Holds the template files for layouts to be used with views. This models the
- common header/footer method of wrapping views. In your views, define a layout
- using the <tt>layout :default</tt> and create a file named default.html.erb.
- Inside default.html.erb, call <% yield %> to render the view using this
- layout.
-
-app/helpers
- Holds view helpers that should be named like weblogs_helper.rb. These are
- generated for you automatically when using generators for controllers.
- Helpers can be used to wrap functionality for your views into methods.
-
-config
- Configuration files for the Rails environment, the routing map, the database,
- and other dependencies.
-
-db
- Contains the database schema in schema.rb. db/migrate contains all the
- sequence of Migrations for your schema.
-
-doc
- This directory is where your application documentation will be stored when
- generated using <tt>rake doc:app</tt>
-
-lib
- Application specific libraries. Basically, any kind of custom code that
- doesn't belong under controllers, models, or helpers. This directory is in
- the load path.
-
-public
- The directory available for the web server. Contains subdirectories for
- images, stylesheets, and javascripts. Also contains the dispatchers and the
- default HTML files. This should be set as the DOCUMENT_ROOT of your web
- server.
-
-script
- Helper scripts for automation and generation.
-
-test
- Unit and functional tests along with fixtures. When using the rails generate
- command, template test files will be generated for you and placed in this
- directory.
-
-vendor
- External libraries that the application depends on. Also includes the plugins
- subdirectory. If the app has frozen rails, those gems also go here, under
- vendor/rails/. This directory is in the load path.
View
30 README.md
@@ -0,0 +1,30 @@
+TwitterApp
+==========
+TwitterApp is a very basic Rails 3 application that demonstrates how to use the
+[Sign in with Twitter](http://dev.twitter.com/pages/sign_in_with_twitter)
+workflow with version 1.x of the [twitter
+gem](https://github.com/jnunemaker/twitter/) (which has removed built-in OAuth
+support).
+
+Installation
+------------
+ git clone git://github.com/jnunemaker/twitter-app.git
+ cd twitter-app
+ bundle install
+
+Usage
+-----
+Using TwitterApp requires you to [register an app with
+Twitter](http://dev.twitter.com/apps) to obtain OAuth credentials. Once you
+obtain credentials, substitute your consumer key and secret into the command
+below.
+
+ CONSUMER_KEY=abc CONSUMER_SECRET=123 rails server
+
+OmniAuth
+--------
+There is an [omniauth
+branch](https://github.com/jnunemaker/twitter-app/tree/omniauth) that
+demonstrates integration with the [omniauth
+gem](https://github.com/intridea/omniauth) instead of the [oauth
+gem](https://github.com/oauth/oauth-ruby).
View
4 Rakefile
@@ -1,7 +1,7 @@
-#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
+require 'rake'
-SignInWithTwitter::Application.load_tasks
+TwitterApp::Application.load_tasks
View
BIN  app/assets/images/rails.png
Deleted file not rendered
View
6 app/assets/javascripts/application.js
@@ -1,6 +0,0 @@
-// FIXME: Tell people that this is a manifest file, real code should go into discrete files
-// FIXME: Tell people how Sprockets and CoffeeScript works
-//
-//= require jquery
-//= require jquery_ujs
-//= require_tree .
View
5 app/assets/stylesheets/application.css
@@ -1,5 +0,0 @@
-/*
- * FIXME: Introduce SCSS & Sprockets
- *= require_self
- *= require_tree .
-*/
View
27 app/controllers/application_controller.rb
@@ -1,3 +1,30 @@
+require 'twitter/authentication_helpers'
+
class ApplicationController < ActionController::Base
+ include Twitter::AuthenticationHelpers
protect_from_forgery
+ rescue_from Twitter::Unauthorized, :with => :force_sign_in
+
+ private
+
+ def oauth_consumer
+ @oauth_consumer ||= OAuth::Consumer.new(ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET'], :site => 'http://api.twitter.com', :request_endpoint => 'http://api.twitter.com', :sign_in => true)
+ end
+
+ def client
+ Twitter.configure do |config|
+ config.consumer_key = ENV['CONSUMER_KEY']
+ config.consumer_secret = ENV['CONSUMER_SECRET']
+ config.oauth_token = session['access_token']
+ config.oauth_token_secret = session['access_secret']
+ end
+ @client ||= Twitter::Client.new
+ end
+ helper_method :client
+
+ def force_sign_in(exception)
+ reset_session
+ flash[:error] = "It seems your credentials are not good anymore. Please sign in again."
+ redirect_to new_session_path
+ end
end
View
28 app/controllers/sessions_controller.rb
@@ -0,0 +1,28 @@
+class SessionsController < ApplicationController
+ def new
+ @user = client.user if signed_in?
+ end
+
+ def create
+ request_token = oauth_consumer.get_request_token(:oauth_callback => callback_url)
+ session['request_token'] = request_token.token
+ session['request_secret'] = request_token.secret
+ redirect_to request_token.authorize_url
+ end
+
+ def destroy
+ reset_session
+ redirect_to new_session_path
+ end
+
+ def callback
+ request_token = OAuth::RequestToken.new(oauth_consumer, session['request_token'], session['request_secret'])
+ access_token = request_token.get_access_token(:oauth_verifier => params[:oauth_verifier])
+ reset_session
+ session['access_token'] = access_token.token
+ session['access_secret'] = access_token.secret
+ user = client.verify_credentials
+ sign_in(user)
+ redirect_back_or root_path
+ end
+end
View
2  app/helpers/sessions_helper.rb
@@ -0,0 +1,2 @@
+module SessionsHelper
+end
View
0  app/mailers/.gitkeep
No changes.
View
0  app/models/.gitkeep
No changes.
View
6 app/views/layouts/application.html.erb
@@ -1,10 +1,8 @@
<!DOCTYPE html>
<html>
<head>
- <title>SignInWithTwitter</title>
- <%= stylesheet_link_tag "application" %>
- <%= javascript_include_tag "application" %>
- <%= csrf_meta_tags %>
+ <title>TwitterApp</title>
+ <%= csrf_meta_tag %>
</head>
<body>
View
49 app/views/sessions/new.html.erb
@@ -0,0 +1,49 @@
+<% if signed_in? %>
+ <%= image_tag(@user.profile_image_url).html_safe %>
+ <h3>
+ Welcome <%= link_to(@user.name, @user.url) %>
+ </h3>
+ <table>
+ <% unless @user.location.blank? %>
+ <tr>
+ <th>
+ Location
+ </th>
+ <td>
+ <%= @user.location %>
+ </td>
+ </tr>
+ <% end %>
+ <tr>
+ <th>
+ Friends
+ </th>
+ <td>
+ <%= @user.friends_count %>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Followers
+ </th>
+ <td>
+ <%= @user.followers_count %>
+ </td>
+ </tr>
+ </table>
+ <% unless @user.status.blank? %>
+ <p>
+ <%= "#{time_ago_in_words(@user.status.created_at).capitalize} ago, you said:" %>
+ <q>
+ <%= @user.status.text %>
+ </q>
+ </p>
+ <% end %>
+ <%= form_tag('/sessions/destroy', :method => :delete) do %>
+ <%= submit_tag 'Sign out' %>
+ <% end %>
+<% else %>
+ <%= form_tag('/sessions') do %>
+ <%= image_submit_tag("sign-in-with-twitter.png") %>
+ <% end %>
+<% end %>
View
2  config.ru
@@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
-run SignInWithTwitter::Application
+run TwitterApp::Application
View
17 config/application.rb
@@ -1,12 +1,12 @@
require File.expand_path('../boot', __FILE__)
-require 'rails/all'
+require 'action_controller/railtie'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
-module SignInWithTwitter
+module TwitterApp
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@@ -30,24 +30,13 @@ class Application < Rails::Application
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- # Please note that JavaScript expansions are *ignored altogether* if the asset
- # pipeline is enabled (see config.assets.enabled below). Put your defaults in
- # app/assets/javascripts/application.js in that case.
- #
# JavaScript files you want as :defaults (application.js is always included).
- # config.action_view.javascript_expansions[:defaults] = %w(prototype prototype_ujs)
-
+ # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
-
- # Enable IdentityMap for Active Record, to disable set to false or remove the line below.
- config.active_record.identity_map = true
-
- # Enable the asset pipeline
- config.assets.enabled = true
end
end
View
13 config/boot.rb
@@ -1,6 +1,13 @@
require 'rubygems'
# Set up gems listed in the Gemfile.
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
-
-require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
+gemfile = File.expand_path('../../Gemfile', __FILE__)
+begin
+ ENV['BUNDLE_GEMFILE'] = gemfile
+ require 'bundler'
+ Bundler.setup
+rescue Bundler::GemNotFound => e
+ STDERR.puts e.message
+ STDERR.puts "Try running `bundle install`."
+ exit!
+end if File.exist?(gemfile)
View
22 config/database.yml
@@ -1,22 +0,0 @@
-# SQLite version 3.x
-# gem install sqlite3
-development:
- adapter: sqlite3
- database: db/development.sqlite3
- pool: 5
- timeout: 5000
-
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
-test:
- adapter: sqlite3
- database: db/test.sqlite3
- pool: 5
- timeout: 5000
-
-production:
- adapter: sqlite3
- database: db/production.sqlite3
- pool: 5
- timeout: 5000
View
2  config/environment.rb
@@ -2,4 +2,4 @@
require File.expand_path('../application', __FILE__)
# Initialize the rails application
-SignInWithTwitter::Application.initialize!
+TwitterApp::Application.initialize!
View
7 config/environments/development.rb
@@ -1,9 +1,9 @@
-SignInWithTwitter::Application.configure do
+TwitterApp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
- # since you don't have to restart the web server when you make code changes.
+ # since you don't have to restart the webserver when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
@@ -11,10 +11,11 @@
# Show full error reports and disable caching
config.consider_all_requests_local = true
+ config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
- config.action_mailer.raise_delivery_errors = false
+ # config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
View
27 config/environments/production.rb
@@ -1,6 +1,7 @@
-SignInWithTwitter::Application.configure do
+TwitterApp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
+ # The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
@@ -8,19 +9,14 @@
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
- # Disable Rails's static asset server (Apache or nginx will already do this)
- config.serve_static_assets = false
-
- # Compress both stylesheets and JavaScripts
- config.assets.js_compressor = :uglifier
- config.assets.css_compressor = :scss
-
# Specifies the header that your server uses for sending files
- # (comment out if your front-end server doesn't support this)
- config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
+ config.action_dispatch.x_sendfile_header = "X-Sendfile"
+
+ # For nginx:
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
- # config.force_ssl = true
+ # If you have no front-end server that supports something like X-Sendfile,
+ # just comment this out and Rails will serve the files
# See everything in the log (default is :info)
# config.log_level = :debug
@@ -31,12 +27,13 @@
# Use a different cache store in production
# config.cache_store = :mem_cache_store
+ # Disable Rails's static asset server
+ # In production, Apache or nginx will already do this
+ config.serve_static_assets = false
+
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
- # config.assets.precompile += %w( search.js )
-
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
View
10 config/environments/test.rb
@@ -1,4 +1,4 @@
-SignInWithTwitter::Application.configure do
+TwitterApp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
@@ -7,11 +7,7 @@
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
- # Configure static asset server for tests with Cache-Control for performance
- config.serve_static_assets = true
- config.static_cache_control = "public, max-age=3600"
-
- # Log error messages when you accidentally call methods on nil
+ # Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
@@ -27,7 +23,7 @@
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
- config.action_mailer.delivery_method = :test
+ # config.action_mailer.delivery_method = :test
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
View
2  config/initializers/secret_token.rb
@@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-SignInWithTwitter::Application.config.secret_token = 'a86790b93f724918487ad4a5992a6cd4bc1fe494a392b6638c3fcae8bd2ebc7f52be5e48008f331fa773c976facf1bf3e8636fcc0ea916cdebece49fed974235'
+TwitterApp::Application.config.secret_token = 'ddfa145fe4dafc1aa25ccb36f6ca1027252c0a165e518e7e33807620593d1525ea4196f52efe99658137fdc22134dc5005287f8fba82b3e965f9a0cbe8b4a1de'
View
4 config/initializers/session_store.rb
@@ -1,8 +1,8 @@
# Be sure to restart your server when you modify this file.
-SignInWithTwitter::Application.config.session_store :cookie_store, key: '_sign-in-with-twitter_session'
+TwitterApp::Application.config.session_store :cookie_store, :key => '_twitter-app_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
-# SignInWithTwitter::Application.config.session_store :active_record_store
+# TwitterApp::Application.config.session_store :active_record_store
View
12 config/initializers/wrap_parameters.rb
@@ -1,12 +0,0 @@
-# Be sure to restart your server when you modify this file.
-#
-# This file contains the settings for ActionController::ParametersWrapper
-# which will be enabled by default in the upcoming version of Ruby on Rails.
-
-# Enable parameter wrapping for JSON. You can disable this by set :format to empty array.
-ActionController::Base.wrap_parameters :format => [:json]
-
-# Disable root element in JSON by default.
-if defined?(ActiveRecord)
- ActiveRecord::Base.include_root_in_json = false
-end
View
2  config/locales/en.yml
@@ -1,5 +1,5 @@
# Sample localization file for English. Add more files in this directory for other locales.
-# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hello world"
View
61 config/routes.rb
@@ -1,58 +1,5 @@
-SignInWithTwitter::Application.routes.draw do
- # The priority is based upon order of creation:
- # first created -> highest priority.
-
- # Sample of regular route:
- # match 'products/:id' => 'catalog#view'
- # Keep in mind you can assign values other than :controller and :action
-
- # Sample of named route:
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
- # This route can be invoked with purchase_url(:id => product.id)
-
- # Sample resource route (maps HTTP verbs to controller actions automatically):
- # resources :products
-
- # Sample resource route with options:
- # resources :products do
- # member do
- # get 'short'
- # post 'toggle'
- # end
- #
- # collection do
- # get 'sold'
- # end
- # end
-
- # Sample resource route with sub-resources:
- # resources :products do
- # resources :comments, :sales
- # resource :seller
- # end
-
- # Sample resource route with more complex sub-resources
- # resources :products do
- # resources :comments
- # resources :sales do
- # get 'recent', :on => :collection
- # end
- # end
-
- # Sample resource route within a namespace:
- # namespace :admin do
- # # Directs /admin/products/* to Admin::ProductsController
- # # (app/controllers/admin/products_controller.rb)
- # resources :products
- # end
-
- # You can have the root of your site routed with "root"
- # just remember to delete public/index.html.
- # root :to => 'welcome#index'
-
- # See how all your routes lay out with "rake routes"
-
- # This is a legacy wild controller route that's not recommended for RESTful applications.
- # Note: This route will make all actions in every controller accessible via GET requests.
- # match ':controller(/:action(/:id(.:format)))'
+TwitterApp::Application.routes.draw do
+ get 'sessions/callback', :to => 'sessions#callback', :as => 'callback'
+ resources :sessions
+ root :to => 'sessions#new'
end
View
4 db/seeds.rb
@@ -3,5 +3,5 @@
#
# Examples:
#
-# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
-# Mayor.create(name: 'Daley', city: cities.first)
+# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
+# Mayor.create(:name => 'Daley', :city => cities.first)
View
43 lib/twitter/authentication_helpers.rb
@@ -0,0 +1,43 @@
+module Twitter
+ module AuthenticationHelpers
+ def self.included(controller)
+ controller.class_eval do
+ helper_method :signed_in?
+ hide_action :signed_in?
+ end
+ end
+
+ def signed_in?
+ !session[:screen_name].nil?
+ end
+
+ protected
+
+ def authenticate
+ deny_access unless signed_in?
+ end
+
+ def deny_access
+ store_location
+ render :template => "/sessions/new", :status => :unauthorized
+ end
+
+ def sign_in(user)
+ session[:screen_name] = user.screen_name if user
+ end
+
+ def redirect_back_or(default)
+ session[:return_to] ||= params[:return_to]
+ if session[:return_to]
+ redirect_to(session[:return_to])
+ else
+ redirect_to(default)
+ end
+ session[:return_to] = nil
+ end
+
+ def store_location
+ session[:return_to] = request.request_uri if request.get?
+ end
+ end
+end
View
0  log/.gitkeep
No changes.
View
BIN  public/images/sign-in-with-twitter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
241 public/index.html
@@ -1,241 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Ruby on Rails: Welcome aboard</title>
- <style type="text/css" media="screen">
- body {
- margin: 0;
- margin-bottom: 25px;
- padding: 0;
- background-color: #f0f0f0;
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
- font-size: 13px;
- color: #333;
- }
-
- h1 {
- font-size: 28px;
- color: #000;
- }
-
- a {color: #03c}
- a:hover {
- background-color: #03c;
- color: white;
- text-decoration: none;
- }
-
-
- #page {
- background-color: #f0f0f0;
- width: 750px;
- margin: 0;
- margin-left: auto;
- margin-right: auto;
- }
-
- #content {
- float: left;
- background-color: white;
- border: 3px solid #aaa;
- border-top: none;
- padding: 25px;
- width: 500px;
- }
-
- #sidebar {
- float: right;
- width: 175px;
- }
-
- #footer {
- clear: both;
- }
-
- #header, #about, #getting-started {
- padding-left: 75px;
- padding-right: 30px;
- }
-
-
- #header {
- background-image: url("/assets/rails.png");
- background-repeat: no-repeat;
- background-position: top left;
- height: 64px;
- }
- #header h1, #header h2 {margin: 0}
- #header h2 {
- color: #888;
- font-weight: normal;
- font-size: 16px;
- }
-
-
- #about h3 {
- margin: 0;
- margin-bottom: 10px;
- font-size: 14px;
- }
-
- #about-content {
- background-color: #ffd;
- border: 1px solid #fc0;
- margin-left: -55px;
- margin-right: -10px;
- }
- #about-content table {
- margin-top: 10px;
- margin-bottom: 10px;
- font-size: 11px;
- border-collapse: collapse;
- }
- #about-content td {
- padding: 10px;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- #about-content td.name {color: #555}
- #about-content td.value {color: #000}
-
- #about-content ul {
- padding: 0;
- list-style-type: none;
- }
-
- #about-content.failure {
- background-color: #fcc;
- border: 1px solid #f00;
- }
- #about-content.failure p {
- margin: 0;
- padding: 10px;
- }
-
-
- #getting-started {
- border-top: 1px solid #ccc;
- margin-top: 25px;
- padding-top: 15px;
- }
- #getting-started h1 {
- margin: 0;
- font-size: 20px;
- }
- #getting-started h2 {
- margin: 0;
- font-size: 14px;
- font-weight: normal;
- color: #333;
- margin-bottom: 25px;
- }
- #getting-started ol {
- margin-left: 0;
- padding-left: 0;
- }
- #getting-started li {
- font-size: 18px;
- color: #888;
- margin-bottom: 25px;
- }
- #getting-started li h2 {
- margin: 0;
- font-weight: normal;
- font-size: 18px;
- color: #333;
- }
- #getting-started li p {
- color: #555;
- font-size: 13px;
- }
-
-
- #sidebar ul {
- margin-left: 0;
- padding-left: 0;
- }
- #sidebar ul h3 {
- margin-top: 25px;
- font-size: 16px;
- padding-bottom: 10px;
- border-bottom: 1px solid #ccc;
- }
- #sidebar li {
- list-style-type: none;
- }
- #sidebar ul.links li {
- margin-bottom: 5px;
- }
-
- .filename {
- font-style: italic;
- }
- </style>
- <script type="text/javascript">
- function about() {
- info = document.getElementById('about-content');
- if (window.XMLHttpRequest)
- { xhr = new XMLHttpRequest(); }
- else
- { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
- xhr.open("GET","rails/info/properties",false);
- xhr.send("");
- info.innerHTML = xhr.responseText;
- info.style.display = 'block'
- }
- </script>
- </head>
- <body>
- <div id="page">
- <div id="sidebar">
- <ul id="sidebar-items">
- <li>
- <h3>Browse the documentation</h3>
- <ul class="links">
- <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
- <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
- <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
- <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
- </ul>
- </li>
- </ul>
- </div>
-
- <div id="content">
- <div id="header">
- <h1>Welcome aboard</h1>
- <h2>You&rsquo;re riding Ruby on Rails!</h2>
- </div>
-
- <div id="about">
- <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
- <div id="about-content" style="display: none"></div>
- </div>
-
- <div id="getting-started">
- <h1>Getting started</h1>
- <h2>Here&rsquo;s how to get rolling:</h2>
-
- <ol>
- <li>
- <h2>Use <code>rails generate</code> to create your models and controllers</h2>
- <p>To see all available options, run it without parameters.</p>
- </li>
-
- <li>
- <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
- <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
- </li>
-
- <li>
- <h2>Create your database</h2>
- <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
- </li>
- </ol>
- </div>
- </div>
-
- <div id="footer">&nbsp;</div>
- </div>
- </body>
-</html>
View
0  vendor/assets/stylesheets/.gitkeep → public/javascripts/.gitkeep
File renamed without changes
View
0  test/unit/.gitkeep → public/stylesheets/.gitkeep
File renamed without changes
View
45 spec/controllers/sessions_controller_spec.rb
@@ -0,0 +1,45 @@
+require 'spec_helper'
+
+describe SessionsController do
+ include TwitterStubs
+
+ describe "/create" do
+ before do
+ stub_oauth_request_token!
+ end
+
+ it "should redirect to twitter authorization url" do
+ get :create
+
+ session['request_token'].should == 't'
+ session['request_secret'].should == 's'
+ response.location.should =~ /api.twitter.com/
+ end
+ end
+
+ describe "/callback" do
+ before do
+ stub_oauth_access_token!
+ stub_verify_credentials!
+ end
+
+ it "should authenticate with twitter" do
+ get :callback, :oauth_verifier => 'some_key'
+
+ session['access_token'].should == 'at'
+ session['access_secret'].should == 'as'
+ session[:screen_name].should == 'felipeelias'
+ response.should be_redirect
+ end
+ end
+
+ describe "/destroy" do
+ it "should logout and destroy all sessions" do
+ delete :destroy, :id => "id"
+
+ ['access_token', 'access_secret', :screen_name].each do |sess|
+ session[sess].should be_nil
+ end
+ end
+ end
+end
View
76 spec/fixtures/verify_credentials.json
@@ -0,0 +1,76 @@
+{
+ "profile_sidebar_border_color": "030303",
+ "name": "Felipe Elias Philipp",
+ "profile_background_tile": true,
+ "profile_sidebar_fill_color": "e0e0e0",
+ "location": "Dublin, Ireland",
+ "profile_image_url": "http:\/\/a2.twimg.com\/profile_images\/1093357788\/ead88a05-fa71-4bb1-9fca-9c1a83fbb7be_normal.png",
+ "created_at": "Thu Feb 21 18:26:18 +0000 2008",
+ "profile_link_color": "2b5c6e",
+ "is_translator": false,
+ "follow_request_sent": false,
+ "id_str": "13781412",
+ "favourites_count": 0,
+ "contributors_enabled": false,
+ "url": "http:\/\/mushmad.posterous.com",
+ "utc_offset": 0,
+ "id": 13781412,
+ "listed_count": 11,
+ "profile_use_background_image": true,
+ "protected": false,
+ "profile_text_color": "000000",
+ "followers_count": 159,
+ "lang": "en",
+ "notifications": false,
+ "geo_enabled": true,
+ "description": "Programmer",
+ "time_zone": "Dublin",
+ "profile_background_color": "041b24",
+ "verified": false,
+ "statuses_count": 995,
+ "profile_background_image_url": "http:\/\/a3.twimg.com\/profile_background_images\/26849589\/3566287076_fc912a6941_b.jpg",
+ "status": {
+ "coordinates": null,
+ "truncated": false,
+ "created_at": "Tue Dec 21 17:52:31 +0000 2010",
+ "favorited": false,
+ "retweeted_status": {
+ "coordinates": null,
+ "truncated": false,
+ "created_at": "Tue Dec 21 10:10:57 +0000 2010",
+ "favorited": false,
+ "id_str": "17160081925734400",
+ "in_reply_to_user_id_str": null,
+ "text": "Essa noite sonhei que meu notebook tinha partido ao meio. Pesadelo de nerd!!!",
+ "contributors": null,
+ "id": 17160081925734400,
+ "retweet_count": 3,
+ "in_reply_to_status_id_str": null,
+ "geo": null,
+ "retweeted": false,
+ "in_reply_to_user_id": null,
+ "place": null,
+ "source": "\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E",
+ "in_reply_to_screen_name": null,
+ "in_reply_to_status_id": null
+ },
+ "id_str": "17276242688475136",
+ "in_reply_to_user_id_str": null,
+ "text": "RT @tapajos: Essa noite sonhei que meu notebook tinha partido ao meio. Pesadelo de nerd!!!",
+ "contributors": null,
+ "id": 17276242688475136,
+ "retweet_count": 3,
+ "in_reply_to_status_id_str": null,
+ "geo": null,
+ "retweeted": false,
+ "in_reply_to_user_id": null,
+ "place": null,
+ "source": "\u003Ca href=\"http:\/\/kiwi-app.net\" rel=\"nofollow\"\u003EKiwi\u003C\/a\u003E",
+ "in_reply_to_screen_name": null,
+ "in_reply_to_status_id": null
+ },
+ "friends_count": 152,
+ "screen_name": "felipeelias",
+ "show_all_inline_media": true,
+ "following": false
+}
View
11 spec/spec_helper.rb
@@ -0,0 +1,11 @@
+ENV["RAILS_ENV"] ||= 'test'
+
+require File.expand_path("../../config/environment", __FILE__)
+require 'rspec/rails'
+require 'webmock/rspec'
+
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+ config.mock_with :rspec
+end
View
17 spec/support/twitter_stubs.rb
@@ -0,0 +1,17 @@
+module TwitterStubs
+ def fixture(name)
+ File.new("#{Rails.root}/spec/fixtures/#{name}.json")
+ end
+
+ def stub_oauth_request_token!
+ stub_request(:post, "http://api.twitter.com/oauth/request_token").to_return(:body => "oauth_token=t&oauth_token_secret=s")
+ end
+
+ def stub_oauth_access_token!
+ stub_request(:post, "http://api.twitter.com/oauth/access_token").to_return(:body => "oauth_token=at&oauth_token_secret=as")
+ end
+
+ def stub_verify_credentials!
+ stub_request(:get, "https://api.twitter.com/1/account/verify_credentials.json").to_return(:body => fixture("verify_credentials"))
+ end
+end
View
0  test/fixtures/.gitkeep
No changes.
View
0  test/functional/.gitkeep
No changes.
View
0  test/integration/.gitkeep
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.