Skip to content
CAI
Software that uses CAICheck a score

janko/down

67.5

Adequate · 6 November 2026

1.3k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Removals

Removed multi-version Ruby testing script

The \bin/test-versions\ script, which was used to run tests across multiple Ruby versions (including 1.9.3, 2.0.0, 2.1.5, 2.2.2, JRuby, and Rubinius), has been removed. This eliminates the automated capability to validate the application against this specific set of legacy and alternative Ruby runtimes.

bin · high confidence

Behavioural changes

201 commits (9 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 201 commits (9 fixs), 8 files: “Remove URL from the error messages”; “Update my GitHub username”; “Fix incorrect timeout settings for Down::Http”; and 197 more (refs \#81, \#105, \#54, \#104, \#95, …).

(repo-wide) · low confidence · unverified

5 commits (0 fixes) modifying sig

A change to existing behaviour in sig — 5 commits, 17 files: “Match IO behaviour in Down::ChunkedIO”; “Remove top-level headers option in Down::NetHttp”; “Reduce Down::ChunkedIO allocations, especially for IO.copy\_stream”; and 2 more.

sig · medium confidence · unverified

Down library rewritten with new backends and ChunkedIO

The Down library has been completely rewritten, introducing a new \Down::ChunkedIO\ class that wraps response enumerators into IO-like objects for streaming downloads. The library now supports multiple HTTP backends: \Down::Http\ (using http.rb), \Down::Httpx\ (using HTTPX), \Down::NetHttp\ (using Net::HTTP/open-uri), and a deprecated \Down::Wget\ backend. The rewrite includes improved error handling with specific exception classes like \Down::NotFound\, \Down::ClientError\, and \Down::ServerError\, better memory management through chunked reading, and support for features like progress callbacks, content length checks, and basic authentication across all backends.

lib/down · high confidence

Refactor to pluggable HTTP backends with Net::HTTP as default

The library has been refactored to support pluggable HTTP backends, replacing the previous single-implementation approach. The default backend is now explicitly set to \Down::NetHttp\, and the core \download\ and \open\ methods now delegate to this backend, allowing users to switch implementations (e.g., to HTTP.rb) via the \Down.backend\ setter. This change removes direct dependencies on \open-uri\ and \timeout\ in the main entry point, simplifies the API by forwarding arguments to the backend, and introduces a version-aware User-Agent header.

lib · high confidence

Test coverage

Added test support helpers for deprecation, warnings, and a local httpbin server; Migrate test suite to real HTTP server and new backend tests.

Dependencies

Upgrade to Ruby 3.2+ and modernize dependencies

The gem now requires Ruby 3.2 or higher, dropping support for older versions. Dependencies have been updated to use addressable \~\> 2.8 and base64 \~\> 0.3, while development dependencies now include minitest \~\> 6.0, mocha \~\> 1.5, and specific versions of httpx and http for testing. The gemspec also explicitly lists included files and adds a license field.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 63 → 67 (+4.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 99 (+24.7)
  • Architecture 69 → 69 (+0.0)
  • Maturity 54 → 59 (+4.7)
  • Readiness 67 → 67 (+0.0)
  • Security 97 → 100 (+2.9)

Resolved (14)

  • ChunkedIO.gets (cognitive 21) (lib/down/chunked_io.rb)
  • ChunkedIO.gets (cyclomatic 16) (lib/down/chunked_io.rb)
  • ChunkedIO.readpartial (cognitive 18) (lib/down/chunked_io.rb)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Inconsistent accessor style for the charset property. Http and Wget use a method call (charset()), while Httpx uses a property access (charset).
  • Inconsistent accessor style for the content_type property. Http, NetHttp, and Wget use a method call (content_type()), while Httpx uses a property access (content_type). This breaks consistency in how users retrieve the same information.
  • Inconsistent method signatures for the 'open' operation across backend implementations. Similar to download(), NetHttp.open() takes only a URL, while Http/Httpx take (url, rewindable), and Wget takes (url, args, rewindable, options). This inconsistency makes it difficult to swap backends transparently.
  • Inconsistent method signatures for the primary download operation across different backend implementations. While Down.download() and Down.Backend.download() provide a unified interface, the specific backend classes (Http, Httpx, NetHttp, Wget) expose vastly different signatures. NetHttp.download() only takes a URL, whereas Http/Httpx/Wget require numerous positional arguments for size limits, progress callbacks, and file handling. This forces users to know the specific backend's signature or rely on the top-level Down module, breaking polymorphism.
  • Inconsistent property vs method access for metadata. Httpx exposes url, headers, charset, and content_type as properties, while Http and Wget expose url and headers as properties but content_type() and charset() as methods. This creates a confusing API where the same type of data is accessed differently depending on the backend.
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Wget.download (cognitive 16) (lib/down/wget.rb)

New (4)

  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)

Changes since last survey

  • 11 commits — 11 feature/other, 0 fixes

By area

  • (root) — 9 commits
  • .github/workflows — 1 commit
  • sig/generated — 1 commit

Notable commits

  • change: Add RBS type signatures
  • change: Add security policy
  • change: Bump actions/checkout to v7
  • change: Bump to 5.6.2
  • change: Delegate Down::ChunkedIO reading to a Tempfile or StringIO
  • change: Don't report compressed Content-Length as ChunkedIO size (#104)
  • change: Match IO behaviour in Down::ChunkedIO
  • change: Pass response positionally to ResponseError on invalid redirects (#105)
  • change: Reduce Down::ChunkedIO allocations, especially for IO.copy_stream
  • change: Remove deprecated wget backend
  • change: Remove top-level headers option in Down::NetHttp

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

janko/down was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 3402532e5323118b7307caade35f220934ffba22 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.