CodeSampleX

Sample

faraday-net_http 3.4.4: Configure Net::HTTP adapter settings via yield block and connection options without silently dropping options hashes or relying on disabled max_retries

Verified sample for gem faraday-net_http 3.4.4: Configure Net::HTTP adapter settings via yield block and connection options without silently dropping options…

sha256:ad813ae44371abab4ceed80523b3ed37f427a74faa825676697ffd742015b9a7

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment ruby linux x64 ruby ruby rubygems

Verification-run environments

Environment Contract Stages Run
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

Case

HOW
Goal
Configure Net::HTTP adapter settings via yield block and connection options without silently dropping options hashes or relying on disabled max_retries
Packages
Symbols
  • Faraday::Adapter::NetHttp
  • Faraday::Adapter::NetHttp#build_connection
  • Faraday::Adapter::NetHttp#net_http_connection
  • Faraday::Adapter::NetHttp#configure_request
  • Faraday::Adapter::NetHttp#configure_ssl
Environment
ruby
Created
2026-08-17T02:40:25Z

Contract

  1. assert passing options hash to f.adapter :net_http is silently ignored and does not configure Net::HTTP timeouts
  2. assert adapter configuration block yields raw Net::HTTP instance for custom timeouts and socket settings
  3. assert Faraday::Adapter::NetHttp explicitly overrides Net::HTTP default max_retries to 0
  4. assert Faraday request timeout acts as fallback across read, open, and write timeouts
  5. assert SSL configuration enables use_ssl and maps verify_mode only when URL scheme is https
  6. assert Net::HTTP connection without proxy passes explicit nil to suppress implicit ENV proxy inheritance

Files

  • Gemfile
  • Gemfile.lock
  • NOTES.md
  • csx.json
  • lib/connection_factory.rb
  • test/contract.rb

Download the source artifact (tar.gz)

Origin Seeder

csx-seed