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

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

Build:
Build:
LAST BUILD BRANCH: fix/recompile-settings-mutation-race
DEFAULT BRANCH: master
Ran 15 May 2026 09:26AM UTC
Jobs 37
Files 161
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

15 May 2026 09:25AM UTC coverage: 97.038%. First build
25910483541

Pull #2722

github

ericproulx
Introduce Grape::Validations::CoerceOptions value object

`ValidationsSpec#coerce_options` returned an ad-hoc
`{ type:, method:, message: }` Hash that flowed (deep-frozen) into
`CoerceValidator` as its `options` argument and was poked at by
`ParamsScope#check_coerce_with` / `#validate_coerce`. Unlike most
validator options, this Hash is *never written by the user* — it is
assembled internally from the parsed `type:` / `coerce_with:` /
`coerce_message` declaration — so it has a fixed shape and no public
contract to preserve.

Replace it with a `Grape::Validations::CoerceOptions` Data value object
(`Data.define(:type, :coerce_method, :message)`, all defaulting nil).
The member is `coerce_method`, not `method`, to avoid shadowing
`Object#method` (`Lint/DataDefineOverride`); it also matches
`ValidationsSpec`'s existing `coerce_method` vocabulary.

- `ValidationsSpec#coerce_options` builds the value object.
- `ParamsScope#check_coerce_with` / `#validate_coerce` read `.type` /
  `.coerce_method` instead of `[:type]` / `[:method]`.
- `CoerceValidator` reads `@options.type` / `@options.coerce_method`.
  `Base#message` can't see a custom message off a Data (it probes
  Hash-like `key?`), so `CoerceValidator#initialize` restores
  `@exception_message` from `@options.message`, preserving
  `type: { value:, message: }` behaviour.

`Grape::Util::DeepFreeze` returns the Data as-is (its `else` branch);
`Base.new` already freezes the whole validator instance, and the Data
is structurally immutable. No user-facing contract changes — users
never construct or read this Hash; no spec hand-builds it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2722: Introduce Grape::Validations::CoerceOptions value object

1086 of 1169 branches covered (92.9%)

Branch coverage included in aggregate %.

10 of 10 new or added lines in 3 files covered. (100.0%)

3501 of 3558 relevant lines covered (98.4%)

31848.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rack_2_2.gemfile - 25910483541.1 15 May 2026 09:26AM UTC 160
95.7
GitHub Action Run
2 run-4.0-gemfiles/multi_xml.gemfile - 25910483541.2 15 May 2026 09:27AM UTC 160
36.34
GitHub Action Run
3 run-4.0-gemfiles/dry_validation.gemfile - 25910483541.3 15 May 2026 09:26AM UTC 160
58.09
GitHub Action Run
4 run-3.4-gemfiles/rails_8_1.gemfile - 25910483541.4 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
5 run-4.0-gemfiles/rails_8_0.gemfile - 25910483541.5 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
6 run-3.4-Gemfile - 25910483541.6 15 May 2026 09:27AM UTC 160
95.74
GitHub Action Run
7 run-3.4-gemfiles/rack_3_0.gemfile - 25910483541.7 15 May 2026 09:26AM UTC 160
95.74
GitHub Action Run
8 run-3.2-gemfiles/rack_3_2.gemfile - 25910483541.8 15 May 2026 09:26AM UTC 160
95.78
GitHub Action Run
9 run-4.0-gemfiles/rack_3_1.gemfile - 25910483541.9 15 May 2026 09:26AM UTC 160
95.74
GitHub Action Run
10 run-4.0-gemfiles/multi_json.gemfile - 25910483541.10 15 May 2026 09:26AM UTC 160
36.34
GitHub Action Run
11 run-3.3-gemfiles/rails_7_2.gemfile - 25910483541.11 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
12 run-4.0-gemfiles/rack_3_0.gemfile - 25910483541.12 15 May 2026 09:27AM UTC 160
95.74
GitHub Action Run
13 run-4.0-gemfiles/rack_2_2.gemfile - 25910483541.13 15 May 2026 09:27AM UTC 160
95.7
GitHub Action Run
14 run-3.3-gemfiles/rails_8_0.gemfile - 25910483541.14 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
15 run-3.2-gemfiles/rails_7_2.gemfile - 25910483541.15 15 May 2026 09:26AM UTC 161
95.79
GitHub Action Run
16 run-3.3-gemfiles/rack_3_1.gemfile - 25910483541.16 15 May 2026 09:26AM UTC 160
95.74
GitHub Action Run
17 run-4.0-gemfiles/grape_entity.gemfile - 25910483541.17 15 May 2026 09:27AM UTC 160
49.99
GitHub Action Run
18 run-3.4-gemfiles/rails_8_0.gemfile - 25910483541.18 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
19 run-3.2-Gemfile - 25910483541.19 15 May 2026 09:26AM UTC 160
95.78
GitHub Action Run
20 run-3.4-gemfiles/rails_7_2.gemfile - 25910483541.20 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
21 run-4.0-gemfiles/rails_7_2.gemfile - 25910483541.21 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
22 run-3.2-gemfiles/rack_3_1.gemfile - 25910483541.22 15 May 2026 09:27AM UTC 160
95.78
GitHub Action Run
23 run-3.2-gemfiles/rack_2_2.gemfile - 25910483541.23 15 May 2026 09:26AM UTC 160
95.74
GitHub Action Run
24 run-3.2-gemfiles/rails_8_0.gemfile - 25910483541.24 15 May 2026 09:26AM UTC 161
95.79
GitHub Action Run
25 run-4.0-Gemfile - 25910483541.25 15 May 2026 09:27AM UTC 160
95.74
GitHub Action Run
26 run-3.2-gemfiles/rails_8_1.gemfile - 25910483541.26 15 May 2026 09:27AM UTC 161
95.79
GitHub Action Run
27 run-3.3-gemfiles/rack_2_2.gemfile - 25910483541.27 15 May 2026 09:27AM UTC 160
95.7
GitHub Action Run
28 run-3.3-gemfiles/rack_3_0.gemfile - 25910483541.28 15 May 2026 09:26AM UTC 160
95.74
GitHub Action Run
29 run-3.3-Gemfile - 25910483541.29 15 May 2026 09:26AM UTC 160
95.74
GitHub Action Run
30 run-3.3-gemfiles/rails_8_1.gemfile - 25910483541.30 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
31 run-4.0-gemfiles/rack_3_2.gemfile - 25910483541.31 15 May 2026 09:27AM UTC 160
95.74
GitHub Action Run
32 run-3.3-gemfiles/rack_3_2.gemfile - 25910483541.32 15 May 2026 09:27AM UTC 160
95.74
GitHub Action Run
33 run-4.0-gemfiles/rails_8_1.gemfile - 25910483541.33 15 May 2026 09:27AM UTC 161
95.74
GitHub Action Run
34 run-3.4-gemfiles/rack_3_2.gemfile - 25910483541.34 15 May 2026 09:27AM UTC 160
95.74
GitHub Action Run
35 run-4.0-gemfiles/hashie.gemfile - 25910483541.35 15 May 2026 09:26AM UTC 160
62.37
GitHub Action Run
36 run-3.2-gemfiles/rack_3_0.gemfile - 25910483541.36 15 May 2026 09:26AM UTC 160
95.78
GitHub Action Run
37 run-3.4-gemfiles/rack_3_1.gemfile - 25910483541.37 15 May 2026 09:26AM UTC 160
95.74
GitHub Action Run
Source Files on build 25910483541
  • Tree
  • List 161
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25910483541
  • Pull Request #2722
  • PR Base - master (#25873678149)
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