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

ruby-grape / grape / 22996141473 / 1
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: revisit_validators
DEFAULT BRANCH: master
Ran 12 Mar 2026 09:54AM UTC
Files 154
Run time 5s
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:51AM UTC coverage: 35.293% (-0.2%) from 35.443%
22996141473.1

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

34 of 1168 branches covered (2.91%)

Branch coverage included in aggregate %.

1587 of 3425 relevant lines covered (46.34%)

0.68 hits per line

Source Files on job run-4.0-gemfiles/multi_xml.gemfile - 22996141473.1
  • 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 22996141473
  • 6fcca150 on github
  • Prev Job for on revisit_validators (#22995857569.31)
  • Next Job for on revisit_validators (#22996385501.5)
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