Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use symbol to set adapter

  • Loading branch information...
commit b64d36f953b1ff6dbda1f0456b9b56f548587b1f 1 parent 0546836
@sferik sferik authored
Showing with 6 additions and 9 deletions.
  1. +4 −4 lib/twitter/api.rb
  2. +2 −5 lib/twitter/configuration.rb
View
8 lib/twitter/api.rb
@@ -5,6 +5,10 @@
module Twitter
# @private
class API
+ include Connection
+ include Request
+ include Authentication
+
# @private
attr_accessor *Configuration::VALID_OPTIONS_KEYS
@@ -15,9 +19,5 @@ def initialize(options={})
send("#{key}=", options[key])
end
end
-
- include Connection
- include Request
- include Authentication
end
end
View
7 lib/twitter/configuration.rb
@@ -1,4 +1,3 @@
-require 'faraday'
require 'twitter/version'
module Twitter
@@ -19,9 +18,7 @@ module Configuration
:user_agent].freeze
# The adapter that will be used to connect if none is set
- #
- # @note The default faraday adapter is Net::HTTP.
- DEFAULT_ADAPTER = Faraday.default_adapter
+ DEFAULT_ADAPTER = :net_http
# By default, don't set an application key
DEFAULT_CONSUMER_KEY = nil
@@ -79,7 +76,7 @@ def configure
# Create a hash of options and their values
def options
options = {}
- VALID_OPTIONS_KEYS.each{|k| options[k] = send(k) }
+ VALID_OPTIONS_KEYS.each{|k| options[k] = send(k)}
options
end
Please sign in to comment.
Something went wrong with that request. Please try again.