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

ruby-grape / grape / 25972968115 / 1
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 16 May 2026 09:08PM UTC
Files 162
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 09:07PM UTC coverage: 95.666% (+0.002%) from 95.664%
25972968115.1

push

github

web-flow
Move declaration-coherence checks into ValidationsSpec (#2720)

`check_incompatible_option_values` and `validate_value_coercion` were
private methods on `ParamsScope`, invoked from `#validates` right after
building the `ValidationsSpec`. Both are pure cross-field invariants
computed entirely from fields the spec already owns (`default`,
`values`, `except_values`, `coerce_type`).

`ValidationsSpec` already enforced one construction-time invariant (the
`:type` + `:types` mutual-exclusion `ArgumentError`), so concentrating
the rest there makes "you cannot construct an incoherent spec" true by
definition: the invariant no longer depends on a caller remembering to
run the checks after `.from(...)`. `ParamsScope#validates` shrinks to
build-spec → document → dispatch.

- Moved both methods into `ValidationsSpec` as private; a new private
  `validate!` runs them from `initialize`, before `freeze`.
- Removed both from `ParamsScope` and the two call sites in `#validates`.
- `check_coerce_with` deliberately stays in `ParamsScope#validate_coerce`:
  it is gated on the remountable-API skip (`return unless
  coerce_options[:type]`, because a base instance has no resolved type
  until the mounted instance replays) and is therefore not a pure
  construction-time invariant.

Spec fixture update: `params_documentation_spec` built a spec with
`default: 42, values: [1, 2, 3]` purely to exercise `document_params`;
that combination can no longer be constructed, so the fixture now uses a
coherent `default: 1`.

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

1056 of 1165 branches covered (90.64%)

Branch coverage included in aggregate %.

3469 of 3565 relevant lines covered (97.31%)

1003.26 hits per line

Source Files on job run-3.4-gemfiles/rack_3_0.gemfile - 25972968115.1
  • Tree
  • List 162
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25972968115
  • 6eb1cd64 on github
  • Prev Job for on master (#25972887409.24)
  • Next Job for on master (#25973033231.20)
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