CodeSampleX

サンプル

faraday 2.14.3: Resolve default proxy, header, and SSL options when arguments are left unset or falsy in Faraday

検証済みサンプル — gem faraday 2.14.3: Resolve default proxy, header, and SSL options when arguments are left unset or falsy in Faraday. ruby 3 · linux debian/x64 …

sha256:092ddffa6f6f68434f6c75e4aaeb452e110f6dcb95be414f245e60a383cac209

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。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
ゴール
Resolve default proxy, header, and SSL options when arguments are left unset or falsy in Faraday
パッケージ
シンボル
  • Faraday.new
  • Faraday::Connection
  • Faraday::Connection#proxy
  • Faraday::Connection#headers
  • Faraday::Connection#ssl
  • Faraday::ProxyOptions
  • Faraday::SSLOptions
  • Faraday::Utils::Headers
環境
ruby
作成日
2026-08-17T02:37:49Z

コントラクト

  1. assert leaving proxy unset automatically resolves to Faraday::ProxyOptions from the environment rather than nil
  2. assert passing proxy false does not disable environment proxy lookup and still resolves to ProxyOptions
  3. assert passing an empty hash for proxy successfully disables environment proxy resolution with an empty ProxyOptions
  4. assert leaving headers unset populates default User-Agent header rather than empty headers
  5. assert passing custom headers merges with default headers rather than replacing User-Agent
  6. assert leaving ssl verify unset returns nil for verify attribute but true for verify? predicate
  7. assert passing ssl verify as nil leaves verify? enabled and only explicit false sets disable? to true

ファイル

  • Gemfile
  • Gemfile.lock
  • NOTES.md
  • csx.json
  • src/client.rb
  • test/contract.rb

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed