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

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

Build:
Build:
LAST BUILD BRANCH: mount-refresh-internal
DEFAULT BRANCH: master
Ran 29 Aug 2026 11:37AM UTC
Jobs 32
Files 168
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

29 Aug 2026 11:36AM UTC coverage: 96.963% (-0.03%) from 96.988%
33250547336

push

github

ericproulx
Check a group's type in one place for `requires` and `optional`

The rule that a group declaration needs a type was written twice: once in
`ParamsScope#new_scope`, guarded by `element && !optional` so it only ever
covered `requires`, and once inline in `optional`, which is what that
`!optional` clause existed to defer to.

Two copies of one rule drifted. `optional` captured `opts[:type]` before
merging in the attributes of an enclosing `with`, so a group type supplied
by `with` was invisible to it while `requires`, reading the same key after
the merge, saw it:

    with(type: Hash) do
      requires(:a) { requires :b, type: String }   # accepted
      optional(:a) { optional :b, type: String }   # MissingGroupType
    end

Delete the inline copy and drop `!optional` from the guard, so one check
covers both. `element` alone is sufficient there: `new_scope` is only ever
reached from the block branch of `requires`/`optional`. The `type` local in
`optional` went with it — it existed only to feed those two raises, so the
early read that caused the bug is gone rather than reordered.

A group with no type from either source still raises, and an unsupported
type still raises. One case stops raising: `optional :a, using: X do ... end`
now ignores the block instead of failing, matching what `requires` has
always done with that combination.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

1232 of 1324 branches covered (93.05%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

3877 of 3945 relevant lines covered (98.28%)

27099.75 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml.gemfile - 33250547336.1 29 Aug 2026 11:37AM UTC 167
46.91
GitHub Action Run
2 run-3.4-gemfiles/rails_7_2.gemfile - 33250547336.2 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
3 run-3.4-gemfiles/rack_3_2.gemfile - 33250547336.3 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
4 run-3.3-gemfiles/rack_2_2.gemfile - 33250547336.4 29 Aug 2026 11:37AM UTC 167
95.67
GitHub Action Run
5 run-3.3-gemfiles/rails_7_2.gemfile - 33250547336.5 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
6 run-3.3-Gemfile - 33250547336.6 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
7 run-4.0-gemfiles/rack_3_1.gemfile - 33250547336.7 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
8 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33250547336.8 29 Aug 2026 11:37AM UTC 167
46.95
GitHub Action Run
9 run-3.3-gemfiles/rails_8_1.gemfile - 33250547336.9 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
10 run-3.4-gemfiles/rack_2_2.gemfile - 33250547336.10 29 Aug 2026 11:37AM UTC 167
95.67
GitHub Action Run
11 run-3.4-gemfiles/rack_3_0.gemfile - 33250547336.11 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
12 run-4.0-gemfiles/grape_swagger.gemfile - 33250547336.12 29 Aug 2026 11:37AM UTC 167
55.2
GitHub Action Run
13 run-3.3-gemfiles/rack_3_2.gemfile - 33250547336.13 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
14 run-3.4-gemfiles/rails_8_0.gemfile - 33250547336.14 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
15 run-3.4-Gemfile - 33250547336.15 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
16 run-3.4-gemfiles/rails_8_1.gemfile - 33250547336.16 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
17 run-4.0-gemfiles/rack_3_2.gemfile - 33250547336.17 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
18 run-4.0-gemfiles/dry_validation.gemfile - 33250547336.18 29 Aug 2026 11:37AM UTC 167
57.97
GitHub Action Run
19 run-4.0-gemfiles/multi_json.gemfile - 33250547336.19 29 Aug 2026 11:37AM UTC 167
47.48
GitHub Action Run
20 run-4.0-gemfiles/rack_3_0.gemfile - 33250547336.20 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
21 run-4.0-gemfiles/grape_entity.gemfile - 33250547336.21 29 Aug 2026 11:37AM UTC 167
50.12
GitHub Action Run
22 run-4.0-gemfiles/multi_json_1_20.gemfile - 33250547336.22 29 Aug 2026 11:37AM UTC 167
47.52
GitHub Action Run
23 run-3.4-gemfiles/rack_3_1.gemfile - 33250547336.23 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
24 run-4.0-gemfiles/hashie.gemfile - 33250547336.24 29 Aug 2026 11:37AM UTC 167
61.88
GitHub Action Run
25 run-4.0-Gemfile - 33250547336.25 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
26 run-4.0-gemfiles/rails_7_2.gemfile - 33250547336.26 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
27 run-3.3-gemfiles/rack_3_0.gemfile - 33250547336.27 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
28 run-4.0-gemfiles/rails_8_1.gemfile - 33250547336.28 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
29 run-4.0-gemfiles/rack_2_2.gemfile - 33250547336.29 29 Aug 2026 11:37AM UTC 167
95.67
GitHub Action Run
30 run-3.3-gemfiles/rails_8_0.gemfile - 33250547336.30 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
31 run-3.3-gemfiles/rack_3_1.gemfile - 33250547336.31 29 Aug 2026 11:37AM UTC 167
95.71
GitHub Action Run
32 run-4.0-gemfiles/rails_8_0.gemfile - 33250547336.32 29 Aug 2026 11:37AM UTC 168
95.71
GitHub Action Run
Source Files on build 33250547336
  • Tree
  • List 168
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33250547336
  • c933fc84 on github
  • Prev Build on master (#33120993402)
  • Next Build on unify-group-type-check (#33250554273)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc