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

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

Build:
Build:
LAST BUILD BRANCH: refactor/params-dsl-using-except-kwargs
DEFAULT BRANCH: master
Ran 21 Mar 2026 09:13PM 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 09:13PM UTC coverage: 96.716% (-0.1%) from 96.843%
23388917777

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

1075 of 1168 branches covered (92.04%)

Branch coverage included in aggregate %.

174 of 177 new or added lines in 20 files covered. (98.31%)

3372 of 3430 relevant lines covered (98.31%)

32930.01 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
93.02
-2.98% 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-4.0-gemfiles/dry_validation.gemfile - 23388917777.1 21 Mar 2026 09:14PM UTC 154
57.21
GitHub Action Run
2 run-4.0-gemfiles/grape_entity.gemfile - 23388917777.2 21 Mar 2026 09:13PM UTC 154
49.29
GitHub Action Run
3 run-3.2-gemfiles/rails_8_1.gemfile - 23388917777.3 21 Mar 2026 09:13PM UTC 155
95.62
GitHub Action Run
4 run-3.2-gemfiles/rack_3_1.gemfile - 23388917777.4 21 Mar 2026 09:13PM UTC 154
95.62
GitHub Action Run
5 run-3.2-gemfiles/rack_3_0.gemfile - 23388917777.5 21 Mar 2026 09:13PM UTC 154
95.62
GitHub Action Run
6 run-3.4-gemfiles/rack_3_1.gemfile - 23388917777.6 21 Mar 2026 09:13PM UTC 154
95.6
GitHub Action Run
7 run-3.4-gemfiles/rack_3_0.gemfile - 23388917777.7 21 Mar 2026 09:13PM UTC 154
95.6
GitHub Action Run
8 run-4.0-gemfiles/rails_8_0.gemfile - 23388917777.8 21 Mar 2026 09:14PM UTC 155
95.6
GitHub Action Run
9 run-3.4-gemfiles/rails_7_2.gemfile - 23388917777.9 21 Mar 2026 09:13PM UTC 155
95.6
GitHub Action Run
10 run-3.4-Gemfile - 23388917777.10 21 Mar 2026 09:13PM UTC 154
95.6
GitHub Action Run
11 run-3.2-gemfiles/rack_2_2.gemfile - 23388917777.11 21 Mar 2026 09:13PM UTC 154
95.58
GitHub Action Run
12 run-4.0-gemfiles/rack_2_2.gemfile - 23388917777.12 21 Mar 2026 09:14PM UTC 154
95.55
GitHub Action Run
13 run-3.2-Gemfile - 23388917777.13 21 Mar 2026 09:13PM UTC 154
95.62
GitHub Action Run
14 run-4.0-gemfiles/hashie.gemfile - 23388917777.14 21 Mar 2026 09:14PM UTC 154
61.83
GitHub Action Run
15 run-3.2-gemfiles/rails_8_0.gemfile - 23388917777.15 21 Mar 2026 09:13PM UTC 155
95.62
GitHub Action Run
16 run-3.4-gemfiles/rails_8_0.gemfile - 23388917777.16 21 Mar 2026 09:13PM UTC 155
95.6
GitHub Action Run
17 run-3.4-gemfiles/rails_8_1.gemfile - 23388917777.17 21 Mar 2026 09:13PM UTC 155
95.6
GitHub Action Run
18 run-3.3-gemfiles/rack_3_1.gemfile - 23388917777.18 21 Mar 2026 09:13PM UTC 154
95.57
GitHub Action Run
19 run-4.0-gemfiles/rack_3_2.gemfile - 23388917777.19 21 Mar 2026 09:14PM UTC 154
95.6
GitHub Action Run
20 run-3.3-gemfiles/rack_3_2.gemfile - 23388917777.20 21 Mar 2026 09:13PM UTC 154
95.57
GitHub Action Run
21 run-4.0-gemfiles/rack_3_0.gemfile - 23388917777.21 21 Mar 2026 09:14PM UTC 154
95.6
GitHub Action Run
22 run-3.3-gemfiles/rack_3_0.gemfile - 23388917777.22 21 Mar 2026 09:14PM UTC 154
95.57
GitHub Action Run
23 run-3.3-gemfiles/rails_8_1.gemfile - 23388917777.23 21 Mar 2026 09:13PM UTC 155
95.58
GitHub Action Run
24 run-4.0-gemfiles/rack_3_1.gemfile - 23388917777.24 21 Mar 2026 09:13PM UTC 154
95.6
GitHub Action Run
25 run-3.4-gemfiles/rack_3_2.gemfile - 23388917777.25 21 Mar 2026 09:14PM UTC 154
95.6
GitHub Action Run
26 run-3.4-gemfiles/rack_2_2.gemfile - 23388917777.26 21 Mar 2026 09:13PM UTC 154
95.55
GitHub Action Run
27 run-4.0-gemfiles/rails_7_2.gemfile - 23388917777.27 21 Mar 2026 09:14PM UTC 155
95.6
GitHub Action Run
28 run-3.3-gemfiles/rack_2_2.gemfile - 23388917777.28 21 Mar 2026 09:13PM UTC 154
95.53
GitHub Action Run
29 run-3.3-gemfiles/rails_8_0.gemfile - 23388917777.29 21 Mar 2026 09:14PM UTC 155
95.58
GitHub Action Run
30 run-3.3-Gemfile - 23388917777.30 21 Mar 2026 09:13PM UTC 154
95.57
GitHub Action Run
31 run-4.0-gemfiles/multi_xml.gemfile - 23388917777.31 21 Mar 2026 09:13PM UTC 154
35.58
GitHub Action Run
32 run-4.0-gemfiles/rails_8_1.gemfile - 23388917777.32 21 Mar 2026 09:13PM UTC 155
95.6
GitHub Action Run
33 run-4.0-Gemfile - 23388917777.33 21 Mar 2026 09:13PM UTC 154
95.6
GitHub Action Run
34 run-3.3-gemfiles/rails_7_2.gemfile - 23388917777.34 21 Mar 2026 09:14PM UTC 155
95.58
GitHub Action Run
35 run-3.2-gemfiles/rails_7_2.gemfile - 23388917777.35 21 Mar 2026 09:13PM UTC 155
95.62
GitHub Action Run
36 run-4.0-gemfiles/multi_json.gemfile - 23388917777.36 21 Mar 2026 09:14PM UTC 154
35.58
GitHub Action Run
37 run-3.2-gemfiles/rack_3_2.gemfile - 23388917777.37 21 Mar 2026 09:13PM UTC 154
95.62
GitHub Action Run
Source Files on build 23388917777
  • 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 #23388917777
  • 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