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

ruby-grape / grape / 25968435334 / 32
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 16 May 2026 05:33PM UTC
Files 161
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

16 May 2026 05:32PM UTC coverage: 50.127% (+0.05%) from 50.074%
25968435334.32

push

github

web-flow
Use an internal Grape::Validations::SharedOptions value object (#2721)

`Validators::Base#initialize` consumed the shared `opts` via
`opts.values_at(:fail_fast, :allow_blank)` and copied the two values
into per-validator ivars.

Introduce `Grape::Validations::SharedOptions`
(`Data.define(:allow_blank, :fail_fast)` with defaults mirroring the
prior `values_at` behaviour) as an *internal* representation: `Base`
builds it from the `opts` Hash —
`SharedOptions.new(**opts.slice(:allow_blank, :fail_fast))` — and
exposes the two fields via `Forwardable.def_delegators :@opts,
:allow_blank, :fail_fast`. `#fail_fast?` calls the delegated
`fail_fast`; `ValuesValidator` (the one subclass reading `@allow_blank`
directly) uses the `allow_blank` reader.

The public 5th-argument contract of `Validators::Base#initialize`
stays a plain Hash, so custom validators and any code that
hand-constructs a validator with a Hash are unaffected. `slice` keeps
the historical tolerance of ignoring unknown keys. `ValidationsSpec`
keeps emitting the `{ allow_blank:, fail_fast: }.freeze` Hash; nothing
about its public surface changes — no UPGRADING entry needed.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>

203 of 1167 branches covered (17.4%)

Branch coverage included in aggregate %.

2166 of 3559 relevant lines covered (60.86%)

7.77 hits per line

Source Files on job run-4.0-gemfiles/grape_entity.gemfile - 25968435334.32
  • Tree
  • List 161
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25968435334
  • 72771e1d on github
  • Prev Job for on master (#25968267680.11)
  • Next Job for on master (#25972887409.7)
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