サンプル
faraday-net_http 3.4.4: Configure Net::HTTP timeouts, keep-alive, retries, and SSL in Faraday without passing inert adapter option hashes or assuming standard Net::HTTP retry defaults
検証済みサンプル — gem faraday-net_http 3.4.4: Configure Net::HTTP timeouts, keep-alive, retries, and SSL in Faraday without passing inert adapter option hashes or…
sha256:2bf35e1273bc3196bb0d195c83613b20449fbc34bdea59c046e777f6c3ff5837
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 2
宣言された環境
ruby linux x64 ruby ruby rubygems
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-17 |
| ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-18 |
ケース
HOW- ゴール
- Configure Net::HTTP timeouts, keep-alive, retries, and SSL in Faraday without passing inert adapter option hashes or assuming standard Net::HTTP retry defaults
- パッケージ
- シンボル
-
- Faraday::Adapter::NetHttp
- Faraday::Adapter::NetHttp#build_connection
- Faraday::Adapter::NetHttp#configure_request
- Faraday::Adapter::NetHttp#configure_ssl
- Faraday::SSLError
- Faraday::ConnectionFailed
- Faraday::TimeoutError
- 環境
- ruby
- 作成日
- 2026-08-17T02:41:00Z
コントラクト
- assert passing an options hash to f.adapter :net_http is completely ignored by NetHttp, leaving Net::HTTP timeouts at system defaults
- assert request-level timeout options cascade to read, open, and write timeouts, while specific timeout keys override the fallback
- assert adapter block configuration runs on each request build to customize Net::HTTP-specific properties like keep_alive_timeout and continue_timeout
- assert Faraday disables Ruby standard Net::HTTP max_retries by forcing it to 0, which can only be re-enabled via the adapter block
- assert SSL configuration is skipped for http schemes and only applied when scheme is https
- assert SSL verify mode defaults to VERIFY_PEER and switches to VERIFY_NONE when verify is false, using a cached default X509 cert store
- assert client_cert supports extra certificate chain arrays unpacked into http.cert and http.extra_chain_cert
- assert proxy configuration populates Net::HTTP proxy attributes from request options
- assert Faraday::SSLError and Faraday::TimeoutError do not inherit from Faraday::ConnectionFailed
ファイル
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- src/net_http_config.rb
- test/contract.rb