Upgrade to HTTP.rb v4 (#9)

This allows Goldfinger to run against the HTTP gem v4.x, by updating the
`HTTP.timeout` syntax used in `Goldfinger::Request`.
This commit is contained in:
Tom Scott 2019-01-14 04:23:20 -05:00 committed by Eugen Rochko
parent 1fca7e670e
commit 2deb9da0ab
3 changed files with 11 additions and 11 deletions

View File

@ -3,7 +3,7 @@ PATH
specs:
goldfinger (2.1.0)
addressable (~> 2.5)
http (~> 3.0)
http (~> 4.0)
nokogiri (~> 1.8)
oj (~> 3.0)
@ -16,31 +16,31 @@ GEM
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
domain_name (0.5.20170404)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
fuubar (2.2.0)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
hashdiff (0.3.4)
http (3.0.0)
http (4.0.0)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (>= 2.0.0.pre.pre2, < 3)
http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
http-form_data (2.0.0)
http-form_data (2.1.1)
http_parser.rb (0.6.0)
method_source (0.8.2)
mini_portile2 (2.3.0)
nokogiri (1.8.1)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
oj (3.3.10)
oj (3.7.4)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_suffix (3.0.1)
public_suffix (3.0.3)
rake (12.0.0)
rspec (3.6.0)
rspec-core (~> 3.6.0)
@ -60,7 +60,7 @@ GEM
slop (3.6.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.4)
unf_ext (0.0.7.5)
webmock (3.0.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)

View File

@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/Gargron/goldfinger'
s.licenses = ['MIT']
s.add_dependency('http', '~> 3.0')
s.add_dependency('http', '~> 4.0')
s.add_dependency('addressable', '~> 2.5')
s.add_dependency('nokogiri', '~> 1.8')
s.add_dependency('oj', '~> 3.0')

View File

@ -18,7 +18,7 @@ module Goldfinger
private
def http_client
HTTP.timeout(:per_operation, write: 60, connect: 20, read: 60).follow
HTTP.timeout(write: 60, connect: 20, read: 60).follow
end
end
end