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

ruby-grape / grape / 33321531189
97%

Build:
DEFAULT BRANCH: master
Ran 30 Aug 2026 04:06PM UTC
Jobs 32
Files 169
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 04:06PM UTC coverage: 96.98% (-0.001%) from 96.981%
33321531189

push

github

web-flow
Extract the shared body of `requires` and `optional` (#2867)

* Pass `required` as an argument instead of writing a presence key

`requires` announced that a parameter is required by writing
`opts[:presence]` into the options Hash it had just been handed, and
`optional` announced the opposite by writing nothing. That put an internal
signal in the same namespace as an API's own options, and the two shared a
key: `requires` silently overwrote a user-supplied `presence:`, while
`optional` silently honoured one and turned an optional parameter into a
required one through a key nothing documents.

    requires :a, presence: false   # ignored, :a is still required
    optional :a, presence: true    # honoured, :a is actually required

Pass the flag as an argument — `required: true` from `requires`, false from
`optional` — down to `validates`, which builds the presence entry itself.
The key stops being something the DSL writes into the caller's Hash.

The entry is now built after the caller has merged in any enclosing `with`
attributes, which fixes a second bug: `opts[:presence]` was assembled from
`opts[:message]` before that merge, so a group-level `message:` never
reached the presence validator.

A `presence:` supplied by an API still decides the outcome exactly as it
did, and warns, so nothing changes for code that relies on it until the key
is ignored outright.

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

* Extract the shared body of `requires` and `optional`

With the group-type check unified (#2864), requiredness passed as an
argument (#2865) and `as` taken as a keyword (#2866), the two methods differ
only in the name they redispatch a legacy Hash under and in whether what
they declare is required. Everything else — the group merge, the `using:`
handover, the attribute validation, the choice between a nested scope and a
leaf declaration — was written twice.

Move it into one private `declare`, leaving each DSL method a single
dispatch. `opt... (continued)

1240 of 1332 branches covered (93.09%)

Branch coverage included in aggregate %.

20 of 20 new or added lines in 2 files covered. (100.0%)

3898 of 3966 relevant lines covered (98.29%)

27180.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rack_3_0.gemfile - 33321531189.1 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
2 run-3.4-gemfiles/rack_3_1.gemfile - 33321531189.2 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
3 run-4.0-gemfiles/multi_json.gemfile - 33321531189.3 30 Aug 2026 04:07PM UTC 168
47.37
GitHub Action Run
4 run-3.3-gemfiles/rails_8_0.gemfile - 33321531189.4 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
5 run-3.4-gemfiles/rails_8_0.gemfile - 33321531189.5 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
6 run-4.0-gemfiles/rack_3_2.gemfile - 33321531189.6 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
7 run-4.0-gemfiles/grape_swagger.gemfile - 33321531189.7 30 Aug 2026 04:07PM UTC 168
55.2
GitHub Action Run
8 run-4.0-gemfiles/grape_entity.gemfile - 33321531189.8 30 Aug 2026 04:07PM UTC 168
50.08
GitHub Action Run
9 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33321531189.9 30 Aug 2026 04:07PM UTC 168
46.81
GitHub Action Run
10 run-4.0-gemfiles/multi_xml.gemfile - 33321531189.10 30 Aug 2026 04:07PM UTC 168
46.77
GitHub Action Run
11 run-4.0-Gemfile - 33321531189.11 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
12 run-3.4-gemfiles/rack_2_2.gemfile - 33321531189.12 30 Aug 2026 04:07PM UTC 168
95.69
GitHub Action Run
13 run-3.4-gemfiles/rack_3_0.gemfile - 33321531189.13 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
14 run-4.0-gemfiles/dry_validation.gemfile - 33321531189.14 30 Aug 2026 04:06PM UTC 168
57.8
GitHub Action Run
15 run-3.4-Gemfile - 33321531189.15 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
16 run-4.0-gemfiles/rack_3_0.gemfile - 33321531189.16 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
17 run-3.4-gemfiles/rack_3_2.gemfile - 33321531189.17 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
18 run-4.0-gemfiles/hashie.gemfile - 33321531189.18 30 Aug 2026 04:07PM UTC 168
61.64
GitHub Action Run
19 run-4.0-gemfiles/rack_2_2.gemfile - 33321531189.19 30 Aug 2026 04:07PM UTC 168
95.69
GitHub Action Run
20 run-3.3-gemfiles/rack_3_2.gemfile - 33321531189.20 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
21 run-3.4-gemfiles/rails_8_1.gemfile - 33321531189.21 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
22 run-4.0-gemfiles/multi_json_1_20.gemfile - 33321531189.22 30 Aug 2026 04:07PM UTC 168
47.41
GitHub Action Run
23 run-3.3-gemfiles/rack_3_1.gemfile - 33321531189.23 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
24 run-4.0-gemfiles/rails_8_1.gemfile - 33321531189.24 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
25 run-4.0-gemfiles/rails_7_2.gemfile - 33321531189.25 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
26 run-3.3-gemfiles/rails_7_2.gemfile - 33321531189.26 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
27 run-4.0-gemfiles/rails_8_0.gemfile - 33321531189.27 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
28 run-3.4-gemfiles/rails_7_2.gemfile - 33321531189.28 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
29 run-3.3-Gemfile - 33321531189.29 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
30 run-4.0-gemfiles/rack_3_1.gemfile - 33321531189.30 30 Aug 2026 04:07PM UTC 168
95.73
GitHub Action Run
31 run-3.3-gemfiles/rack_2_2.gemfile - 33321531189.31 30 Aug 2026 04:07PM UTC 168
95.69
GitHub Action Run
32 run-3.3-gemfiles/rails_8_1.gemfile - 33321531189.32 30 Aug 2026 04:07PM UTC 169
95.73
GitHub Action Run
Source Files on build 33321531189
  • Tree
  • List 169
  • 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 #33321531189
  • a1ce6190 on github
  • Prev Build on master (#33321195155)
  • Next Build on master (#33322439088)
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