Skip to content

Commit

Permalink
Merge pull request #357 from vid-io/fix/excon-dependency
Browse files Browse the repository at this point in the history
Limit excon dependency version
  • Loading branch information
bblimke committed Jan 16, 2014
2 parents 3c670aa + b4f7ca4 commit 1095cde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions spec/acceptance/excon/excon_spec_helper.rb
Expand Up @@ -7,8 +7,13 @@ def http_request(method, uri, options = {}, &block)
uri = Addressable::URI.heuristic_parse(uri)
uri = uri.omit(:userinfo).to_s.gsub(' ', '%20')

options = options.merge(:method => method, :nonblock => false) # Dup and merge
response = Excon.new(uri).request(options, &block)
if Gem::Version.new(Excon::VERSION) < Gem::Version.new("0.29.0")
options = options.merge(:method => method, :nonblock => false) # Dup and merge
response = Excon.new(uri).request(options, &block)
else
options = options.merge(:method => method) # Dup and merge
response = Excon.new(uri, :nonblock => false).request(options, &block)
end

headers = WebMock::Util::Headers.normalize_headers(response.headers)
headers = headers.inject({}) do |res, (name, value)|
Expand Down
2 changes: 1 addition & 1 deletion webmock.gemspec
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'em-synchrony', '>= 1.0.0' if RUBY_VERSION >= "1.9"
s.add_development_dependency 'curb', '>= 0.8.0' unless RUBY_PLATFORM =~ /java/
s.add_development_dependency 'typhoeus', '>= 0.5.0' unless RUBY_PLATFORM =~ /java/
s.add_development_dependency 'excon', '>= 0.22.0'
s.add_development_dependency 'excon', '>= 0.27.5', '< 0.30.0'
s.add_development_dependency 'minitest', '~> 5.0.0'
s.add_development_dependency 'rdoc', ((RUBY_VERSION == '1.8.6') ? '<= 3.5.0' : '>3.5.0')

Expand Down

0 comments on commit 1095cde

Please sign in to comment.