Skip to content

Commit

Permalink
Remove untested gateway middleware
Browse files Browse the repository at this point in the history
TODO: Allow modifications to middleware stack for people who want to
continue using the library to talk to gateways.
  • Loading branch information
sferik committed Jun 6, 2012
1 parent 24ee20c commit 7e501a9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
5 changes: 0 additions & 5 deletions lib/twitter/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ module Config
# @see http://developer.typepad.com/typepad-twitter-api/twitter-api.html
DEFAULT_ENDPOINT = 'https://api.twitter.com'

# The gateway server if none is set
DEFAULT_GATEWAY = nil

# This endpoint will be used by default when updating statuses with media
DEFAULT_MEDIA_ENDPOINT = 'https://upload.twitter.com'

Expand Down Expand Up @@ -56,7 +53,6 @@ module Config
:consumer_key,
:consumer_secret,
:endpoint,
:gateway,
:oauth_token,
:oauth_token_secret,
:proxy,
Expand Down Expand Up @@ -92,7 +88,6 @@ def reset
self.consumer_key = DEFAULT_CONSUMER_KEY
self.consumer_secret = DEFAULT_CONSUMER_SECRET
self.endpoint = DEFAULT_ENDPOINT
self.gateway = DEFAULT_GATEWAY
self.media_endpoint = DEFAULT_MEDIA_ENDPOINT
self.oauth_token = DEFAULT_OAUTH_TOKEN
self.oauth_token_secret = DEFAULT_OAUTH_TOKEN_SECRET
Expand Down
4 changes: 1 addition & 3 deletions lib/twitter/connection.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'faraday'
require 'twitter/core_ext/hash'
require 'twitter/request/gateway'
require 'twitter/request/multipart_with_file'
require 'twitter/request/oauth'
require 'twitter/response/parse_json'
Expand Down Expand Up @@ -32,11 +31,10 @@ def connection
builder.use Twitter::Request::OAuth, credentials if credentials?
builder.use Faraday::Request::Multipart
builder.use Faraday::Request::UrlEncoded
builder.use Twitter::Request::Gateway, gateway if gateway
builder.use Twitter::Response::RaiseClientError
builder.use Twitter::Response::ParseJson
builder.use Twitter::Response::RaiseServerError
builder.adapter(adapter)
builder.adapter adapter
end
end

Expand Down
20 changes: 0 additions & 20 deletions lib/twitter/request/gateway.rb

This file was deleted.

1 change: 0 additions & 1 deletion spec/twitter/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
:oauth_token_secret => 'OS',
:adapter => :typhoeus,
:endpoint => 'http://tumblr.com/',
:gateway => 'gateway.example.com',
:proxy => 'http://erik:[email protected]:8080',
:search_endpoint => 'http://google.com/',
:media_endpoint => 'https://upload.twitter.com/',
Expand Down

0 comments on commit 7e501a9

Please sign in to comment.