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

ruby-grape / grape / 26964087978 / 20
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 04 Jun 2026 04:10PM UTC
Files 165
Run time 15s
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

04 Jun 2026 04:09PM UTC coverage: 95.649% (+0.001%) from 95.648%
26964087978.20

push

github

web-flow
Build the cookie jar only on use and drop its deferral Proc (#2757)

Two related steps that make the response-cookie path lazy at the request
boundary:

- `build_response_cookies` runs on every request and went through
  `cookies` -> `request.cookies`, materializing the `Grape::Cookies` jar
  even when the handler never touched a cookie. Gate it on a new
  `Grape::Request#cookies?` predicate (true only once the jar exists),
  so a cookie-free request allocates no jar at all.

- With the jar now built only when a cookie is actually read or written,
  its `-> { rack_cookies }` deferral Proc no longer earns its keep: any
  access immediately forces the parse, and a write (`[]=`) always did.
  Parse `rack_cookies` eagerly in the constructor and replace the
  `is_a?(Proc)` lazy reader with a plain `attr_reader`, dropping the
  closure allocation and the per-access branch.

The `ActiveSupport::HashWithIndifferentAccess` wrapping is unchanged --
it backs Grape's string/symbol-indifferent cookie access.

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

1090 of 1203 branches covered (90.61%)

Branch coverage included in aggregate %.

3504 of 3600 relevant lines covered (97.33%)

968.43 hits per line

Source Files on job run-4.0-gemfiles/rack_3_0.gemfile - 26964087978.20
  • Tree
  • List 165
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 26964087978
  • d79a12b4 on github
  • Prev Job for on master (#26819478808.14)
  • Next Job for on master (#27306538704.2)
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