• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lostisland / faraday / #4688
96%
master: 92%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 22 Nov 2026 11:37AM UTC
Jobs 1
Files 35
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Nov 2026 11:36AM UTC coverage: 95.083% (-0.7%) from 95.737%
#4688

push

web-flow
Convert ProxyOptions, RequestOptions, SSLOptions to BaseOptions (#1651) (#1733)

* Add StructCompat, the Struct-style API of the legacy Options

Options converted to BaseOptions keep the whole Struct-style API with its
legacy semantics through 2.x, as official adapters support every 2.x release.
It is slated for removal in 3.0.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Convert ProxyOptions to BaseOptions

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Convert RequestOptions to BaseOptions

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Convert SSLOptions to BaseOptions

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Fix yard-junk link in StructCompat documentation

{.from} -> {ClassMethods.from} so yard can resolve it.

* Trim StructCompat to the API adapters and middleware use

The official adapters and middleware (from awesome-faraday) only read the
converted options through `[]`, `fetch(key, default)` and `key?`
(e.g. `env[:request][:proxy][:uri]`, `env[:ssl].fetch(:verify, true)`,
`ssl.key?(:verify_hostname)`). Env and ConnectionOptions, still legacy
Options, need nothing else from them: they coerce with `from`, copy with
`deep_dup` and merge with `merge`, which BaseOptions provides.

So StructCompat keeps only `[]`, `fetch` and `key?`. Everything else goes:
`[]=` (including the RequestOptions proxy coercion), positional `new`,
the falsy `from`, the shallow `from`/`deep_dup`, the legacy `merge!`,
`to_hash` and `inspect`, Enumerable and the Hash-like readers, equality,
`is_a?(Faraday::Options)` and the `Utils.deep_merge!` special case.

RequestOptions now coerces `proxy` to ProxyOptions (nil when falsy):
without it, BaseOptions#deep_dup turned a ProxyOptions into a Hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Cl... (continued)

77 of 78 new or added lines in 5 files covered. (98.72%)

20 existing lines in 11 files now uncovered.

1605 of 1688 relevant lines covered (95.08%)

139.36 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.3
-3.7% lib/faraday/options/proxy_options.rb

Coverage Regressions

Lines Coverage ∆ File
6
92.79
-5.42% lib/faraday/options.rb
3
91.47
-1.55% lib/faraday/adapter/test.rb
2
97.7
-2.3% lib/faraday/error.rb
2
93.33
-3.33% lib/faraday/logging/formatter.rb
1
98.0
-2.0% lib/faraday/base_options.rb
1
84.66
-0.52% lib/faraday/connection.rb
1
95.83
-4.17% lib/faraday/middleware_registry.rb
1
81.43
-0.26% lib/faraday/options/env.rb
1
97.06
-2.94% lib/faraday/request/json.rb
1
95.65
-4.35% lib/faraday/response/raise_error.rb
1
95.77
-1.45% lib/faraday/utils.rb
Jobs
ID Job ID Ran Files Coverage
1 #4688.1 22 Nov 2026 11:37AM UTC 35
95.08
Source Files on build #4688
  • Tree
  • List 35
  • Changed 21
  • Source Changed 0
  • Coverage Changed 21
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c3427f12 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc