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

ruby-grape / grape / 24754841764
97%

Build:
DEFAULT BRANCH: master
Ran 22 Apr 2026 01:09AM UTC
Jobs 37
Files 155
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 Apr 2026 01:09AM UTC coverage: 96.983% (-0.02%) from 97.001%
24754841764

push

github

web-flow
Replace per-request Proc in Router#transaction with a helper method (#2692)

The `cascade_or_return_response` proc inside `Router#transaction` was
allocated on every request because it relied on non-local `return` to
exit the enclosing method when a non-cascading response arrived. That
behavior was doing two things at once — closing the cascading body as
a side effect, and halting transaction processing.

Split them: a plain `halt?(response)` helper returns `true` when the
response is final (and should be returned as-is), `false` when it's
either absent or cascading; closing the body lives inside the helper
as a side effect. The `transaction` method then uses explicit
early-returns for the halt case and plain assignments for the cascade
flag.

                      current     variant    speedup     alloc
cascading response    3.12 M/s    6.88 M/s   2.21x      1 → 0 objects
hit response (final)  3.07 M/s    9.82 M/s   3.20x      1 → 0 objects
nil response          5.07 M/s    15.7 M/s   3.10x      1 → 0 objects

Saves one proc allocation per request in the router's `transaction`
dispatch — plus 2–3x faster control flow in the cascade-decision step.

No behavior change; all 2,236 specs pass.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

1079 of 1163 branches covered (92.78%)

Branch coverage included in aggregate %.

10 of 11 new or added lines in 1 file covered. (90.91%)

3357 of 3411 relevant lines covered (98.42%)

32161.16 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
97.83
-0.66% lib/grape/router.rb
Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_json.gemfile - 24754841764.1 22 Apr 2026 01:09AM UTC 154
35.94
GitHub Action Run
2 run-3.2-gemfiles/rails_8_1.gemfile - 24754841764.2 22 Apr 2026 01:10AM UTC 155
95.69
GitHub Action Run
3 run-3.2-gemfiles/rack_2_2.gemfile - 24754841764.3 22 Apr 2026 01:10AM UTC 154
95.64
GitHub Action Run
4 run-3.4-gemfiles/rack_2_2.gemfile - 24754841764.4 22 Apr 2026 01:10AM UTC 154
95.62
GitHub Action Run
5 run-3.3-gemfiles/rails_8_0.gemfile - 24754841764.5 22 Apr 2026 01:10AM UTC 155
95.64
GitHub Action Run
6 run-3.4-gemfiles/rails_8_1.gemfile - 24754841764.6 22 Apr 2026 01:10AM UTC 155
95.66
GitHub Action Run
7 run-3.3-Gemfile - 24754841764.7 22 Apr 2026 01:10AM UTC 154
95.64
GitHub Action Run
8 run-4.0-gemfiles/rails_8_0.gemfile - 24754841764.8 22 Apr 2026 01:10AM UTC 155
95.66
GitHub Action Run
9 run-3.2-gemfiles/rack_3_0.gemfile - 24754841764.9 22 Apr 2026 01:10AM UTC 154
95.68
GitHub Action Run
10 run-3.3-gemfiles/rails_7_2.gemfile - 24754841764.10 22 Apr 2026 01:10AM UTC 155
95.64
GitHub Action Run
11 run-3.4-gemfiles/rack_3_0.gemfile - 24754841764.11 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
12 run-3.2-Gemfile - 24754841764.12 22 Apr 2026 01:10AM UTC 154
95.68
GitHub Action Run
13 run-3.3-gemfiles/rack_3_0.gemfile - 24754841764.13 22 Apr 2026 01:10AM UTC 154
95.64
GitHub Action Run
14 run-3.3-gemfiles/rails_8_1.gemfile - 24754841764.14 22 Apr 2026 01:10AM UTC 155
95.64
GitHub Action Run
15 run-4.0-Gemfile - 24754841764.15 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
16 run-3.2-gemfiles/rails_8_0.gemfile - 24754841764.16 22 Apr 2026 01:10AM UTC 155
95.69
GitHub Action Run
17 run-4.0-gemfiles/rails_8_1.gemfile - 24754841764.17 22 Apr 2026 01:10AM UTC 155
95.66
GitHub Action Run
18 run-4.0-gemfiles/rack_2_2.gemfile - 24754841764.18 22 Apr 2026 01:10AM UTC 154
95.62
GitHub Action Run
19 run-4.0-gemfiles/dry_validation.gemfile - 24754841764.19 22 Apr 2026 01:10AM UTC 154
57.75
GitHub Action Run
20 run-4.0-gemfiles/rack_3_1.gemfile - 24754841764.20 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
21 run-4.0-gemfiles/multi_xml.gemfile - 24754841764.21 22 Apr 2026 01:10AM UTC 154
35.94
GitHub Action Run
22 run-3.2-gemfiles/rack_3_1.gemfile - 24754841764.22 22 Apr 2026 01:10AM UTC 154
95.68
GitHub Action Run
23 run-4.0-gemfiles/grape_entity.gemfile - 24754841764.23 22 Apr 2026 01:10AM UTC 154
49.42
GitHub Action Run
24 run-4.0-gemfiles/rails_7_2.gemfile - 24754841764.24 22 Apr 2026 01:10AM UTC 155
95.66
GitHub Action Run
25 run-3.4-Gemfile - 24754841764.25 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
26 run-3.4-gemfiles/rails_8_0.gemfile - 24754841764.26 22 Apr 2026 01:10AM UTC 155
95.66
GitHub Action Run
27 run-3.3-gemfiles/rack_3_1.gemfile - 24754841764.27 22 Apr 2026 01:10AM UTC 154
95.64
GitHub Action Run
28 run-3.4-gemfiles/rails_7_2.gemfile - 24754841764.28 22 Apr 2026 01:10AM UTC 155
95.66
GitHub Action Run
29 run-4.0-gemfiles/rack_3_2.gemfile - 24754841764.29 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
30 run-3.3-gemfiles/rack_3_2.gemfile - 24754841764.30 22 Apr 2026 01:10AM UTC 154
95.64
GitHub Action Run
31 run-3.4-gemfiles/rack_3_1.gemfile - 24754841764.31 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
32 run-3.2-gemfiles/rack_3_2.gemfile - 24754841764.32 22 Apr 2026 01:10AM UTC 154
95.68
GitHub Action Run
33 run-3.3-gemfiles/rack_2_2.gemfile - 24754841764.33 22 Apr 2026 01:10AM UTC 154
95.6
GitHub Action Run
34 run-4.0-gemfiles/rack_3_0.gemfile - 24754841764.34 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
35 run-3.2-gemfiles/rails_7_2.gemfile - 24754841764.35 22 Apr 2026 01:10AM UTC 155
95.69
GitHub Action Run
36 run-3.4-gemfiles/rack_3_2.gemfile - 24754841764.36 22 Apr 2026 01:10AM UTC 154
95.66
GitHub Action Run
37 run-4.0-gemfiles/hashie.gemfile - 24754841764.37 22 Apr 2026 01:10AM UTC 154
62.44
GitHub Action Run
Source Files on build 24754841764
  • Tree
  • List 155
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #24754841764
  • f1e54e1b on github
  • Prev Build on master (#24754755957)
  • Next Build on master (#24756585669)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc