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

ruby-grape / grape / 23390237175 / 11
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: refactor/params-dsl-using-except-kwargs
DEFAULT BRANCH: master
Ran 21 Mar 2026 10:33PM 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

21 Mar 2026 10:31PM UTC coverage: 95.65% (-0.07%) from 95.715%
23390237175.11

Pull #2657

github

ericproulx
Instantiate validators at definition time

Validators are now instantiated once at route definition time and frozen,
rather than per-request via ValidatorFactory. This removes repeated object
allocation from the hot path and moves option parsing, converter building,
and message formatting into initialize.

- Remove ValidatorFactory; ParamsScope#validate instantiates validators directly
- Freeze validator instances via Base.new override (super.freeze)
- Add Grape::Util::DeepFreeze to recursively freeze Hash/Array/String options
- Freeze ParamsScope at end of initialize; cache full_path as @full_path
- Promote validate_param! to protected with NotImplementedError default
- Extract validation_error!, hash_like?, option_value, scrub helpers in Base
- Add default_message_key class macro for pre-computing exception messages
- Eager-initialize all built-in validators (coerce, default, values, regexp, etc.)
- ContractScopeValidator no longer inherits Base (standalone with freeze)
- coerce_type receives only extracted coerce keys; callers skip manual deletes
- Add DeepFreeze spec; add SameAsValidator and ExceptValuesValidator specs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pull Request #2657: Instantiate validators at definition time

1051 of 1162 branches covered (90.45%)

Branch coverage included in aggregate %.

3325 of 3413 relevant lines covered (97.42%)

1033.65 hits per line

Source Files on job run-3.4-gemfiles/rack_3_2.gemfile - 23390237175.11
  • Tree
  • List 154
  • Changed 19
  • Source Changed 19
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 23390237175
  • 6e08e589 on github
  • Prev Job for on revisit_validators (#22995857569.6)
  • Next Job for on revisit_validators (#23390342023.29)
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