Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix timeout bug; lock faraday dependency to version < 0.10

  • Loading branch information...
commit 01e2781e4a78137ca4e5e6d3e4faf2552ee9ec76 1 parent 70c05b1
@sferik authored
Showing with 12 additions and 8 deletions.
  1. +9 −5 lib/twitter/default.rb
  2. +3 −3 twitter.gemspec
View
14 lib/twitter/default.rb
@@ -1,4 +1,5 @@
require 'faraday'
+require 'faraday/request/multipart'
require 'twitter/configurable'
require 'twitter/error/client_error'
require 'twitter/error/server_error'
@@ -13,12 +14,15 @@ module Default
CONNECTION_OPTIONS = {
:headers => {
:accept => 'application/json',
- :user_agent => "Twitter Ruby Gem #{Twitter::Version}"
+ :user_agent => "Twitter Ruby Gem #{Twitter::Version}",
+ },
+ :request => {
+ :open_timeout => 5,
+ :timeout => 10,
+ },
+ :ssl => {
+ :verify => false
},
- :open_timeout => 5,
- :raw => true,
- :ssl => {:verify => false},
- :timeout => 10,
} unless defined? Twitter::Default::CONNECTION_OPTIONS
IDENTITY_MAP = false unless defined? Twitter::Default::IDENTITY_MAP
MIDDLEWARE = Faraday::Builder.new do |builder|
View
6 twitter.gemspec
@@ -2,9 +2,9 @@
require File.expand_path('../lib/twitter/version', __FILE__)
Gem::Specification.new do |spec|
- spec.add_dependency 'faraday', '~> 0.8'
- spec.add_dependency 'multi_json', '~> 1.3'
- spec.add_dependency 'simple_oauth', '~> 0.2'
+ spec.add_dependency 'faraday', ['~> 0.8', '< 0.10']
+ spec.add_dependency 'multi_json', ['~> 1.3']
+ spec.add_dependency 'simple_oauth', ['~> 0.2']
spec.add_development_dependency 'kramdown'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'simplecov'

0 comments on commit 01e2781

Please sign in to comment.
Something went wrong with that request. Please try again.