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

ruby-grape / grape / 34684568247
99%

Build:
DEFAULT BRANCH: master
Ran 12 Sep 2026 08:57AM 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

12 Sep 2026 08:56AM UTC coverage: 99.203% (+0.02%) from 99.184%
34684568247

push

github

web-flow
Return the elements of an Array params scope that are not a Hash from declared (#2935)

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

27282.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_json.gemfile - 34684568247.1 12 Sep 2026 08:57AM UTC 167
47.31
GitHub Action Run
2 run-4.0-gemfiles/multi_xml.gemfile - 34684568247.2 12 Sep 2026 08:57AM UTC 167
46.92
GitHub Action Run
3 run-3.4-gemfiles/rack_3_2.gemfile - 34684568247.3 12 Sep 2026 08:57AM UTC 168
97.88
GitHub Action Run
4 run-3.4-gemfiles/rails_8_1.gemfile - 34684568247.4 12 Sep 2026 08:57AM UTC 169
97.9
GitHub Action Run
5 run-4.0-gemfiles/rack_3_2.gemfile - 34684568247.5 12 Sep 2026 08:57AM UTC 168
97.9
GitHub Action Run
6 run-3.3-gemfiles/rack_2_2.gemfile - 34684568247.6 12 Sep 2026 08:57AM UTC 168
97.88
GitHub Action Run
7 run-3.4-Gemfile - 34684568247.7 12 Sep 2026 08:57AM UTC 168
97.88
GitHub Action Run
8 run-3.4-gemfiles/rails_7_2.gemfile - 34684568247.8 12 Sep 2026 08:57AM UTC 169
97.9
GitHub Action Run
9 run-3.3-gemfiles/rack_3_0.gemfile - 34684568247.9 12 Sep 2026 08:57AM UTC 168
97.9
GitHub Action Run
10 run-4.0-gemfiles/hashie.gemfile - 34684568247.10 12 Sep 2026 08:57AM UTC 167
61.72
GitHub Action Run
11 run-3.3-gemfiles/rails_8_1.gemfile - 34684568247.11 12 Sep 2026 08:57AM UTC 169
97.92
GitHub Action Run
12 run-3.3-gemfiles/rails_8_0.gemfile - 34684568247.12 12 Sep 2026 08:57AM UTC 169
97.92
GitHub Action Run
13 run-3.4-gemfiles/rack_2_2.gemfile - 34684568247.13 12 Sep 2026 08:57AM UTC 168
97.85
GitHub Action Run
14 run-3.3-gemfiles/rack_3_2.gemfile - 34684568247.14 12 Sep 2026 08:57AM UTC 168
97.92
GitHub Action Run
15 run-4.0-gemfiles/rack_3_1.gemfile - 34684568247.15 12 Sep 2026 08:57AM UTC 168
97.88
GitHub Action Run
16 run-3.4-gemfiles/rack_3_1.gemfile - 34684568247.16 12 Sep 2026 08:57AM UTC 168
97.9
GitHub Action Run
17 run-4.0-gemfiles/rails_8_0.gemfile - 34684568247.17 12 Sep 2026 08:57AM UTC 169
97.9
GitHub Action Run
18 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34684568247.18 12 Sep 2026 08:57AM UTC 167
46.96
GitHub Action Run
19 run-3.3-gemfiles/rack_3_1.gemfile - 34684568247.19 12 Sep 2026 08:57AM UTC 168
97.92
GitHub Action Run
20 run-4.0-gemfiles/grape_entity.gemfile - 34684568247.20 12 Sep 2026 08:57AM UTC 167
50.22
GitHub Action Run
21 run-4.0-gemfiles/rack_3_0.gemfile - 34684568247.21 12 Sep 2026 08:57AM UTC 168
97.9
GitHub Action Run
22 run-4.0-gemfiles/dry_validation.gemfile - 34684568247.22 12 Sep 2026 08:57AM UTC 167
57.74
GitHub Action Run
23 run-4.0-gemfiles/rails_8_1.gemfile - 34684568247.23 12 Sep 2026 08:57AM UTC 169
97.88
GitHub Action Run
24 run-4.0-gemfiles/grape_swagger.gemfile - 34684568247.24 12 Sep 2026 08:57AM UTC 167
54.94
GitHub Action Run
25 run-4.0-Gemfile - 34684568247.25 12 Sep 2026 08:57AM UTC 168
97.9
GitHub Action Run
26 run-3.3-gemfiles/rails_7_2.gemfile - 34684568247.26 12 Sep 2026 08:57AM UTC 169
97.9
GitHub Action Run
27 run-4.0-gemfiles/multi_json_1_20.gemfile - 34684568247.27 12 Sep 2026 08:57AM UTC 167
47.35
GitHub Action Run
28 run-4.0-gemfiles/rack_2_2.gemfile - 34684568247.28 12 Sep 2026 08:57AM UTC 168
97.86
GitHub Action Run
29 run-3.3-Gemfile - 34684568247.29 12 Sep 2026 08:57AM UTC 168
97.92
GitHub Action Run
30 run-3.4-gemfiles/rails_8_0.gemfile - 34684568247.30 12 Sep 2026 08:57AM UTC 169
97.9
GitHub Action Run
31 run-3.4-gemfiles/rack_3_0.gemfile - 34684568247.31 12 Sep 2026 08:57AM UTC 168
97.9
GitHub Action Run
32 run-4.0-gemfiles/rails_7_2.gemfile - 34684568247.32 12 Sep 2026 08:57AM UTC 169
97.9
GitHub Action Run
Source Files on build 34684568247
  • 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 #34684568247
  • 4ad3b19f on github
  • Prev Build on master (#34515497970)
  • Next Build on master (#34713053576)
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