Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmb committed Sep 16, 2024
1 parent 01f9c79 commit 96882fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion faraday-net_http_persistent.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency "faraday", "~> 2.5"
spec.add_dependency "net-http-persistent", "~> 4.0.4"
spec.add_dependency "net-http-persistent", ">= 4.0.4", "< 5"
end
9 changes: 3 additions & 6 deletions spec/faraday/adapter/net_http_persistent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@

http = adapter.send(:connection, url: url, request: {})

# `pool` is only present in net_http_persistent >= 3.0
expect(http.pool.size).to eq(5) if http.respond_to?(:pool)
expect(http.pool.size).to eq(5)
end

it "allows to set verify_hostname in SSL settings to false" do
Expand All @@ -49,8 +48,7 @@
http = adapter.send(:connection, url: url, request: {})
adapter.send(:configure_ssl, http, verify_hostname: false)

# `verify_hostname` is only present in net_http_persistent >= 4.0.4
expect(http.verify_hostname).to eq(false) if http.respond_to?(:verify_hostname)
expect(http.verify_hostname).to eq(false)
end

context "min_version" do
Expand All @@ -62,8 +60,7 @@
http = adapter.send(:connection, url: url, request: {})
adapter.send(:configure_ssl, http, min_version: :TLS1_2)

# `min_version` is only present in net_http_persistent >= 3.1
expect(http.min_version).to eq(:TLS1_2) if http.respond_to?(:min_version)
expect(http.min_version).to eq(:TLS1_2)
end
end
end

0 comments on commit 96882fa

Please sign in to comment.