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

ruby-grape / grape / 34030591620
99%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2026 11:33AM 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

06 Sep 2026 11:33AM UTC coverage: 99.196%. Remained the same
34030591620

push

github

web-flow
Keep content-type negotiation in place as ensure_content_type! (#2910)

#2908 stopped `Grape::Middleware::Formatter#ensure_content_type` from
writing into the headers Hash it was handed, returning
`headers.merge(Rack::CONTENT_TYPE => ...)` instead. That copy runs on
almost every response, and the inline pair made it cost three
allocations rather than one: Ruby builds the one-pair Hash literal, then
copies it again converting the implicit keyword Hash into a positional
argument for `Hash#merge`, and `Rack::Headers#merge` dups the receiver
on top of that.

Measured over 2000 requests through a formatted endpoint:

    merge      19906.25 kB / 196,000 objects
    in place   18968.75 kB / 190,000 objects

Three objects per response on the hot path, for a header the caller is
about to send anyway. The negotiation goes back to writing into
`headers`, and the method carries a `!` so the mutation is visible at
the call site. `build_formatted_response` drops the `typed_headers`
local it only needed in order to hold the copy, so `headers` is still
never reassigned, which is what #2908 was after.

The trade is that a mounted plain Rack app returning a frozen or shared
headers Hash is written into again, as it was before #2908.

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

1291 of 1334 branches covered (96.78%)

Branch coverage included in aggregate %.

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

4013 of 4013 relevant lines covered (100.0%)

27142.5 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34030591620.1 06 Sep 2026 11:34AM UTC 167
47.04
GitHub Action Run
2 run-4.0-gemfiles/rails_8_1.gemfile - 34030591620.2 06 Sep 2026 11:33AM UTC 169
97.87
GitHub Action Run
3 run-4.0-gemfiles/grape_swagger.gemfile - 34030591620.3 06 Sep 2026 11:33AM UTC 167
55.24
GitHub Action Run
4 run-4.0-gemfiles/multi_json_1_20.gemfile - 34030591620.4 06 Sep 2026 11:33AM UTC 167
47.56
GitHub Action Run
5 run-4.0-gemfiles/rack_3_0.gemfile - 34030591620.5 06 Sep 2026 11:33AM UTC 168
97.88
GitHub Action Run
6 run-3.3-gemfiles/rails_8_0.gemfile - 34030591620.6 06 Sep 2026 11:33AM UTC 169
97.89
GitHub Action Run
7 run-3.4-Gemfile - 34030591620.7 06 Sep 2026 11:34AM UTC 168
97.87
GitHub Action Run
8 run-4.0-gemfiles/rack_3_2.gemfile - 34030591620.8 06 Sep 2026 11:33AM UTC 168
97.88
GitHub Action Run
9 run-4.0-gemfiles/rails_8_0.gemfile - 34030591620.9 06 Sep 2026 11:34AM UTC 169
97.87
GitHub Action Run
10 run-4.0-gemfiles/multi_xml.gemfile - 34030591620.10 06 Sep 2026 11:35AM UTC 167
47.0
GitHub Action Run
11 run-4.0-gemfiles/dry_validation.gemfile - 34030591620.11 06 Sep 2026 11:33AM UTC 167
57.8
GitHub Action Run
12 run-3.4-gemfiles/rack_3_2.gemfile - 34030591620.12 06 Sep 2026 11:34AM UTC 168
97.88
GitHub Action Run
13 run-4.0-gemfiles/grape_entity.gemfile - 34030591620.13 06 Sep 2026 11:33AM UTC 167
50.33
GitHub Action Run
14 run-3.3-gemfiles/rails_8_1.gemfile - 34030591620.14 06 Sep 2026 11:34AM UTC 169
97.89
GitHub Action Run
15 run-4.0-gemfiles/rack_2_2.gemfile - 34030591620.15 06 Sep 2026 11:34AM UTC 168
97.85
GitHub Action Run
16 run-3.4-gemfiles/rails_8_0.gemfile - 34030591620.16 06 Sep 2026 11:33AM UTC 169
97.87
GitHub Action Run
17 run-3.4-gemfiles/rack_3_1.gemfile - 34030591620.17 06 Sep 2026 11:33AM UTC 168
97.88
GitHub Action Run
18 run-4.0-gemfiles/hashie.gemfile - 34030591620.18 06 Sep 2026 11:34AM UTC 167
61.77
GitHub Action Run
19 run-4.0-gemfiles/rails_7_2.gemfile - 34030591620.19 06 Sep 2026 11:33AM UTC 169
97.89
GitHub Action Run
20 run-3.3-gemfiles/rack_3_1.gemfile - 34030591620.20 06 Sep 2026 11:34AM UTC 168
97.88
GitHub Action Run
21 run-3.3-gemfiles/rails_7_2.gemfile - 34030591620.21 06 Sep 2026 11:33AM UTC 169
97.9
GitHub Action Run
22 run-3.3-gemfiles/rack_3_0.gemfile - 34030591620.22 06 Sep 2026 11:33AM UTC 168
97.88
GitHub Action Run
23 run-3.3-Gemfile - 34030591620.23 06 Sep 2026 11:33AM UTC 168
97.88
GitHub Action Run
24 run-3.4-gemfiles/rack_2_2.gemfile - 34030591620.24 06 Sep 2026 11:33AM UTC 168
97.83
GitHub Action Run
25 run-4.0-Gemfile - 34030591620.25 06 Sep 2026 11:34AM UTC 168
97.87
GitHub Action Run
26 run-3.4-gemfiles/rails_7_2.gemfile - 34030591620.26 06 Sep 2026 11:33AM UTC 169
97.87
GitHub Action Run
27 run-3.4-gemfiles/rack_3_0.gemfile - 34030591620.27 06 Sep 2026 11:33AM UTC 168
97.88
GitHub Action Run
28 run-4.0-gemfiles/rack_3_1.gemfile - 34030591620.28 06 Sep 2026 11:33AM UTC 168
97.87
GitHub Action Run
29 run-3.4-gemfiles/rails_8_1.gemfile - 34030591620.29 06 Sep 2026 11:33AM UTC 169
97.87
GitHub Action Run
30 run-4.0-gemfiles/multi_json.gemfile - 34030591620.30 06 Sep 2026 11:34AM UTC 167
47.53
GitHub Action Run
31 run-3.3-gemfiles/rack_3_2.gemfile - 34030591620.31 06 Sep 2026 11:33AM UTC 168
97.88
GitHub Action Run
32 run-3.3-gemfiles/rack_2_2.gemfile - 34030591620.32 06 Sep 2026 11:33AM UTC 168
97.87
GitHub Action Run
Source Files on build 34030591620
  • Tree
  • List 169
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34030591620
  • 251810e4 on github
  • Prev Build on master (#34029315262)
  • Next Build on master (#34032439853)
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