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

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

Build:
Build:
LAST BUILD BRANCH: chore/guard-clause-cleanup
DEFAULT BRANCH: master
Ran 12 Mar 2026 10:01AM UTC
Files 154
Run time 4s
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

12 Mar 2026 09:59AM UTC coverage: 61.332% (-0.06%) from 61.393%
22996385501.20

Pull #2657

github

ericproulx
Instantiate validators at definition time

Validators are now instantiated once at route definition time rather than per-request, eliminating repeated allocation overhead. Validator instances are frozen via `DeepFreeze` to make them safe for sharing across requests.

- Override `Validators::Base.new` to call `freeze` after initialization
- Add `Grape::Util::DeepFreeze` to recursively freeze Hash/Array/String values while leaving Procs, scopes, and coercers unfrozen
- Remove `ValidatorFactory` (no longer needed)
- Update all validators to be compatible with frozen instances (move any mutable state out of instance variables set at validation time)
- Add specs for `DeepFreeze`, `SameAsValidator`, and `ExceptValuesValidator`
Pull Request #2657: Instantiate validators at definition time

373 of 1168 branches covered (31.93%)

Branch coverage included in aggregate %.

2444 of 3425 relevant lines covered (71.36%)

8.99 hits per line

Source Files on job run-4.0-gemfiles/hashie.gemfile - 22996385501.20
  • Tree
  • List 154
  • Changed 17
  • Source Changed 17
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 22996385501
  • e9ebf2f4 on github
  • Prev Job for on revisit_validators (#22995857569.9)
  • Next Job for on revisit_validators (#23097122791.3)
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