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

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

Build:
Build:
LAST BUILD BRANCH: dblock/test-push-master-only
DEFAULT BRANCH: master
Ran 22 Nov 2026 12:54AM 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:53AM UTC coverage: 100.0%. Remained the same
44968849614

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

1641 of 1641 branches covered (100.0%)

Branch coverage included in aggregate %.

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

4778 of 4778 relevant lines covered (100.0%)

22033.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/hashie.gemfile - 44968849614.1 22 Nov 2026 12:54AM UTC 178
59.52
GitHub Action Run
2 run-3.3-gemfiles/rack_3_2.gemfile - 44968849614.2 22 Nov 2026 12:54AM UTC 179
98.91
GitHub Action Run
3 run-3.4-gemfiles/rack_3_1.gemfile - 44968849614.3 22 Nov 2026 12:54AM UTC 179
98.89
GitHub Action Run
4 run-3.4-Gemfile - 44968849614.4 22 Nov 2026 12:54AM UTC 179
98.89
GitHub Action Run
5 run-4.0-gemfiles/rack_3_2.gemfile - 44968849614.5 22 Nov 2026 12:54AM UTC 179
98.89
GitHub Action Run
6 run-3.3-gemfiles/rails_8_1.gemfile - 44968849614.6 22 Nov 2026 12:54AM UTC 180
98.91
GitHub Action Run
7 run-3.3-gemfiles/rails_8_0.gemfile - 44968849614.7 22 Nov 2026 12:54AM UTC 180
98.91
GitHub Action Run
8 run-4.0-gemfiles/rails_8_0.gemfile - 44968849614.8 22 Nov 2026 12:54AM UTC 180
98.89
GitHub Action Run
9 run-3.3-gemfiles/rack_3_1.gemfile - 44968849614.9 22 Nov 2026 12:54AM UTC 179
98.91
GitHub Action Run
10 run-4.0-gemfiles/grape_swagger.gemfile - 44968849614.10 22 Nov 2026 12:54AM UTC 178
53.56
GitHub Action Run
11 run-4.0-gemfiles/multi_json.gemfile - 44968849614.11 22 Nov 2026 12:54AM UTC 178
46.33
GitHub Action Run
12 run-4.0-Gemfile - 44968849614.12 22 Nov 2026 12:54AM UTC 179
98.89
GitHub Action Run
13 run-3.4-gemfiles/rack_3_2.gemfile - 44968849614.13 22 Nov 2026 12:54AM UTC 179
98.89
GitHub Action Run
14 run-3.4-gemfiles/rails_8_0.gemfile - 44968849614.14 22 Nov 2026 12:54AM UTC 180
98.89
GitHub Action Run
15 run-4.0-gemfiles/multi_xml_0_8.gemfile - 44968849614.15 22 Nov 2026 12:54AM UTC 178
46.07
GitHub Action Run
16 run-3.4-gemfiles/rails_8_1.gemfile - 44968849614.16 22 Nov 2026 12:54AM UTC 180
98.89
GitHub Action Run
17 run-4.0-gemfiles/multi_json_1_20.gemfile - 44968849614.17 22 Nov 2026 12:54AM UTC 178
46.37
GitHub Action Run
18 run-4.0-gemfiles/rack_3_1.gemfile - 44968849614.18 22 Nov 2026 12:54AM UTC 179
98.89
GitHub Action Run
19 run-4.0-gemfiles/dry_validation.gemfile - 44968849614.19 22 Nov 2026 12:54AM UTC 178
57.32
GitHub Action Run
20 run-4.0-gemfiles/multi_xml.gemfile - 44968849614.20 22 Nov 2026 12:54AM UTC 178
46.04
GitHub Action Run
21 run-4.0-gemfiles/rails_8_1.gemfile - 44968849614.21 22 Nov 2026 12:54AM UTC 180
98.89
GitHub Action Run
22 run-4.0-gemfiles/grape_entity.gemfile - 44968849614.22 22 Nov 2026 12:54AM UTC 178
49.03
GitHub Action Run
23 run-3.3-Gemfile - 44968849614.23 22 Nov 2026 12:54AM UTC 179
98.91
GitHub Action Run
Source Files on build 44968849614
  • Tree
  • List 180
  • Changed 11
  • Source Changed 11
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #44968849614
  • 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