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

ruby-grape / grape / 23390342023
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: refactor/validation-errors-drop-enumerable
DEFAULT BRANCH: master
Ran 21 Mar 2026 10:38PM UTC
Jobs 37
Files 155
Run time 1min
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:37PM UTC coverage: 96.773% (-0.07%) from 96.843%
23390342023

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

1071 of 1162 branches covered (92.17%)

Branch coverage included in aggregate %.

188 of 190 new or added lines in 20 files covered. (98.95%)

3368 of 3425 relevant lines covered (98.34%)

33013.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.55
0.55% lib/grape/validations/validators/base.rb
1
92.31
-7.69% lib/grape/validations/validators/default_validator.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.3-Gemfile - 23390342023.1 21 Mar 2026 10:38PM UTC 154
95.63
GitHub Action Run
2 run-3.4-gemfiles/rack_3_2.gemfile - 23390342023.2 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
3 run-3.2-gemfiles/rails_8_0.gemfile - 23390342023.3 21 Mar 2026 10:38PM UTC 155
95.68
GitHub Action Run
4 run-3.4-gemfiles/rack_3_0.gemfile - 23390342023.4 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
5 run-4.0-gemfiles/grape_entity.gemfile - 23390342023.5 21 Mar 2026 10:38PM UTC 154
49.37
GitHub Action Run
6 run-3.2-Gemfile - 23390342023.6 21 Mar 2026 10:38PM UTC 154
95.67
GitHub Action Run
7 run-4.0-gemfiles/multi_json.gemfile - 23390342023.7 21 Mar 2026 10:38PM UTC 154
35.62
GitHub Action Run
8 run-3.4-gemfiles/rails_7_2.gemfile - 23390342023.8 21 Mar 2026 10:39PM UTC 155
95.66
GitHub Action Run
9 run-4.0-gemfiles/multi_xml.gemfile - 23390342023.9 21 Mar 2026 10:38PM UTC 154
35.62
GitHub Action Run
10 run-4.0-Gemfile - 23390342023.10 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
11 run-3.3-gemfiles/rails_7_2.gemfile - 23390342023.11 21 Mar 2026 10:38PM UTC 155
95.63
GitHub Action Run
12 run-4.0-gemfiles/rails_8_1.gemfile - 23390342023.12 21 Mar 2026 10:39PM UTC 155
95.66
GitHub Action Run
13 run-3.3-gemfiles/rails_8_0.gemfile - 23390342023.13 21 Mar 2026 10:38PM UTC 155
95.63
GitHub Action Run
14 run-4.0-gemfiles/hashie.gemfile - 23390342023.14 21 Mar 2026 10:38PM UTC 154
61.95
GitHub Action Run
15 run-3.4-gemfiles/rack_2_2.gemfile - 23390342023.15 21 Mar 2026 10:38PM UTC 154
95.61
GitHub Action Run
16 run-3.4-gemfiles/rails_8_0.gemfile - 23390342023.16 21 Mar 2026 10:39PM UTC 155
95.66
GitHub Action Run
17 run-4.0-gemfiles/rails_8_0.gemfile - 23390342023.17 21 Mar 2026 10:38PM UTC 155
95.66
GitHub Action Run
18 run-3.2-gemfiles/rack_2_2.gemfile - 23390342023.18 21 Mar 2026 10:38PM UTC 154
95.63
GitHub Action Run
19 run-4.0-gemfiles/rack_3_1.gemfile - 23390342023.19 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
20 run-3.2-gemfiles/rack_3_2.gemfile - 23390342023.20 21 Mar 2026 10:38PM UTC 154
95.67
GitHub Action Run
21 run-4.0-gemfiles/rack_3_0.gemfile - 23390342023.21 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
22 run-3.2-gemfiles/rails_7_2.gemfile - 23390342023.22 21 Mar 2026 10:38PM UTC 155
95.68
GitHub Action Run
23 run-4.0-gemfiles/rack_2_2.gemfile - 23390342023.23 21 Mar 2026 10:38PM UTC 154
95.61
GitHub Action Run
24 run-3.3-gemfiles/rack_3_1.gemfile - 23390342023.24 21 Mar 2026 10:38PM UTC 154
95.63
GitHub Action Run
25 run-3.3-gemfiles/rack_3_0.gemfile - 23390342023.25 21 Mar 2026 10:38PM UTC 154
95.63
GitHub Action Run
26 run-4.0-gemfiles/dry_validation.gemfile - 23390342023.26 21 Mar 2026 10:38PM UTC 154
57.32
GitHub Action Run
27 run-3.3-gemfiles/rails_8_1.gemfile - 23390342023.27 21 Mar 2026 10:38PM UTC 155
95.63
GitHub Action Run
28 run-3.2-gemfiles/rails_8_1.gemfile - 23390342023.28 21 Mar 2026 10:38PM UTC 155
95.68
GitHub Action Run
29 run-3.2-gemfiles/rack_3_1.gemfile - 23390342023.29 21 Mar 2026 10:38PM UTC 154
95.67
GitHub Action Run
30 run-3.3-gemfiles/rack_3_2.gemfile - 23390342023.30 21 Mar 2026 10:38PM UTC 154
95.63
GitHub Action Run
31 run-3.4-Gemfile - 23390342023.31 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
32 run-3.4-gemfiles/rack_3_1.gemfile - 23390342023.32 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
33 run-3.2-gemfiles/rack_3_0.gemfile - 23390342023.33 21 Mar 2026 10:38PM UTC 154
95.67
GitHub Action Run
34 run-4.0-gemfiles/rails_7_2.gemfile - 23390342023.34 21 Mar 2026 10:38PM UTC 155
95.66
GitHub Action Run
35 run-3.4-gemfiles/rails_8_1.gemfile - 23390342023.35 21 Mar 2026 10:38PM UTC 155
95.66
GitHub Action Run
36 run-3.3-gemfiles/rack_2_2.gemfile - 23390342023.36 21 Mar 2026 10:38PM UTC 154
95.59
GitHub Action Run
37 run-4.0-gemfiles/rack_3_2.gemfile - 23390342023.37 21 Mar 2026 10:38PM UTC 154
95.65
GitHub Action Run
Source Files on build 23390342023
  • Tree
  • List 155
  • Changed 20
  • Source Changed 19
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #23390342023
  • Pull Request #2657
  • PR Base - master (#22995857569)
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