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

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

Build:
Build:
LAST BUILD BRANCH: perf/route-buckets
DEFAULT BRANCH: master
Ran 11 Sep 2026 03:05PM UTC
Jobs 32
Files 169
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

11 Sep 2026 03:04PM UTC coverage: 99.127% (-0.06%) from 99.184%
34613907687

Pull #2936

github

ericproulx
Speed up header versioning, content negotiation, params validation and error responses

Thirteen request-path changes, each measured on its own and together:

Versioning and content negotiation
- Header versioner: answer the Accept headers most requests send (every
  declared media type, */*, none) from a table built once per list of
  media types and shared through Grape::Util::Cache, instead of running
  Rack::Utils.best_q_match and MediaType.parse per request. MediaType is
  now immutable, so the api.* env strings it writes are frozen
  (UPGRADING).
- Versioners read cascade/parameter/strict/vendor off instance variables
  instead of two Forwardable hops and two Data readers.
- Formatter: the same kind of shared table for Accept-negotiated formats
  when no format is pinned.

Params validation
- A required, dependency-free Hash scope (the root scope included) is
  validated without the attributes iterator, and skips should_validate?,
  which always answers true for it.
- So are the elements of an Array scope that is the only one iterating
  elements on such a chain, required or optional.
- The attributes iterator settles its per-scope state once per pass.
- qualifying_params returns early for scopes other than `given`.
- declared skips the renamed-params lookup when nothing is renamed.
- DryTypeCoercer uses dry-types' non-raising block form, so a rejected
  value no longer builds a re-raised backtrace.

Error responses
- The default rescue handler no longer reads the exception's backtrace
  unless one is asked for.
- Formatter lets a parser's Grape errors through without re-raising them.
- rack_response hands its fresh headers to Rack::Response as they are,
  Method rescue handlers are called directly, and ensure_utf8 returns a
  valid UTF-8 message as it is.
- ValidationErrors#full_messages is translated once instead of on every
  call.

Adds specs for behaviour the changes brought to light and nothing
pinned, each found by a mutation that passed ... (continued)
Pull Request #2936: Speed up header versioning, content negotiation, params validation and error responses

1343 of 1390 branches covered (96.62%)

Branch coverage included in aggregate %.

104 of 104 new or added lines in 12 files covered. (100.0%)

1 existing line in 1 file now uncovered.

4106 of 4107 relevant lines covered (99.98%)

26733.28 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
96.97
-3.03% lib/grape/validations/types/dry_type_coercer.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rails_8_1.gemfile - 34613907687.1 11 Sep 2026 03:05PM UTC 169
97.87
GitHub Action Run
2 run-3.4-gemfiles/rails_8_0.gemfile - 34613907687.2 11 Sep 2026 03:06PM UTC 169
97.85
GitHub Action Run
3 run-3.4-gemfiles/rails_7_2.gemfile - 34613907687.3 11 Sep 2026 03:05PM UTC 169
97.83
GitHub Action Run
4 run-3.3-gemfiles/rack_3_2.gemfile - 34613907687.4 11 Sep 2026 03:06PM UTC 168
97.87
GitHub Action Run
5 run-4.0-gemfiles/hashie.gemfile - 34613907687.5 11 Sep 2026 03:05PM UTC 167
61.08
GitHub Action Run
6 run-4.0-gemfiles/rack_3_2.gemfile - 34613907687.6 11 Sep 2026 03:06PM UTC 168
97.83
GitHub Action Run
7 run-4.0-gemfiles/grape_swagger.gemfile - 34613907687.7 11 Sep 2026 03:06PM UTC 167
54.03
GitHub Action Run
8 run-3.3-gemfiles/rack_3_0.gemfile - 34613907687.8 11 Sep 2026 03:06PM UTC 168
97.87
GitHub Action Run
9 run-3.4-gemfiles/rack_3_1.gemfile - 34613907687.9 11 Sep 2026 03:05PM UTC 168
97.85
GitHub Action Run
10 run-4.0-gemfiles/rack_2_2.gemfile - 34613907687.10 11 Sep 2026 03:06PM UTC 168
97.8
GitHub Action Run
11 run-3.4-gemfiles/rack_2_2.gemfile - 34613907687.11 11 Sep 2026 03:05PM UTC 168
97.8
GitHub Action Run
12 run-3.4-gemfiles/rack_3_2.gemfile - 34613907687.12 11 Sep 2026 03:05PM UTC 168
97.83
GitHub Action Run
13 run-4.0-gemfiles/rails_8_0.gemfile - 34613907687.13 11 Sep 2026 03:06PM UTC 169
97.85
GitHub Action Run
14 run-3.3-gemfiles/rails_8_0.gemfile - 34613907687.14 11 Sep 2026 03:06PM UTC 169
97.85
GitHub Action Run
15 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34613907687.15 11 Sep 2026 03:06PM UTC 167
46.55
GitHub Action Run
16 run-4.0-gemfiles/rack_3_1.gemfile - 34613907687.16 11 Sep 2026 03:06PM UTC 168
97.85
GitHub Action Run
17 run-3.4-Gemfile - 34613907687.17 11 Sep 2026 03:06PM UTC 168
97.85
GitHub Action Run
18 run-4.0-Gemfile - 34613907687.18 11 Sep 2026 03:06PM UTC 168
97.83
GitHub Action Run
19 run-4.0-gemfiles/rails_8_1.gemfile - 34613907687.19 11 Sep 2026 03:06PM UTC 169
97.85
GitHub Action Run
20 run-4.0-gemfiles/dry_validation.gemfile - 34613907687.20 11 Sep 2026 03:06PM UTC 167
56.93
GitHub Action Run
21 run-4.0-gemfiles/multi_xml.gemfile - 34613907687.21 11 Sep 2026 03:05PM UTC 167
46.51
GitHub Action Run
22 run-4.0-gemfiles/grape_entity.gemfile - 34613907687.22 11 Sep 2026 03:05PM UTC 167
49.77
GitHub Action Run
23 run-3.3-Gemfile - 34613907687.23 11 Sep 2026 03:05PM UTC 168
97.87
GitHub Action Run
24 run-3.3-gemfiles/rails_7_2.gemfile - 34613907687.24 11 Sep 2026 03:05PM UTC 169
97.87
GitHub Action Run
25 run-3.3-gemfiles/rack_2_2.gemfile - 34613907687.25 11 Sep 2026 03:05PM UTC 168
97.81
GitHub Action Run
26 run-4.0-gemfiles/multi_json_1_20.gemfile - 34613907687.26 11 Sep 2026 03:06PM UTC 167
46.83
GitHub Action Run
27 run-3.4-gemfiles/rails_8_1.gemfile - 34613907687.27 11 Sep 2026 03:05PM UTC 169
97.83
GitHub Action Run
28 run-3.4-gemfiles/rack_3_0.gemfile - 34613907687.28 11 Sep 2026 03:05PM UTC 168
97.83
GitHub Action Run
29 run-4.0-gemfiles/rails_7_2.gemfile - 34613907687.29 11 Sep 2026 03:06PM UTC 169
97.83
GitHub Action Run
30 run-4.0-gemfiles/rack_3_0.gemfile - 34613907687.30 11 Sep 2026 03:06PM UTC 168
97.83
GitHub Action Run
31 run-3.3-gemfiles/rack_3_1.gemfile - 34613907687.31 11 Sep 2026 03:06PM UTC 168
97.85
GitHub Action Run
32 run-4.0-gemfiles/multi_json.gemfile - 34613907687.32 11 Sep 2026 03:06PM UTC 167
46.79
GitHub Action Run
Source Files on build 34613907687
  • Tree
  • List 169
  • Changed 16
  • Source Changed 12
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34613907687
  • Pull Request #2936
  • 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