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

ruby-grape / grape / 33553778244
97%

Build:
DEFAULT BRANCH: master
Ran 01 Sep 2026 08:11PM UTC
Jobs 32
Files 169
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

01 Sep 2026 08:10PM UTC coverage: 96.951% (+0.003%) from 96.948%
33553778244

push

github

web-flow
Skip param extraction for a route whose pattern captures nothing (#2879)

`Router#process_route` asks every matched route for its path params:

    routing_args = route.params_for(input) || {}

`params_for` hands the input to Mustermann, which runs the route's regexp and
builds a Hash of named captures, and Grape then walks that into a second Hash
keyed by Symbol.

A fully static path has no named captures to find. `/health`, an index route,
anything whose params all arrive as query or body — the compiled regexp names
nothing, not even `format`, which the suffix spells as a literal alternation.
The whole exchange runs the regexp a second time (the router's union already
matched it, which is how the route was chosen) to arrive at an empty Hash.

Resolve it once, when the pattern is compiled, and skip the round trip when
there is nothing to extract. The method answers nil, which is what
`GreedyRoute#params_for` already does for the same reason, and what the single
call site already coerces — the `|| {}` was there before this change.

On a static route (median of 9 interleaved runs, Ruby 4.0.5 with YJIT):

    throughput   233,443 -> 263,742 req/s   (+13.0%)
    allocations       25.0 -> 20.0 objects per request

Routes that do capture are unaffected beyond one ivar read. Nothing observes a
different value than it did before: the only caller turns nil into the Hash it
builds routing args in, exactly as it already did for greedy routes.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

1238 of 1332 branches covered (92.94%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 2 files covered. (100.0%)

3914 of 3982 relevant lines covered (98.29%)

27272.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rack_3_0.gemfile - 33553778244.1 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
2 run-4.0-gemfiles/hashie.gemfile - 33553778244.2 01 Sep 2026 08:11PM UTC 168
61.77
GitHub Action Run
3 run-3.3-gemfiles/rails_8_0.gemfile - 33553778244.3 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
4 run-3.4-gemfiles/rack_3_2.gemfile - 33553778244.4 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
5 run-3.3-gemfiles/rack_2_2.gemfile - 33553778244.5 01 Sep 2026 08:11PM UTC 168
95.67
GitHub Action Run
6 run-3.4-gemfiles/rack_2_2.gemfile - 33553778244.6 01 Sep 2026 08:11PM UTC 168
95.67
GitHub Action Run
7 run-4.0-gemfiles/rack_3_1.gemfile - 33553778244.7 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
8 run-3.3-gemfiles/rack_3_2.gemfile - 33553778244.8 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
9 run-4.0-gemfiles/grape_swagger.gemfile - 33553778244.9 01 Sep 2026 08:11PM UTC 168
55.2
GitHub Action Run
10 run-4.0-gemfiles/dry_validation.gemfile - 33553778244.10 01 Sep 2026 08:10PM UTC 168
57.87
GitHub Action Run
11 run-4.0-gemfiles/rack_3_2.gemfile - 33553778244.11 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
12 run-4.0-gemfiles/rails_8_0.gemfile - 33553778244.12 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
13 run-4.0-gemfiles/rails_8_1.gemfile - 33553778244.13 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
14 run-4.0-gemfiles/rails_7_2.gemfile - 33553778244.14 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
15 run-4.0-gemfiles/multi_json_1_20.gemfile - 33553778244.15 01 Sep 2026 08:11PM UTC 168
47.42
GitHub Action Run
16 run-4.0-gemfiles/rack_3_0.gemfile - 33553778244.16 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
17 run-3.3-gemfiles/rails_8_1.gemfile - 33553778244.17 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
18 run-4.0-gemfiles/multi_xml.gemfile - 33553778244.18 01 Sep 2026 08:11PM UTC 168
46.89
GitHub Action Run
19 run-3.3-Gemfile - 33553778244.19 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
20 run-4.0-Gemfile - 33553778244.20 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
21 run-3.4-Gemfile - 33553778244.21 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
22 run-3.3-gemfiles/rack_3_1.gemfile - 33553778244.22 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
23 run-3.3-gemfiles/rails_7_2.gemfile - 33553778244.23 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
24 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33553778244.24 01 Sep 2026 08:11PM UTC 168
46.93
GitHub Action Run
25 run-3.4-gemfiles/rails_7_2.gemfile - 33553778244.25 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
26 run-4.0-gemfiles/rack_2_2.gemfile - 33553778244.26 01 Sep 2026 08:11PM UTC 168
95.67
GitHub Action Run
27 run-4.0-gemfiles/multi_json.gemfile - 33553778244.27 01 Sep 2026 08:11PM UTC 168
47.38
GitHub Action Run
28 run-4.0-gemfiles/grape_entity.gemfile - 33553778244.28 01 Sep 2026 08:11PM UTC 168
50.28
GitHub Action Run
29 run-3.4-gemfiles/rack_3_0.gemfile - 33553778244.29 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
30 run-3.4-gemfiles/rack_3_1.gemfile - 33553778244.30 01 Sep 2026 08:11PM UTC 168
95.7
GitHub Action Run
31 run-3.4-gemfiles/rails_8_0.gemfile - 33553778244.31 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
32 run-3.4-gemfiles/rails_8_1.gemfile - 33553778244.32 01 Sep 2026 08:11PM UTC 169
95.71
GitHub Action Run
Source Files on build 33553778244
  • Tree
  • List 169
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33553778244
  • 19d1668a on github
  • Prev Build on master (#33414584203)
  • Next Build on master (#33573918460)
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