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

ruby-grape / grape / 44969143876
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dblock/test-push-master-only
DEFAULT BRANCH: master
Ran 22 Nov 2026 12:57AM UTC
Jobs 23
Files 180
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

22 Nov 2026 12:56AM UTC coverage: 100.0%. Remained the same
44969143876

Pull #3100

github

ericproulx
Report a required param the request left out as missing only

Every validator of a `requires` param was called whether the request
sent the param or not, because PresenceValidator has to be called for
a missing one to report it. A custom validator that read the value was
then handed nil and raised, so the request answered 500 instead of
400. The README's own AlphaNumeric example does that:

    requires :text, alpha_numeric: true

    GET /   Before: 500 NoMethodError (undefined method 'match?' for nil)
            After:  400 text is missing

The built-in validators added a second error to `is missing`
instead: `n is missing, n does not have a valid value` from `values`,
`email is missing, email is empty` from `allow_blank: false`, and
`ids is missing, ids is invalid` from a `coerce_with` method handed nil.

Only PresenceValidator is now called for an attribute the params do
not hold. Every other validator sees only the params a request sent,
as it already did for an `optional` param, so a missing one is
reported once. Each validator settles this when it is built, so the
attribute loop reads an ivar where it called `required?`. A param
sent as `null` is still validated, and `values` still rejects it.

Asking the params whether they hold each required attribute cost a
nested body of 20 items 5%, and `declared` 4%, in Duel. The built-in
validators no longer ask again whether the params are a Hash that
holds the attribute, as they are now only called when it does. And
CoerceValidator, which every typed param has, is still called for a
required attribute and tells a missing one for itself, from the value
it reads anyway: only a nil is looked up. Every benchmark now
measures the same as master.

UPGRADING notes the dropped second messages, including the one #3010
documented for a nested param with `values`. The README says when
`validate_param!` is called.

Fixes #1693.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pull Request #3100: Report a required param the request left out as missing only

1643 of 1643 branches covered (100.0%)

Branch coverage included in aggregate %.

16 of 16 new or added lines in 4 files covered. (100.0%)

4779 of 4779 relevant lines covered (100.0%)

22045.63 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-Gemfile - 44969143876.1 22 Nov 2026 12:57AM UTC 179
98.89
GitHub Action Run
2 run-3.4-gemfiles/rails_8_1.gemfile - 44969143876.2 22 Nov 2026 12:57AM UTC 180
98.89
GitHub Action Run
3 run-4.0-gemfiles/rack_3_1.gemfile - 44969143876.3 22 Nov 2026 12:57AM UTC 179
98.89
GitHub Action Run
4 run-4.0-gemfiles/hashie.gemfile - 44969143876.4 22 Nov 2026 12:57AM UTC 178
59.49
GitHub Action Run
5 run-4.0-gemfiles/grape_swagger.gemfile - 44969143876.5 22 Nov 2026 12:57AM UTC 178
53.53
GitHub Action Run
6 run-4.0-gemfiles/grape_entity.gemfile - 44969143876.6 22 Nov 2026 12:57AM UTC 178
49.01
GitHub Action Run
7 run-3.3-gemfiles/rack_3_1.gemfile - 44969143876.7 22 Nov 2026 12:57AM UTC 179
98.91
GitHub Action Run
8 run-3.4-gemfiles/rails_8_0.gemfile - 44969143876.8 22 Nov 2026 12:58AM UTC 180
98.89
GitHub Action Run
9 run-4.0-gemfiles/multi_json.gemfile - 44969143876.9 22 Nov 2026 12:57AM UTC 178
46.31
GitHub Action Run
10 run-3.3-Gemfile - 44969143876.10 22 Nov 2026 12:57AM UTC 179
98.91
GitHub Action Run
11 run-4.0-gemfiles/rails_8_0.gemfile - 44969143876.11 22 Nov 2026 12:58AM UTC 180
98.89
GitHub Action Run
12 run-3.3-gemfiles/rack_3_2.gemfile - 44969143876.12 22 Nov 2026 12:58AM UTC 179
98.91
GitHub Action Run
13 run-3.3-gemfiles/rails_8_0.gemfile - 44969143876.13 22 Nov 2026 12:58AM UTC 180
98.91
GitHub Action Run
14 run-3.3-gemfiles/rails_8_1.gemfile - 44969143876.14 22 Nov 2026 12:57AM UTC 180
98.91
GitHub Action Run
15 run-4.0-gemfiles/rails_8_1.gemfile - 44969143876.15 22 Nov 2026 12:57AM UTC 180
98.89
GitHub Action Run
16 run-4.0-gemfiles/multi_json_1_20.gemfile - 44969143876.16 22 Nov 2026 12:57AM UTC 178
46.34
GitHub Action Run
17 run-4.0-gemfiles/rack_3_2.gemfile - 44969143876.17 22 Nov 2026 12:57AM UTC 179
98.89
GitHub Action Run
18 run-4.0-gemfiles/multi_xml.gemfile - 44969143876.18 22 Nov 2026 12:57AM UTC 178
46.01
GitHub Action Run
19 run-3.4-gemfiles/rack_3_2.gemfile - 44969143876.19 22 Nov 2026 12:57AM UTC 179
98.89
GitHub Action Run
20 run-4.0-gemfiles/multi_xml_0_8.gemfile - 44969143876.20 22 Nov 2026 12:57AM UTC 178
46.05
GitHub Action Run
21 run-3.4-gemfiles/rack_3_1.gemfile - 44969143876.21 22 Nov 2026 12:57AM UTC 179
98.89
GitHub Action Run
22 run-3.4-Gemfile - 44969143876.22 22 Nov 2026 12:58AM UTC 179
98.89
GitHub Action Run
23 run-4.0-gemfiles/dry_validation.gemfile - 44969143876.23 22 Nov 2026 12:57AM UTC 178
57.3
GitHub Action Run
Source Files on build 44969143876
  • Tree
  • List 180
  • Changed 10
  • Source Changed 10
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #44969143876
  • Pull Request #3100
  • PR Base - master (#44967550286)
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