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

ruby-grape / grape / 33770784643
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: improve-branch-coverage
DEFAULT BRANCH: master
Ran 03 Sep 2026 03:07PM 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

03 Sep 2026 03:06PM UTC coverage: 96.955%. First build
33770784643

Pull #2894

github

ericproulx
Read the request method once in default_status

`default_status` supplies the status for every response that did not set one,
and asked the request twice for the same thing:

    return 201 if request.post?
    return 204 if request.delete? && @body.blank?

`Rack::Request::Helpers#post?` and `#delete?` are each `request_method == ...`,
so a GET — the common case, and the one that reaches the third line — walked
`request`, `request_method` and the env twice over.

    post? + delete?  158.4 ns  ->  request_method  90.7 ns   1.75x

End to end this is at the edge of what an interleaved `Benchmark.ips` run
resolves (+1.4% on a minimal versioned GET, median of 5), so the per-call
figure above is the honest measurement.

Five examples in `inside_route_spec` asserted `receive(:request).twice`, which
pinned how many times `default_status` reads the request rather than what it
answers. They keep the stub and drop the count.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2894: Read the request method once in default_status

1244 of 1338 branches covered (92.97%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

3946 of 4015 relevant lines covered (98.28%)

26980.1 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/grape_entity.gemfile - 33770784643.1 03 Sep 2026 03:07PM UTC 168
50.29
GitHub Action Run
2 run-3.4-gemfiles/rack_2_2.gemfile - 33770784643.2 03 Sep 2026 03:07PM UTC 168
95.68
GitHub Action Run
3 run-3.3-gemfiles/rack_3_1.gemfile - 33770784643.3 03 Sep 2026 03:07PM UTC 168
95.72
GitHub Action Run
4 run-4.0-gemfiles/dry_validation.gemfile - 33770784643.4 03 Sep 2026 03:07PM UTC 168
57.77
GitHub Action Run
5 run-3.3-Gemfile - 33770784643.5 03 Sep 2026 03:08PM UTC 168
95.72
GitHub Action Run
6 run-4.0-gemfiles/hashie.gemfile - 33770784643.6 03 Sep 2026 03:08PM UTC 168
61.77
GitHub Action Run
7 run-3.3-gemfiles/rack_3_2.gemfile - 33770784643.7 03 Sep 2026 03:07PM UTC 168
95.72
GitHub Action Run
8 run-3.4-gemfiles/rack_3_2.gemfile - 33770784643.8 03 Sep 2026 03:07PM UTC 168
95.72
GitHub Action Run
9 run-4.0-gemfiles/rack_3_2.gemfile - 33770784643.9 03 Sep 2026 03:08PM UTC 168
95.72
GitHub Action Run
10 run-4.0-gemfiles/rack_2_2.gemfile - 33770784643.10 03 Sep 2026 03:07PM UTC 168
95.68
GitHub Action Run
11 run-4.0-gemfiles/rails_7_2.gemfile - 33770784643.11 03 Sep 2026 03:07PM UTC 169
95.72
GitHub Action Run
12 run-4.0-Gemfile - 33770784643.12 03 Sep 2026 03:08PM UTC 168
95.72
GitHub Action Run
13 run-4.0-gemfiles/grape_swagger.gemfile - 33770784643.13 03 Sep 2026 03:07PM UTC 168
55.19
GitHub Action Run
14 run-4.0-gemfiles/rails_8_0.gemfile - 33770784643.14 03 Sep 2026 03:08PM UTC 169
95.72
GitHub Action Run
15 run-4.0-gemfiles/multi_xml.gemfile - 33770784643.15 03 Sep 2026 03:07PM UTC 168
46.96
GitHub Action Run
16 run-4.0-gemfiles/rack_3_0.gemfile - 33770784643.16 03 Sep 2026 03:08PM UTC 168
95.72
GitHub Action Run
17 run-4.0-gemfiles/multi_json_1_20.gemfile - 33770784643.17 03 Sep 2026 03:07PM UTC 168
47.5
GitHub Action Run
18 run-3.3-gemfiles/rails_7_2.gemfile - 33770784643.18 03 Sep 2026 03:08PM UTC 169
95.72
GitHub Action Run
19 run-3.3-gemfiles/rails_8_0.gemfile - 33770784643.19 03 Sep 2026 03:08PM UTC 169
95.72
GitHub Action Run
20 run-3.3-gemfiles/rails_8_1.gemfile - 33770784643.20 03 Sep 2026 03:08PM UTC 169
95.72
GitHub Action Run
21 run-4.0-gemfiles/multi_json.gemfile - 33770784643.21 03 Sep 2026 03:08PM UTC 168
47.47
GitHub Action Run
22 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33770784643.22 03 Sep 2026 03:08PM UTC 168
47.0
GitHub Action Run
23 run-4.0-gemfiles/rack_3_1.gemfile - 33770784643.23 03 Sep 2026 03:08PM UTC 168
95.72
GitHub Action Run
24 run-3.3-gemfiles/rack_3_0.gemfile - 33770784643.24 03 Sep 2026 03:07PM UTC 168
95.72
GitHub Action Run
25 run-3.4-gemfiles/rails_8_0.gemfile - 33770784643.25 03 Sep 2026 03:08PM UTC 169
95.72
GitHub Action Run
26 run-3.4-gemfiles/rack_3_0.gemfile - 33770784643.26 03 Sep 2026 03:07PM UTC 168
95.72
GitHub Action Run
27 run-4.0-gemfiles/rails_8_1.gemfile - 33770784643.27 03 Sep 2026 03:07PM UTC 169
95.72
GitHub Action Run
28 run-3.4-Gemfile - 33770784643.28 03 Sep 2026 03:08PM UTC 168
95.72
GitHub Action Run
29 run-3.3-gemfiles/rack_2_2.gemfile - 33770784643.29 03 Sep 2026 03:08PM UTC 168
95.68
GitHub Action Run
30 run-3.4-gemfiles/rack_3_1.gemfile - 33770784643.30 03 Sep 2026 03:07PM UTC 168
95.72
GitHub Action Run
31 run-3.4-gemfiles/rails_8_1.gemfile - 33770784643.31 03 Sep 2026 03:07PM UTC 169
95.72
GitHub Action Run
32 run-3.4-gemfiles/rails_7_2.gemfile - 33770784643.32 03 Sep 2026 03:07PM UTC 169
95.72
GitHub Action Run
Source Files on build 33770784643
  • Tree
  • List 169
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33770784643
  • Pull Request #2894
  • PR Base - master (#33770738759)
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