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

ruby-grape / grape / 35255857841
99%
master: 99%

Build:
Build:
LAST BUILD BRANCH: fix/array-scope-non-hash-elements
DEFAULT BRANCH: master
Ran 17 Sep 2026 05:57PM UTC
Jobs 32
Files 170
Run time 2min
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

17 Sep 2026 05:56PM UTC coverage: 99.047% (+0.8%) from 98.297%
35255857841

push

github

ericproulx
Speed up path-versioned requests and error responses

Three steps every request pays for, none of which had anything left to do
by the time they ran.

A path-versioned request is matched by a route whose pattern captures the
version, so by the time the versioner runs, the answer is already in the
routing args. `Versioner::Path` recorded it from inside `#before`, which
`Middleware::Base#call` reaches through a per-request copy of the
middleware -- made so that `#before` and `#after` can keep request state on
it. There is no state to keep here: the routed request now records the
version and calls the app, and a request the router did not match (the
greedy routes behind 405 and auto-OPTIONS, or the middleware used on its
own) still goes through the copy and parses the path as before.

`Middleware::Error#call!` returned the app's response from inside the
block it passes to `Kernel#catch`. A `return` from there leaves the method
the way a `throw` does, allocating for the unwind, on every request that
did not fail. It now records whether the app answered and reads that
after the `catch`.

`DSL::Entity#entity_class_for_obj` asked for the `represent` registrations
once per lookup, and it does two: the object's class, then its element
class. Resolving them walks every scope up to the API's root, and a Hash
answers `#first`, so `error!({ ... })` and `present hash` walked it twice.
It is read once and handed to both.

Measured against master, three interleaved rounds, no JIT / YJIT: a
path-versioned JSON GET +16.1% / +13.5%, the same GET carrying six headers
+12.1% / +12.8%, `error!` in a before filter +6.2% / +2.0%, an error
rendered by `rescue_from` +7.9% / +4.5%, a mounted API's GET +6.8% / +3.1%,
query params, a JSON body and a nested route +2.1% to +3.9%. A 405 on a
path-versioned API is -0.5% / -3.7%: a request the router did not match
now asks whether it was routed before falling through.

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

1427 of 1482 branches covered (96.29%)

Branch coverage included in aggregate %.

16 of 16 new or added lines in 3 files covered. (100.0%)

4288 of 4288 relevant lines covered (100.0%)

28137.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_json_1_20.gemfile - 35255857841.1 17 Sep 2026 05:57PM UTC 168
46.15
GitHub Action Run
2 run-4.0-gemfiles/rack_3_0.gemfile - 35255857841.2 17 Sep 2026 05:57PM UTC 169
97.74
GitHub Action Run
3 run-4.0-gemfiles/multi_xml_0_8.gemfile - 35255857841.3 17 Sep 2026 05:57PM UTC 168
45.87
GitHub Action Run
4 run-3.3-gemfiles/rails_7_2.gemfile - 35255857841.4 17 Sep 2026 05:57PM UTC 170
97.78
GitHub Action Run
5 run-3.3-gemfiles/rack_3_0.gemfile - 35255857841.5 17 Sep 2026 05:57PM UTC 169
97.78
GitHub Action Run
6 run-3.4-gemfiles/rack_3_1.gemfile - 35255857841.6 17 Sep 2026 05:58PM UTC 169
97.76
GitHub Action Run
7 run-3.3-gemfiles/rails_8_1.gemfile - 35255857841.7 17 Sep 2026 05:57PM UTC 170
97.76
GitHub Action Run
8 run-4.0-gemfiles/hashie.gemfile - 35255857841.8 17 Sep 2026 05:58PM UTC 168
59.88
GitHub Action Run
9 run-4.0-gemfiles/grape_swagger.gemfile - 35255857841.9 17 Sep 2026 05:57PM UTC 168
53.43
GitHub Action Run
10 run-3.3-gemfiles/rails_8_0.gemfile - 35255857841.10 17 Sep 2026 05:57PM UTC 170
97.78
GitHub Action Run
11 run-4.0-gemfiles/dry_validation.gemfile - 35255857841.11 17 Sep 2026 05:57PM UTC 168
56.17
GitHub Action Run
12 run-4.0-gemfiles/multi_xml.gemfile - 35255857841.12 17 Sep 2026 05:57PM UTC 168
45.83
GitHub Action Run
13 run-4.0-gemfiles/rails_7_2.gemfile - 35255857841.13 17 Sep 2026 05:58PM UTC 170
97.75
GitHub Action Run
14 run-3.4-gemfiles/rack_3_2.gemfile - 35255857841.14 17 Sep 2026 05:57PM UTC 169
97.76
GitHub Action Run
15 run-3.4-gemfiles/rack_2_2.gemfile - 35255857841.15 17 Sep 2026 05:57PM UTC 169
97.71
GitHub Action Run
16 run-3.3-Gemfile - 35255857841.16 17 Sep 2026 05:57PM UTC 169
97.76
GitHub Action Run
17 run-4.0-gemfiles/rails_8_0.gemfile - 35255857841.17 17 Sep 2026 05:57PM UTC 170
97.76
GitHub Action Run
18 run-3.3-gemfiles/rack_2_2.gemfile - 35255857841.18 17 Sep 2026 05:58PM UTC 169
97.74
GitHub Action Run
19 run-4.0-Gemfile - 35255857841.19 17 Sep 2026 05:57PM UTC 169
97.76
GitHub Action Run
20 run-3.4-gemfiles/rack_3_0.gemfile - 35255857841.20 17 Sep 2026 05:58PM UTC 169
97.74
GitHub Action Run
21 run-4.0-gemfiles/grape_entity.gemfile - 35255857841.21 17 Sep 2026 05:58PM UTC 168
49.04
GitHub Action Run
22 run-4.0-gemfiles/rack_3_2.gemfile - 35255857841.22 17 Sep 2026 05:57PM UTC 169
97.74
GitHub Action Run
23 run-3.4-Gemfile - 35255857841.23 17 Sep 2026 05:57PM UTC 169
97.76
GitHub Action Run
24 run-3.4-gemfiles/rails_8_1.gemfile - 35255857841.24 17 Sep 2026 05:57PM UTC 170
97.75
GitHub Action Run
25 run-3.4-gemfiles/rails_8_0.gemfile - 35255857841.25 17 Sep 2026 05:57PM UTC 170
97.76
GitHub Action Run
26 run-3.3-gemfiles/rack_3_1.gemfile - 35255857841.26 17 Sep 2026 05:57PM UTC 169
97.76
GitHub Action Run
27 run-4.0-gemfiles/rack_2_2.gemfile - 35255857841.27 17 Sep 2026 05:58PM UTC 169
97.71
GitHub Action Run
28 run-3.4-gemfiles/rails_7_2.gemfile - 35255857841.28 17 Sep 2026 05:57PM UTC 170
97.75
GitHub Action Run
29 run-4.0-gemfiles/rails_8_1.gemfile - 35255857841.29 17 Sep 2026 05:58PM UTC 170
97.75
GitHub Action Run
30 run-4.0-gemfiles/rack_3_1.gemfile - 35255857841.30 17 Sep 2026 05:57PM UTC 169
97.74
GitHub Action Run
31 run-4.0-gemfiles/multi_json.gemfile - 35255857841.31 17 Sep 2026 05:57PM UTC 168
46.11
GitHub Action Run
32 run-3.3-gemfiles/rack_3_2.gemfile - 35255857841.32 17 Sep 2026 05:58PM UTC 169
97.78
GitHub Action Run
Source Files on build 35255857841
  • Tree
  • List 170
  • Changed 154
  • Source Changed 3
  • Coverage Changed 154
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35255857841
  • 048ac948 on github
  • Prev Build on master (#35237531125)
  • Next Build on perf/routed-version-fast-path (#35255936320)
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