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

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

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

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

1077 of 1170 branches covered (92.05%)

Branch coverage included in aggregate %.

175 of 178 new or added lines in 20 files covered. (98.31%)

3373 of 3431 relevant lines covered (98.31%)

32829.07 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-3.3-gemfiles/rack_3_0.gemfile - 23384259406.1 21 Mar 2026 04:54PM UTC 154
95.58
GitHub Action Run
2 run-3.4-Gemfile - 23384259406.2 21 Mar 2026 04:55PM UTC 154
95.6
GitHub Action Run
3 run-3.2-gemfiles/rack_2_2.gemfile - 23384259406.3 21 Mar 2026 04:54PM UTC 154
95.58
GitHub Action Run
4 run-3.2-gemfiles/rack_3_1.gemfile - 23384259406.4 21 Mar 2026 04:54PM UTC 154
95.62
GitHub Action Run
5 run-4.0-gemfiles/rack_3_2.gemfile - 23384259406.5 21 Mar 2026 04:55PM UTC 154
95.6
GitHub Action Run
6 run-4.0-gemfiles/rails_7_2.gemfile - 23384259406.6 21 Mar 2026 04:54PM UTC 155
95.6
GitHub Action Run
7 run-4.0-gemfiles/rack_2_2.gemfile - 23384259406.7 21 Mar 2026 04:54PM UTC 154
95.56
GitHub Action Run
8 run-3.2-gemfiles/rails_7_2.gemfile - 23384259406.8 21 Mar 2026 04:54PM UTC 155
95.63
GitHub Action Run
9 run-3.4-gemfiles/rails_7_2.gemfile - 23384259406.9 21 Mar 2026 04:55PM UTC 155
95.6
GitHub Action Run
10 run-4.0-gemfiles/rack_3_0.gemfile - 23384259406.10 21 Mar 2026 04:54PM UTC 154
95.6
GitHub Action Run
11 run-3.3-gemfiles/rack_3_1.gemfile - 23384259406.11 21 Mar 2026 04:54PM UTC 154
95.58
GitHub Action Run
12 run-3.4-gemfiles/rack_3_2.gemfile - 23384259406.12 21 Mar 2026 04:54PM UTC 154
95.6
GitHub Action Run
13 run-3.3-gemfiles/rails_8_0.gemfile - 23384259406.13 21 Mar 2026 04:54PM UTC 155
95.58
GitHub Action Run
14 run-4.0-gemfiles/rails_8_1.gemfile - 23384259406.14 21 Mar 2026 04:54PM UTC 155
95.6
GitHub Action Run
15 run-4.0-gemfiles/multi_json.gemfile - 23384259406.15 21 Mar 2026 04:54PM UTC 154
35.56
GitHub Action Run
16 run-3.3-gemfiles/rails_8_1.gemfile - 23384259406.16 21 Mar 2026 04:54PM UTC 155
95.58
GitHub Action Run
17 run-3.3-gemfiles/rack_2_2.gemfile - 23384259406.17 21 Mar 2026 04:54PM UTC 154
95.53
GitHub Action Run
18 run-4.0-gemfiles/multi_xml.gemfile - 23384259406.18 21 Mar 2026 04:54PM UTC 154
35.56
GitHub Action Run
19 run-3.2-gemfiles/rack_3_2.gemfile - 23384259406.19 21 Mar 2026 04:54PM UTC 154
95.62
GitHub Action Run
20 run-4.0-gemfiles/rails_8_0.gemfile - 23384259406.20 21 Mar 2026 04:54PM UTC 155
95.6
GitHub Action Run
21 run-3.3-Gemfile - 23384259406.21 21 Mar 2026 04:54PM UTC 154
95.58
GitHub Action Run
22 run-3.4-gemfiles/rack_3_1.gemfile - 23384259406.22 21 Mar 2026 04:54PM UTC 154
95.6
GitHub Action Run
23 run-4.0-gemfiles/grape_entity.gemfile - 23384259406.23 21 Mar 2026 04:54PM UTC 154
49.26
GitHub Action Run
24 run-3.2-gemfiles/rails_8_0.gemfile - 23384259406.24 21 Mar 2026 04:54PM UTC 155
95.63
GitHub Action Run
25 run-3.2-gemfiles/rack_3_0.gemfile - 23384259406.25 21 Mar 2026 04:54PM UTC 154
95.62
GitHub Action Run
26 run-3.4-gemfiles/rack_3_0.gemfile - 23384259406.26 21 Mar 2026 04:54PM UTC 154
95.6
GitHub Action Run
27 run-4.0-gemfiles/dry_validation.gemfile - 23384259406.27 21 Mar 2026 04:54PM UTC 154
57.23
GitHub Action Run
28 run-3.4-gemfiles/rack_2_2.gemfile - 23384259406.28 21 Mar 2026 04:55PM UTC 154
95.56
GitHub Action Run
29 run-3.3-gemfiles/rack_3_2.gemfile - 23384259406.29 21 Mar 2026 04:55PM UTC 154
95.58
GitHub Action Run
30 run-4.0-Gemfile - 23384259406.30 21 Mar 2026 04:55PM UTC 154
95.6
GitHub Action Run
31 run-3.3-gemfiles/rails_7_2.gemfile - 23384259406.31 21 Mar 2026 04:55PM UTC 155
95.58
GitHub Action Run
32 run-3.4-gemfiles/rails_8_1.gemfile - 23384259406.32 21 Mar 2026 04:54PM UTC 155
95.6
GitHub Action Run
33 run-3.2-Gemfile - 23384259406.33 21 Mar 2026 04:54PM UTC 154
95.62
GitHub Action Run
34 run-4.0-gemfiles/hashie.gemfile - 23384259406.34 21 Mar 2026 04:55PM UTC 154
61.81
GitHub Action Run
35 run-4.0-gemfiles/rack_3_1.gemfile - 23384259406.35 21 Mar 2026 04:54PM UTC 154
95.6
GitHub Action Run
36 run-3.4-gemfiles/rails_8_0.gemfile - 23384259406.36 21 Mar 2026 04:55PM UTC 155
95.6
GitHub Action Run
37 run-3.2-gemfiles/rails_8_1.gemfile - 23384259406.37 21 Mar 2026 04:54PM UTC 155
95.63
GitHub Action Run
Source Files on build 23384259406
  • 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 #23384259406
  • 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