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

dblock / grape
97%

Build:
DEFAULT BRANCH: master
Repo Added 15 Jun 2022 03:04AM UTC
Token vwfxnsYI15eHhSbtL461xDH074PQ5mN6f regen
Build 38 Last
Files 166
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

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
Sync Branches
  • master
  • add-agents-md
  • fix-badges
  • fix/auth-base-subclass-issue-2669
  • fix/json-load-create-additions
  • fix/json-use-parse
  • funding
  • migrate-danger-pr-comment
  • rack-version-specs
  • simplify-workflow

04 Jun 2026 04:09PM UTC coverage: 96.839% (-0.04%) from 96.883%
27287147098

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>

1114 of 1205 branches covered (92.45%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 3 files covered. (100.0%)

31 existing lines in 18 files now uncovered.

3543 of 3604 relevant lines covered (98.31%)

23211.17 hits per line

Relevant lines Covered
Build:
Build:
3604 RELEVANT LINES 3543 COVERED LINES
23211.17 HITS PER LINE
Source Files on master
  • Tree
  • List 166
  • Changed 130
  • Source Changed 94
  • Coverage Changed 127
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
27287147098 master 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.cook... push 10 Jun 2026 03:31PM UTC web-flow github
96.84
20604092433 master Merge pull request #2647 from ruby-grape/namespace_route_param_explicit_kwargs explicit kwargs for namespace and route_param push 30 Dec 2025 07:18PM UTC web-flow github
96.88
13707294546 master Reduce array alloc on mount (#2543) * Use << instead of += Some refactor Remove wrongful spec * Fix refresh_mount_step * Add CHANGELOG.md + missing `your contribution here` push 06 Mar 2025 08:12PM UTC web-flow github
98.11
See All Builds (25)

Badge your Repo: grape

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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