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

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

Build:
Build:
LAST BUILD BRANCH: revisit_validators
DEFAULT BRANCH: master
Ran 14 Mar 2026 09:52PM 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

14 Mar 2026 09:50PM UTC coverage: 96.715% (-0.1%) from 96.843%
23097122791

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

1073 of 1166 branches covered (92.02%)

Branch coverage included in aggregate %.

165 of 168 new or added lines in 19 files covered. (98.21%)

3372 of 3430 relevant lines covered (98.31%)

32668.93 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
92.31
-7.69% lib/grape/validations/validators/default_validator.rb
2
91.55
-4.45% lib/grape/validations/validators/base.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rack_2_2.gemfile - 23097122791.1 14 Mar 2026 09:52PM UTC 154
95.53
GitHub Action Run
2 run-3.3-gemfiles/rack_3_1.gemfile - 23097122791.2 14 Mar 2026 09:53PM UTC 154
95.57
GitHub Action Run
3 run-4.0-gemfiles/rails_7_2.gemfile - 23097122791.3 14 Mar 2026 09:53PM UTC 155
95.6
GitHub Action Run
4 run-3.3-gemfiles/rack_3_0.gemfile - 23097122791.4 14 Mar 2026 09:52PM UTC 154
95.57
GitHub Action Run
5 run-3.2-gemfiles/rack_3_1.gemfile - 23097122791.5 14 Mar 2026 09:52PM UTC 154
95.62
GitHub Action Run
6 run-3.2-gemfiles/rails_8_0.gemfile - 23097122791.6 14 Mar 2026 09:53PM UTC 155
95.62
GitHub Action Run
7 run-3.4-gemfiles/rack_3_1.gemfile - 23097122791.7 14 Mar 2026 09:53PM UTC 154
95.59
GitHub Action Run
8 run-4.0-gemfiles/rack_3_1.gemfile - 23097122791.8 14 Mar 2026 09:53PM UTC 154
95.59
GitHub Action Run
9 run-3.3-gemfiles/rails_7_2.gemfile - 23097122791.9 14 Mar 2026 09:53PM UTC 155
95.58
GitHub Action Run
10 run-3.3-gemfiles/rack_3_2.gemfile - 23097122791.10 14 Mar 2026 09:52PM UTC 154
95.57
GitHub Action Run
11 run-3.3-gemfiles/rails_8_1.gemfile - 23097122791.11 14 Mar 2026 09:52PM UTC 155
95.58
GitHub Action Run
12 run-3.3-gemfiles/rails_8_0.gemfile - 23097122791.12 14 Mar 2026 09:52PM UTC 155
95.58
GitHub Action Run
13 run-3.4-gemfiles/rack_2_2.gemfile - 23097122791.13 14 Mar 2026 09:52PM UTC 154
95.55
GitHub Action Run
14 run-3.2-gemfiles/rack_2_2.gemfile - 23097122791.14 14 Mar 2026 09:52PM UTC 154
95.57
GitHub Action Run
15 run-4.0-gemfiles/dry_validation.gemfile - 23097122791.15 14 Mar 2026 09:53PM UTC 154
57.1
GitHub Action Run
16 run-3.2-gemfiles/rack_3_0.gemfile - 23097122791.16 14 Mar 2026 09:52PM UTC 154
95.62
GitHub Action Run
17 run-4.0-gemfiles/rack_2_2.gemfile - 23097122791.17 14 Mar 2026 09:52PM UTC 154
95.55
GitHub Action Run
18 run-3.4-gemfiles/rails_7_2.gemfile - 23097122791.18 14 Mar 2026 09:53PM UTC 155
95.6
GitHub Action Run
19 run-4.0-gemfiles/rack_3_0.gemfile - 23097122791.19 14 Mar 2026 09:52PM UTC 154
95.59
GitHub Action Run
20 run-3.2-gemfiles/rails_7_2.gemfile - 23097122791.20 14 Mar 2026 09:52PM UTC 155
95.62
GitHub Action Run
21 run-3.2-gemfiles/rack_3_2.gemfile - 23097122791.21 14 Mar 2026 09:52PM UTC 154
95.62
GitHub Action Run
22 run-3.4-Gemfile - 23097122791.22 14 Mar 2026 09:53PM UTC 154
95.59
GitHub Action Run
23 run-3.4-gemfiles/rails_8_1.gemfile - 23097122791.23 14 Mar 2026 09:53PM UTC 155
95.6
GitHub Action Run
24 run-3.3-Gemfile - 23097122791.24 14 Mar 2026 09:52PM UTC 154
95.57
GitHub Action Run
25 run-4.0-gemfiles/hashie.gemfile - 23097122791.25 14 Mar 2026 09:53PM UTC 154
61.59
GitHub Action Run
26 run-4.0-gemfiles/multi_xml.gemfile - 23097122791.26 14 Mar 2026 09:53PM UTC 154
35.38
GitHub Action Run
27 run-3.4-gemfiles/rack_3_2.gemfile - 23097122791.27 14 Mar 2026 09:53PM UTC 154
95.59
GitHub Action Run
28 run-4.0-gemfiles/grape_entity.gemfile - 23097122791.28 14 Mar 2026 09:52PM UTC 154
48.88
GitHub Action Run
29 run-4.0-Gemfile - 23097122791.29 14 Mar 2026 09:53PM UTC 154
95.59
GitHub Action Run
30 run-4.0-gemfiles/rack_3_2.gemfile - 23097122791.30 14 Mar 2026 09:52PM UTC 154
95.59
GitHub Action Run
31 run-3.4-gemfiles/rails_8_0.gemfile - 23097122791.31 14 Mar 2026 09:53PM UTC 155
95.6
GitHub Action Run
32 run-3.4-gemfiles/rack_3_0.gemfile - 23097122791.32 14 Mar 2026 09:53PM UTC 154
95.59
GitHub Action Run
33 run-4.0-gemfiles/rails_8_1.gemfile - 23097122791.33 14 Mar 2026 09:53PM UTC 155
95.6
GitHub Action Run
34 run-4.0-gemfiles/multi_json.gemfile - 23097122791.34 14 Mar 2026 09:53PM UTC 154
35.38
GitHub Action Run
35 run-3.2-gemfiles/rails_8_1.gemfile - 23097122791.35 14 Mar 2026 09:52PM UTC 155
95.62
GitHub Action Run
36 run-4.0-gemfiles/rails_8_0.gemfile - 23097122791.36 14 Mar 2026 09:52PM UTC 155
95.6
GitHub Action Run
37 run-3.2-Gemfile - 23097122791.37 14 Mar 2026 09:52PM UTC 154
95.62
GitHub Action Run
Source Files on build 23097122791
  • Tree
  • List 155
  • Changed 20
  • Source Changed 18
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #23097122791
  • 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