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

ruby-grape / grape / 36437608697
100%

Build:
DEFAULT BRANCH: master
Ran 28 Sep 2026 02:39PM UTC
Jobs 32
Files 166
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

28 Sep 2026 02:39PM UTC coverage: 99.983% (-0.02%) from 100.0%
36437608697

push

github

web-flow
Reject nil for a required param with values in a nested scope (#3010)

A `requires` param with `values:` rejected `nil` only at the root scope.
In a Hash scope, an Array scope or a `given` block, `nil` (or a value
that coerces to it, such as `""` for `type: Integer`) passed validation
and reached the endpoint, so `{"lines":[{"qty":null}]}` got through
`requires :qty, type: Integer, values: 1..99` and broke code as ordinary
as `params[:lines].sum { |line| line[:qty] }`. The README says the
opposite: "`requires` enforces presence and `:values` rejects `nil`."

The root-only rule came from f60eaa62 (2014, #671). Back then a child
scope's validators ran even when its optional parent was absent, so
rejecting `nil` there failed every request that left the parent out.
Scopes now skip validation when an optional parent is absent, so the
workaround only let `nil` through where the parent *is* given.

The validator now rejects `nil` whenever the param is required. A
missing nested param also reports `does not have a valid value` after
`is missing`, as a root param already did.

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

1493 of 1493 branches covered (100.0%)

Branch coverage included in aggregate %.

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

1 existing line in 1 file now uncovered.

4314 of 4315 relevant lines covered (99.98%)

29465.48 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
99.68
-0.32% lib/grape/validations/params_scope.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.3-Gemfile - 36437608697.1 28 Sep 2026 02:40PM UTC 165
98.81
GitHub Action Run
2 run-4.0-Gemfile - 36437608697.2 28 Sep 2026 02:39PM UTC 165
98.79
GitHub Action Run
3 run-4.0-gemfiles/grape_swagger.gemfile - 36437608697.3 28 Sep 2026 02:39PM UTC 164
53.31
GitHub Action Run
4 run-4.0-gemfiles/multi_xml_0_8.gemfile - 36437608697.4 28 Sep 2026 02:39PM UTC 164
45.72
GitHub Action Run
5 run-3.4-Gemfile - 36437608697.5 28 Sep 2026 02:40PM UTC 165
98.79
GitHub Action Run
6 run-4.0-gemfiles/multi_json_1_20.gemfile - 36437608697.6 28 Sep 2026 02:39PM UTC 164
46.04
GitHub Action Run
7 run-3.3-gemfiles/rails_8_0.gemfile - 36437608697.7 28 Sep 2026 02:39PM UTC 166
98.81
GitHub Action Run
8 run-3.4-gemfiles/rack_3_1.gemfile - 36437608697.8 28 Sep 2026 02:39PM UTC 165
98.79
GitHub Action Run
9 run-3.3-gemfiles/rack_3_2.gemfile - 36437608697.9 28 Sep 2026 02:39PM UTC 165
98.81
GitHub Action Run
10 run-3.4-gemfiles/rack_3_0.gemfile - 36437608697.10 28 Sep 2026 02:39PM UTC 165
98.79
GitHub Action Run
11 run-4.0-gemfiles/rack_3_1.gemfile - 36437608697.11 28 Sep 2026 02:40PM UTC 165
98.79
GitHub Action Run
12 run-3.3-gemfiles/rack_2_2.gemfile - 36437608697.12 28 Sep 2026 02:39PM UTC 165
98.78
GitHub Action Run
13 run-4.0-gemfiles/rack_2_2.gemfile - 36437608697.13 28 Sep 2026 02:40PM UTC 165
98.76
GitHub Action Run
14 run-4.0-gemfiles/rack_3_2.gemfile - 36437608697.14 28 Sep 2026 02:39PM UTC 165
98.79
GitHub Action Run
15 run-3.4-gemfiles/rails_7_2.gemfile - 36437608697.15 28 Sep 2026 02:40PM UTC 166
98.79
GitHub Action Run
16 run-3.3-gemfiles/rails_7_2.gemfile - 36437608697.16 28 Sep 2026 02:40PM UTC 166
98.81
GitHub Action Run
17 run-3.3-gemfiles/rack_3_0.gemfile - 36437608697.17 28 Sep 2026 02:40PM UTC 165
98.81
GitHub Action Run
18 run-3.4-gemfiles/rails_8_1.gemfile - 36437608697.18 28 Sep 2026 02:40PM UTC 166
98.79
GitHub Action Run
19 run-3.3-gemfiles/rack_3_1.gemfile - 36437608697.19 28 Sep 2026 02:39PM UTC 165
98.81
GitHub Action Run
20 run-3.4-gemfiles/rails_8_0.gemfile - 36437608697.20 28 Sep 2026 02:39PM UTC 166
98.79
GitHub Action Run
21 run-4.0-gemfiles/rack_3_0.gemfile - 36437608697.21 28 Sep 2026 02:39PM UTC 165
98.79
GitHub Action Run
22 run-3.4-gemfiles/rack_2_2.gemfile - 36437608697.22 28 Sep 2026 02:39PM UTC 165
98.76
GitHub Action Run
23 run-4.0-gemfiles/multi_json.gemfile - 36437608697.23 28 Sep 2026 02:39PM UTC 164
46.0
GitHub Action Run
24 run-4.0-gemfiles/hashie.gemfile - 36437608697.24 28 Sep 2026 02:39PM UTC 164
59.97
GitHub Action Run
25 run-4.0-gemfiles/dry_validation.gemfile - 36437608697.25 28 Sep 2026 02:39PM UTC 164
55.89
GitHub Action Run
26 run-3.3-gemfiles/rails_8_1.gemfile - 36437608697.26 28 Sep 2026 02:39PM UTC 166
98.81
GitHub Action Run
27 run-4.0-gemfiles/grape_entity.gemfile - 36437608697.27 28 Sep 2026 02:39PM UTC 164
48.77
GitHub Action Run
28 run-3.4-gemfiles/rack_3_2.gemfile - 36437608697.28 28 Sep 2026 02:39PM UTC 165
98.79
GitHub Action Run
29 run-4.0-gemfiles/multi_xml.gemfile - 36437608697.29 28 Sep 2026 02:39PM UTC 164
45.69
GitHub Action Run
30 run-4.0-gemfiles/rails_7_2.gemfile - 36437608697.30 28 Sep 2026 02:39PM UTC 166
98.79
GitHub Action Run
31 run-4.0-gemfiles/rails_8_1.gemfile - 36437608697.31 28 Sep 2026 02:39PM UTC 166
98.79
GitHub Action Run
32 run-4.0-gemfiles/rails_8_0.gemfile - 36437608697.32 28 Sep 2026 02:39PM UTC 166
98.79
GitHub Action Run
Source Files on build 36437608697
  • Tree
  • List 166
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #36437608697
  • 1171907e on github
  • Prev Build on master (#36276811501)
  • Next Build on master (#36438680613)
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