Browse files

Make HTTP driver configuration (default to Excon)

  • Loading branch information...
1 parent 65fd587 commit f4ecf127ad2951368d4ece8317c69692f13e3b0c @mtodd committed Mar 3, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/pingdom/client.rb
View
4 lib/pingdom/client.rb
@@ -6,13 +6,13 @@ class Client
attr_accessor :limit
def initialize(options = {})
- @options = options.with_indifferent_access
+ @options = options.with_indifferent_access.reverse_merge(:http_driver => :excon)
@connection = Faraday::Connection.new(:url => "https://api/pingdom.com/api/2.0/") do |builder|
builder.url_prefix = "https://api.pingdom.com/api/2.0"
builder.adapter :logger, @options[:logger]
- builder.adapter :excon
+ builder.adapter @options[:http_driver]
# builder.use Gzip # TODO: write GZip response handler, add Accept-Encoding: gzip header
builder.response :yajl

0 comments on commit f4ecf12

Please sign in to comment.