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

ruby-grape / grape / 26496466230
97%

Build:
DEFAULT BRANCH: master
Ran 27 May 2026 07:10AM UTC
Jobs 38
Files 165
Run time 2min
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

27 May 2026 07:09AM UTC coverage: 97.005%. Remained the same
26496466230

push

github

web-flow
Hoist `using:` / `except:` to explicit kwargs on requires / optional (#2746)

`Grape::DSL::Parameters#requires` and `#optional` both treat `:using`
(and the `:except` it pairs with) as a method-local early-return signal:
when `:using` is set, the method returns through
`require_required_and_optional_fields` / `require_optional_fields` and
the keys never flow into `validate_attributes` or the validator/scope
machinery.

Promote them out of the `**opts` Hash into explicit kwargs:

  def requires(*attrs, using: nil, except: nil, **opts, &block)
  def optional(*attrs, using: nil, except: nil, **opts, &block)

The signature now self-documents the using/except contract instead of
burying it in opts, the `if using` guard drops one Hash lookup, and the
`opts` Hash that flows into `validate_attributes` is "validator-bound
kwargs only" — easier to reason about what propagates downstream.

Fully back-compat: Ruby kwarg matching captures `using:` / `except:`
before the `**opts` splat, so existing call sites (`requires :all,
using: docs`, `optional :all, except: %i[…], using: docs`, etc.) keep
working unchanged. The unrelated `:except_values` validator option
(consumed by `Grape::Validations::ValidationsSpec`) is a different key
and is unaffected.

Matches the recent kwargs-hoisting pattern in #2723 (`desc`) and #2728
(`auth` / `http_basic` / `http_digest`).

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

1097 of 1183 branches covered (92.73%)

Branch coverage included in aggregate %.

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

3535 of 3592 relevant lines covered (98.41%)

31280.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml.gemfile - 26496466230.1 27 May 2026 07:10AM UTC 164
36.96
GitHub Action Run
2 run-3.3-gemfiles/rack_2_2.gemfile - 26496466230.2 27 May 2026 07:10AM UTC 164
95.7
GitHub Action Run
3 run-4.0-gemfiles/rack_3_0.gemfile - 26496466230.3 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
4 run-3.3-gemfiles/rack_3_2.gemfile - 26496466230.4 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
5 run-3.4-gemfiles/rack_3_0.gemfile - 26496466230.5 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
6 run-4.0-Gemfile - 26496466230.6 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
7 run-3.2-gemfiles/rails_8_0.gemfile - 26496466230.7 27 May 2026 07:10AM UTC 165
95.79
GitHub Action Run
8 run-3.2-gemfiles/rack_3_1.gemfile - 26496466230.8 27 May 2026 07:10AM UTC 164
95.78
GitHub Action Run
9 run-4.0-gemfiles/multi_json.gemfile - 26496466230.9 27 May 2026 07:10AM UTC 164
36.96
GitHub Action Run
10 run-3.4-gemfiles/rack_3_2.gemfile - 26496466230.10 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
11 run-4.0-gemfiles/grape_entity.gemfile - 26496466230.11 27 May 2026 07:10AM UTC 164
50.58
GitHub Action Run
12 run-3.2-Gemfile - 26496466230.12 27 May 2026 07:10AM UTC 164
95.78
GitHub Action Run
13 run-3.4-gemfiles/rails_7_2.gemfile - 26496466230.13 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
14 run-4.0-gemfiles/rails_8_0.gemfile - 26496466230.14 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
15 run-3.4-gemfiles/rails_8_0.gemfile - 26496466230.15 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
16 run-3.4-gemfiles/rack_2_2.gemfile - 26496466230.16 27 May 2026 07:10AM UTC 164
95.7
GitHub Action Run
17 run-4.0-gemfiles/dry_validation.gemfile - 26496466230.17 27 May 2026 07:10AM UTC 164
58.7
GitHub Action Run
18 run-4.0-gemfiles/grape_swagger.gemfile - 26496466230.18 27 May 2026 07:10AM UTC 164
55.61
GitHub Action Run
19 run-4.0-gemfiles/rack_3_2.gemfile - 26496466230.19 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
20 run-4.0-gemfiles/rack_2_2.gemfile - 26496466230.20 27 May 2026 07:10AM UTC 164
95.7
GitHub Action Run
21 run-3.3-gemfiles/rails_8_1.gemfile - 26496466230.21 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
22 run-4.0-gemfiles/rails_7_2.gemfile - 26496466230.22 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
23 run-3.2-gemfiles/rack_3_0.gemfile - 26496466230.23 27 May 2026 07:10AM UTC 164
95.78
GitHub Action Run
24 run-3.3-gemfiles/rails_7_2.gemfile - 26496466230.24 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
25 run-3.2-gemfiles/rack_3_2.gemfile - 26496466230.25 27 May 2026 07:10AM UTC 164
95.78
GitHub Action Run
26 run-4.0-gemfiles/rack_3_1.gemfile - 26496466230.26 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
27 run-3.3-gemfiles/rack_3_0.gemfile - 26496466230.27 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
28 run-3.4-gemfiles/rack_3_1.gemfile - 26496466230.28 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
29 run-3.3-gemfiles/rack_3_1.gemfile - 26496466230.29 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
30 run-3.3-gemfiles/rails_8_0.gemfile - 26496466230.30 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
31 run-4.0-gemfiles/rails_8_1.gemfile - 26496466230.31 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
32 run-3.4-Gemfile - 26496466230.32 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
33 run-3.3-Gemfile - 26496466230.33 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
34 run-3.2-gemfiles/rack_2_2.gemfile - 26496466230.34 27 May 2026 07:10AM UTC 164
95.74
GitHub Action Run
35 run-3.4-gemfiles/rails_8_1.gemfile - 26496466230.35 27 May 2026 07:10AM UTC 165
95.74
GitHub Action Run
36 run-3.2-gemfiles/rails_8_1.gemfile - 26496466230.36 27 May 2026 07:10AM UTC 165
95.79
GitHub Action Run
37 run-4.0-gemfiles/hashie.gemfile - 26496466230.37 27 May 2026 07:10AM UTC 164
62.9
GitHub Action Run
38 run-3.2-gemfiles/rails_7_2.gemfile - 26496466230.38 27 May 2026 07:10AM UTC 165
95.79
GitHub Action Run
Source Files on build 26496466230
  • Tree
  • List 165
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26496466230
  • 6aaeb694 on github
  • Prev Build on master (#26494895924)
  • Next Build on master (#26614103339)
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