Skip to content

Commit

Permalink
Use http 4.x for ruby 2.4 and 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrunberg committed May 17, 2021
1 parent a44b109 commit 82ba6a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion down.gemspec
Expand Up @@ -20,7 +20,11 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "minitest", "~> 5.8"
spec.add_development_dependency "mocha", "~> 1.5"
spec.add_development_dependency "rake"
spec.add_development_dependency "http", "~> 5.0"
if RUBY_VERSION >= "2.5"
spec.add_development_dependency "http", "~> 5.0"
else
spec.add_development_dependency "http", "~> 4.3"
end
spec.add_development_dependency "posix-spawn" unless RUBY_ENGINE == "jruby"
spec.add_development_dependency "http_parser.rb"
spec.add_development_dependency "docker-api"
Expand Down
5 changes: 5 additions & 0 deletions test/support/warnings.rb
Expand Up @@ -3,3 +3,8 @@

Warning.process('', /instance variable @\w+ not initialized/ => :raise)
end

# Starting on ruby 2.5 we use http.rb 5.0. That version don't have http-parser has a dependency
if RUBY_VERSION < "2.5"
Warning.ignore(/interpreted as argument prefix/, Gem::Specification.find_by_name("http-parser").load_paths.first)
end

0 comments on commit 82ba6a9

Please sign in to comment.