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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 24 May 2026 07:51PM UTC
Jobs 38
Files 164
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

24 May 2026 07:51PM UTC coverage: 96.977%. Remained the same
26371131083

Pull #2746

github

ericproulx
Hoist `using:` / `except:` to explicit kwargs on requires / optional

`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>
Pull Request #2746: Hoist using: / except: to explicit kwargs on requires / optional

1088 of 1173 branches covered (92.75%)

Branch coverage included in aggregate %.

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

3532 of 3591 relevant lines covered (98.36%)

31650.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.2-gemfiles/rails_8_1.gemfile - 26371131083.1 24 May 2026 07:51PM UTC 164
95.73
GitHub Action Run
2 run-3.2-Gemfile - 26371131083.2 24 May 2026 07:51PM UTC 163
95.73
GitHub Action Run
3 run-4.0-gemfiles/hashie.gemfile - 26371131083.3 24 May 2026 07:52PM UTC 163
62.43
GitHub Action Run
4 run-3.3-gemfiles/rails_8_1.gemfile - 26371131083.4 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
5 run-3.4-gemfiles/rails_7_2.gemfile - 26371131083.5 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
6 run-3.3-gemfiles/rails_7_2.gemfile - 26371131083.6 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
7 run-3.2-gemfiles/rack_3_0.gemfile - 26371131083.7 24 May 2026 07:51PM UTC 163
95.73
GitHub Action Run
8 run-3.4-gemfiles/rack_2_2.gemfile - 26371131083.8 24 May 2026 07:51PM UTC 163
95.65
GitHub Action Run
9 run-4.0-gemfiles/multi_xml.gemfile - 26371131083.9 24 May 2026 07:52PM UTC 163
36.64
GitHub Action Run
10 run-4.0-gemfiles/dry_validation.gemfile - 26371131083.10 24 May 2026 07:52PM UTC 163
58.22
GitHub Action Run
11 run-4.0-gemfiles/rack_2_2.gemfile - 26371131083.11 24 May 2026 07:51PM UTC 163
95.65
GitHub Action Run
12 run-4.0-gemfiles/multi_json.gemfile - 26371131083.12 24 May 2026 07:52PM UTC 163
36.64
GitHub Action Run
13 run-4.0-gemfiles/rack_3_2.gemfile - 26371131083.13 24 May 2026 07:52PM UTC 163
95.69
GitHub Action Run
14 run-3.4-gemfiles/rails_8_0.gemfile - 26371131083.14 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
15 run-3.3-gemfiles/rack_3_0.gemfile - 26371131083.15 24 May 2026 07:51PM UTC 163
95.69
GitHub Action Run
16 run-3.3-Gemfile - 26371131083.16 24 May 2026 07:51PM UTC 163
95.69
GitHub Action Run
17 run-4.0-gemfiles/rails_8_1.gemfile - 26371131083.17 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
18 run-3.2-gemfiles/rack_3_2.gemfile - 26371131083.18 24 May 2026 07:51PM UTC 163
95.73
GitHub Action Run
19 run-3.3-gemfiles/rack_3_1.gemfile - 26371131083.19 24 May 2026 07:51PM UTC 163
95.69
GitHub Action Run
20 run-3.3-gemfiles/rack_2_2.gemfile - 26371131083.20 24 May 2026 07:52PM UTC 163
95.64
GitHub Action Run
21 run-3.3-gemfiles/rails_8_0.gemfile - 26371131083.21 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
22 run-3.2-gemfiles/rack_3_1.gemfile - 26371131083.22 24 May 2026 07:51PM UTC 163
95.73
GitHub Action Run
23 run-3.3-gemfiles/rack_3_2.gemfile - 26371131083.23 24 May 2026 07:52PM UTC 163
95.69
GitHub Action Run
24 run-3.4-gemfiles/rack_3_0.gemfile - 26371131083.24 24 May 2026 07:51PM UTC 163
95.69
GitHub Action Run
25 run-3.2-gemfiles/rails_8_0.gemfile - 26371131083.25 24 May 2026 07:51PM UTC 164
95.73
GitHub Action Run
26 run-4.0-gemfiles/rack_3_0.gemfile - 26371131083.26 24 May 2026 07:51PM UTC 163
95.69
GitHub Action Run
27 run-4.0-Gemfile - 26371131083.27 24 May 2026 07:52PM UTC 163
95.69
GitHub Action Run
28 run-3.4-Gemfile - 26371131083.28 24 May 2026 07:52PM UTC 163
95.69
GitHub Action Run
29 run-3.2-gemfiles/rack_2_2.gemfile - 26371131083.29 24 May 2026 07:51PM UTC 163
95.69
GitHub Action Run
30 run-3.4-gemfiles/rack_3_2.gemfile - 26371131083.30 24 May 2026 07:52PM UTC 163
95.69
GitHub Action Run
31 run-3.4-gemfiles/rails_8_1.gemfile - 26371131083.31 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
32 run-3.4-gemfiles/rack_3_1.gemfile - 26371131083.32 24 May 2026 07:51PM UTC 163
95.69
GitHub Action Run
33 run-3.2-gemfiles/rails_7_2.gemfile - 26371131083.33 24 May 2026 07:51PM UTC 164
95.73
GitHub Action Run
34 run-4.0-gemfiles/grape_swagger.gemfile - 26371131083.34 24 May 2026 07:52PM UTC 163
55.17
GitHub Action Run
35 run-4.0-gemfiles/rails_8_0.gemfile - 26371131083.35 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
36 run-4.0-gemfiles/rails_7_2.gemfile - 26371131083.36 24 May 2026 07:52PM UTC 164
95.69
GitHub Action Run
37 run-4.0-gemfiles/grape_entity.gemfile - 26371131083.37 24 May 2026 07:52PM UTC 163
50.21
GitHub Action Run
38 run-4.0-gemfiles/rack_3_1.gemfile - 26371131083.38 24 May 2026 07:52PM UTC 163
95.69
GitHub Action Run
Source Files on build 26371131083
  • Tree
  • List 164
  • 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 #26371131083
  • Pull Request #2746
  • PR Base - master (#26292056269)
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