Skip to content

Commit 28a2343

Browse files
committed
Use http 4.x for ruby 2.4 and 2.3
1 parent a44b109 commit 28a2343

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

down.gemspec

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ Gem::Specification.new do |spec|
2020
spec.add_development_dependency "minitest", "~> 5.8"
2121
spec.add_development_dependency "mocha", "~> 1.5"
2222
spec.add_development_dependency "rake"
23-
spec.add_development_dependency "http", "~> 5.0"
23+
if RUBY_VERSION >= "2.5"
24+
spec.add_development_dependency "http", "~> 5.0"
25+
else
26+
spec.add_development_dependency "http", "~> 4.3"
27+
end
2428
spec.add_development_dependency "posix-spawn" unless RUBY_ENGINE == "jruby"
2529
spec.add_development_dependency "http_parser.rb"
2630
spec.add_development_dependency "docker-api"

test/support/warnings.rb

+5
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
require "warning"
33

44
Warning.process('', /instance variable @\w+ not initialized/ => :raise)
5+
6+
# Starting on ruby 2.5 we use http.rb 5.0. That version don't have http-parser has a dependency
7+
if RUBY_VERSION < "2.5"
8+
Warning.ignore(/interpreted as argument prefix/, Gem::Specification.find_by_name("http-parser").load_paths.first)
9+
end
510
end

0 commit comments

Comments
 (0)