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

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

Build:
Build:
LAST BUILD BRANCH: perf/static-route-matching
DEFAULT BRANCH: master
Ran 11 Sep 2026 10:30AM 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:29AM UTC coverage: 99.203% (+0.02%) from 99.184%
34589540190

push

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>

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%)

27280.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rails_7_2.gemfile - 34589540190.1 11 Sep 2026 10:31AM UTC 169
97.9
GitHub Action Run
2 run-3.4-gemfiles/rack_3_2.gemfile - 34589540190.2 11 Sep 2026 10:30AM UTC 168
97.9
GitHub Action Run
3 run-4.0-gemfiles/multi_json_1_20.gemfile - 34589540190.3 11 Sep 2026 10:30AM UTC 167
47.35
GitHub Action Run
4 run-3.3-gemfiles/rack_3_0.gemfile - 34589540190.4 11 Sep 2026 10:31AM UTC 168
97.9
GitHub Action Run
5 run-4.0-gemfiles/grape_swagger.gemfile - 34589540190.5 11 Sep 2026 10:30AM UTC 167
54.94
GitHub Action Run
6 run-3.3-Gemfile - 34589540190.6 11 Sep 2026 10:30AM UTC 168
97.92
GitHub Action Run
7 run-3.4-gemfiles/rails_8_0.gemfile - 34589540190.7 11 Sep 2026 10:31AM UTC 169
97.9
GitHub Action Run
8 run-3.3-gemfiles/rails_8_0.gemfile - 34589540190.8 11 Sep 2026 10:31AM UTC 169
97.9
GitHub Action Run
9 run-3.4-gemfiles/rack_3_1.gemfile - 34589540190.9 11 Sep 2026 10:30AM UTC 168
97.9
GitHub Action Run
10 run-4.0-gemfiles/multi_json.gemfile - 34589540190.10 11 Sep 2026 10:30AM UTC 167
47.31
GitHub Action Run
11 run-3.3-gemfiles/rails_8_1.gemfile - 34589540190.11 11 Sep 2026 10:31AM UTC 169
97.92
GitHub Action Run
12 run-4.0-gemfiles/rails_8_0.gemfile - 34589540190.12 11 Sep 2026 10:31AM UTC 169
97.88
GitHub Action Run
13 run-3.4-gemfiles/rack_3_0.gemfile - 34589540190.13 11 Sep 2026 10:31AM UTC 168
97.9
GitHub Action Run
14 run-3.4-Gemfile - 34589540190.14 11 Sep 2026 10:31AM UTC 168
97.88
GitHub Action Run
15 run-3.3-gemfiles/rack_2_2.gemfile - 34589540190.15 11 Sep 2026 10:31AM UTC 168
97.86
GitHub Action Run
16 run-4.0-gemfiles/dry_validation.gemfile - 34589540190.16 11 Sep 2026 10:30AM UTC 167
57.74
GitHub Action Run
17 run-4.0-gemfiles/rack_3_0.gemfile - 34589540190.17 11 Sep 2026 10:31AM UTC 168
97.9
GitHub Action Run
18 run-4.0-gemfiles/multi_xml.gemfile - 34589540190.18 11 Sep 2026 10:31AM UTC 167
46.92
GitHub Action Run
19 run-3.3-gemfiles/rack_3_1.gemfile - 34589540190.19 11 Sep 2026 10:30AM UTC 168
97.92
GitHub Action Run
20 run-4.0-gemfiles/rack_3_2.gemfile - 34589540190.20 11 Sep 2026 10:30AM UTC 168
97.88
GitHub Action Run
21 run-3.4-gemfiles/rails_8_1.gemfile - 34589540190.21 11 Sep 2026 10:30AM UTC 169
97.88
GitHub Action Run
22 run-3.4-gemfiles/rails_7_2.gemfile - 34589540190.22 11 Sep 2026 10:30AM UTC 169
97.9
GitHub Action Run
23 run-3.4-gemfiles/rack_2_2.gemfile - 34589540190.23 11 Sep 2026 10:30AM UTC 168
97.86
GitHub Action Run
24 run-4.0-gemfiles/hashie.gemfile - 34589540190.24 11 Sep 2026 10:30AM UTC 167
61.72
GitHub Action Run
25 run-4.0-gemfiles/rack_2_2.gemfile - 34589540190.25 11 Sep 2026 10:30AM UTC 168
97.86
GitHub Action Run
26 run-4.0-gemfiles/rails_8_1.gemfile - 34589540190.26 11 Sep 2026 10:30AM UTC 169
97.88
GitHub Action Run
27 run-3.3-gemfiles/rack_3_2.gemfile - 34589540190.27 11 Sep 2026 10:30AM UTC 168
97.92
GitHub Action Run
28 run-3.3-gemfiles/rails_7_2.gemfile - 34589540190.28 11 Sep 2026 10:31AM UTC 169
97.92
GitHub Action Run
29 run-4.0-gemfiles/grape_entity.gemfile - 34589540190.29 11 Sep 2026 10:31AM UTC 167
50.22
GitHub Action Run
30 run-4.0-gemfiles/rack_3_1.gemfile - 34589540190.30 11 Sep 2026 10:30AM UTC 168
97.9
GitHub Action Run
31 run-4.0-Gemfile - 34589540190.31 11 Sep 2026 10:30AM UTC 168
97.9
GitHub Action Run
32 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34589540190.32 11 Sep 2026 10:30AM UTC 167
46.96
GitHub Action Run
Source Files on build 34589540190
  • 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 #34589540190
  • e955193e on github
  • Prev Build on master (#34515497970)
  • Next Build on fix/declared-blank-array-elements (#34589558549)
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