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

ruby-grape / grape / 34589558549
99%
master: 99%

Build:
Build:
LAST BUILD BRANCH: perf/static-route-matching
DEFAULT BRANCH: master
Ran 11 Sep 2026 10:31AM UTC
Jobs 32
Files 169
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

11 Sep 2026 10:30AM UTC coverage: 99.203% (+0.02%) from 99.184%
34589558549

Pull #2935

github

ericproulx
Return the elements of an Array params scope that are not a Hash from declared

`declared` filters each element of an Array scope down to its declared
keys by building an empty copy of the element (`passed_params.class.new`)
and filling it. An element that is not a Hash has no keys, and copying it
raised: `NoMethodError` for `nil`, `false` and numbers, and a `TypeError`
for a String, which then got indexed with a Symbol. The request answered
500.

Validation lets such an element through wherever nothing in the scope is
required of it:

    optional :items, type: Array do   # blank elements are passed over
      requires :id, type: Integer
    end

    requires :tags, type: Array do    # nothing to check on a non-Hash
      optional :label, type: String
    end

so `{"items": [null, {"id": 1}]}` or `{"tags": ["x", {"label": "y"}]}`
got past validation and then broke the endpoint calling `declared`.

Such an element is now returned as it came in, the way a leaf value is.
The test is `respond_to?(:key?)`, the one `declare_leaf` already uses, so
a Hash-like object that is not a Hash is still filtered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2935: Return the elements of an Array params scope that are not a Hash from declared

1309 of 1352 branches covered (96.82%)

Branch coverage included in aggregate %.

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

4040 of 4040 relevant lines covered (100.0%)

27288.65 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rails_8_0.gemfile - 34589558549.1 11 Sep 2026 10:32AM UTC 169
97.9
GitHub Action Run
2 run-4.0-gemfiles/rack_3_1.gemfile - 34589558549.2 11 Sep 2026 10:32AM UTC 168
97.88
GitHub Action Run
3 run-4.0-gemfiles/hashie.gemfile - 34589558549.3 11 Sep 2026 10:31AM UTC 167
61.72
GitHub Action Run
4 run-3.3-gemfiles/rack_3_2.gemfile - 34589558549.4 11 Sep 2026 10:32AM UTC 168
97.9
GitHub Action Run
5 run-4.0-gemfiles/rack_3_2.gemfile - 34589558549.5 11 Sep 2026 10:32AM UTC 168
97.88
GitHub Action Run
6 run-3.3-Gemfile - 34589558549.6 11 Sep 2026 10:32AM UTC 168
97.92
GitHub Action Run
7 run-4.0-gemfiles/grape_swagger.gemfile - 34589558549.7 11 Sep 2026 10:32AM UTC 167
54.94
GitHub Action Run
8 run-4.0-gemfiles/rails_8_0.gemfile - 34589558549.8 11 Sep 2026 10:33AM UTC 169
97.9
GitHub Action Run
9 run-3.4-gemfiles/rails_7_2.gemfile - 34589558549.9 11 Sep 2026 10:32AM UTC 169
97.88
GitHub Action Run
10 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34589558549.10 11 Sep 2026 10:32AM UTC 167
46.96
GitHub Action Run
11 run-4.0-gemfiles/multi_json_1_20.gemfile - 34589558549.11 11 Sep 2026 10:31AM UTC 167
47.35
GitHub Action Run
12 run-3.4-gemfiles/rack_3_2.gemfile - 34589558549.12 11 Sep 2026 10:32AM UTC 168
97.9
GitHub Action Run
13 run-3.4-gemfiles/rack_3_0.gemfile - 34589558549.13 11 Sep 2026 10:32AM UTC 168
97.9
GitHub Action Run
14 run-4.0-gemfiles/grape_entity.gemfile - 34589558549.14 11 Sep 2026 10:33AM UTC 167
50.22
GitHub Action Run
15 run-3.4-gemfiles/rack_3_1.gemfile - 34589558549.15 11 Sep 2026 10:32AM UTC 168
97.9
GitHub Action Run
16 run-3.3-gemfiles/rack_2_2.gemfile - 34589558549.16 11 Sep 2026 10:32AM UTC 168
97.86
GitHub Action Run
17 run-3.3-gemfiles/rack_3_0.gemfile - 34589558549.17 11 Sep 2026 10:32AM UTC 168
97.92
GitHub Action Run
18 run-3.4-Gemfile - 34589558549.18 11 Sep 2026 10:32AM UTC 168
97.88
GitHub Action Run
19 run-4.0-gemfiles/rack_2_2.gemfile - 34589558549.19 11 Sep 2026 10:32AM UTC 168
97.86
GitHub Action Run
20 run-4.0-gemfiles/multi_xml.gemfile - 34589558549.20 11 Sep 2026 10:32AM UTC 167
46.92
GitHub Action Run
21 run-3.3-gemfiles/rails_7_2.gemfile - 34589558549.21 11 Sep 2026 10:32AM UTC 169
97.9
GitHub Action Run
22 run-4.0-gemfiles/rails_7_2.gemfile - 34589558549.22 11 Sep 2026 10:31AM UTC 169
97.9
GitHub Action Run
23 run-4.0-gemfiles/multi_json.gemfile - 34589558549.23 11 Sep 2026 10:31AM UTC 167
47.31
GitHub Action Run
24 run-4.0-Gemfile - 34589558549.24 11 Sep 2026 10:32AM UTC 168
97.88
GitHub Action Run
25 run-3.4-gemfiles/rack_2_2.gemfile - 34589558549.25 11 Sep 2026 10:33AM UTC 168
97.85
GitHub Action Run
26 run-3.3-gemfiles/rails_8_1.gemfile - 34589558549.26 11 Sep 2026 10:31AM UTC 169
97.92
GitHub Action Run
27 run-3.3-gemfiles/rack_3_1.gemfile - 34589558549.27 11 Sep 2026 10:31AM UTC 168
97.9
GitHub Action Run
28 run-3.4-gemfiles/rails_8_1.gemfile - 34589558549.28 11 Sep 2026 10:32AM UTC 169
97.9
GitHub Action Run
29 run-3.4-gemfiles/rails_8_0.gemfile - 34589558549.29 11 Sep 2026 10:32AM UTC 169
97.9
GitHub Action Run
30 run-4.0-gemfiles/rack_3_0.gemfile - 34589558549.30 11 Sep 2026 10:32AM UTC 168
97.9
GitHub Action Run
31 run-4.0-gemfiles/dry_validation.gemfile - 34589558549.31 11 Sep 2026 10:32AM UTC 167
57.74
GitHub Action Run
32 run-4.0-gemfiles/rails_8_1.gemfile - 34589558549.32 11 Sep 2026 10:31AM UTC 169
97.88
GitHub Action Run
Source Files on build 34589558549
  • Tree
  • List 169
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34589558549
  • Pull Request #2935
  • PR Base - master (#34515497970)
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