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

ruby-grape / grape / 33320244018
97%

Build:
DEFAULT BRANCH: master
Ran 30 Aug 2026 03:41PM 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

30 Aug 2026 03:39PM UTC coverage: 96.97%. First build
33320244018

push

github

web-flow
Check a group's type in one place for `requires` and `optional` (#2864)

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>

1234 of 1326 branches covered (93.06%)

Branch coverage included in aggregate %.

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

3886 of 3954 relevant lines covered (98.28%)

27045.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.4-Gemfile - 33320244018.1 30 Aug 2026 03:42PM UTC 167
95.71
GitHub Action Run
2 run-3.4-gemfiles/rack_2_2.gemfile - 33320244018.2 30 Aug 2026 03:43PM UTC 167
95.68
GitHub Action Run
3 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33320244018.3 30 Aug 2026 03:44PM UTC 167
46.89
GitHub Action Run
4 run-4.0-gemfiles/multi_json.gemfile - 33320244018.4 30 Aug 2026 03:43PM UTC 167
47.42
GitHub Action Run
5 run-4.0-gemfiles/rack_3_0.gemfile - 33320244018.5 30 Aug 2026 03:44PM UTC 167
95.71
GitHub Action Run
6 run-3.4-gemfiles/rack_3_2.gemfile - 33320244018.6 30 Aug 2026 03:43PM UTC 167
95.71
GitHub Action Run
7 run-3.4-gemfiles/rails_8_1.gemfile - 33320244018.7 30 Aug 2026 03:41PM UTC 168
95.72
GitHub Action Run
8 run-3.3-Gemfile - 33320244018.8 30 Aug 2026 03:44PM UTC 167
95.71
GitHub Action Run
9 run-4.0-gemfiles/multi_xml.gemfile - 33320244018.9 30 Aug 2026 03:42PM UTC 167
46.85
GitHub Action Run
10 run-4.0-gemfiles/rails_8_1.gemfile - 33320244018.10 30 Aug 2026 03:42PM UTC 168
95.72
GitHub Action Run
11 run-3.3-gemfiles/rack_3_2.gemfile - 33320244018.11 30 Aug 2026 03:42PM UTC 167
95.71
GitHub Action Run
12 run-3.3-gemfiles/rails_8_0.gemfile - 33320244018.12 30 Aug 2026 03:42PM UTC 168
95.72
GitHub Action Run
13 run-3.3-gemfiles/rack_3_0.gemfile - 33320244018.13 30 Aug 2026 03:42PM UTC 167
95.71
GitHub Action Run
14 run-4.0-gemfiles/grape_entity.gemfile - 33320244018.14 30 Aug 2026 03:44PM UTC 167
50.09
GitHub Action Run
15 run-3.3-gemfiles/rack_3_1.gemfile - 33320244018.15 30 Aug 2026 03:43PM UTC 167
95.71
GitHub Action Run
16 run-4.0-gemfiles/rails_8_0.gemfile - 33320244018.16 30 Aug 2026 03:44PM UTC 168
95.72
GitHub Action Run
17 run-4.0-gemfiles/rack_3_1.gemfile - 33320244018.17 30 Aug 2026 03:45PM UTC 167
95.71
GitHub Action Run
18 run-4.0-gemfiles/hashie.gemfile - 33320244018.18 30 Aug 2026 03:42PM UTC 167
61.79
GitHub Action Run
19 run-4.0-gemfiles/multi_json_1_20.gemfile - 33320244018.19 30 Aug 2026 03:42PM UTC 167
47.46
GitHub Action Run
20 run-3.4-gemfiles/rails_8_0.gemfile - 33320244018.20 30 Aug 2026 03:44PM UTC 168
95.72
GitHub Action Run
21 run-3.3-gemfiles/rails_8_1.gemfile - 33320244018.21 30 Aug 2026 03:43PM UTC 168
95.72
GitHub Action Run
22 run-4.0-gemfiles/dry_validation.gemfile - 33320244018.22 30 Aug 2026 03:44PM UTC 167
57.89
GitHub Action Run
23 run-3.3-gemfiles/rails_7_2.gemfile - 33320244018.23 30 Aug 2026 03:41PM UTC 168
95.72
GitHub Action Run
24 run-4.0-gemfiles/rack_3_2.gemfile - 33320244018.24 30 Aug 2026 03:43PM UTC 167
95.71
GitHub Action Run
25 run-4.0-gemfiles/grape_swagger.gemfile - 33320244018.25 30 Aug 2026 03:44PM UTC 167
55.33
GitHub Action Run
26 run-4.0-gemfiles/rack_2_2.gemfile - 33320244018.26 30 Aug 2026 03:43PM UTC 167
95.68
GitHub Action Run
27 run-4.0-Gemfile - 33320244018.27 30 Aug 2026 03:43PM UTC 167
95.71
GitHub Action Run
28 run-3.4-gemfiles/rails_7_2.gemfile - 33320244018.28 30 Aug 2026 03:42PM UTC 168
95.72
GitHub Action Run
29 run-3.4-gemfiles/rack_3_0.gemfile - 33320244018.29 30 Aug 2026 03:44PM UTC 167
95.71
GitHub Action Run
30 run-3.4-gemfiles/rack_3_1.gemfile - 33320244018.30 30 Aug 2026 03:45PM UTC 167
95.71
GitHub Action Run
31 run-3.3-gemfiles/rack_2_2.gemfile - 33320244018.31 30 Aug 2026 03:45PM UTC 167
95.68
GitHub Action Run
32 run-4.0-gemfiles/rails_7_2.gemfile - 33320244018.32 30 Aug 2026 03:45PM UTC 168
95.72
GitHub Action Run
Source Files on build 33320244018
  • Tree
  • List 168
  • 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 #33320244018
  • a444de73 on github
  • Prev Build on master (#33274964907)
  • Next Build on master (#33320781540)
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