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

ruby-grape / grape / 25973916459
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 16 May 2026 09:53PM UTC
Jobs 38
Files 164
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

16 May 2026 09:52PM UTC coverage: 96.963% (-0.008%) from 96.971%
25973916459

Pull #2718

github

ericproulx
Convert Error, Versioner::Base to Options Data; drop OptionsCompat

Building on the merged refactor/version-guard-clause (VersionOptions
Data) and feature/error-formatter-kwargs-2527 (RescueOptions Data),
convert the remaining two middlewares that include
`PrecomputedContentTypes` to per-class `Options = Data.define(...)`:

- Middleware::Error: 14-field Options replacing the 14-line
  DEFAULT_OPTIONS Hash + the 12-line attr_reader / ivar-set initialize
  body. `rescue_options:` defaults to `Grape::DSL::RescueOptions.new`;
  initialize coerces an explicit nil (from
  `Endpoint#error_middleware_options` when no `rescue_from` was called)
  to the default. `Forwardable.def_delegators :options, ...` covers
  every accessor; the existing `def_delegator :rescue_options, :backtrace,
  :include_backtrace` (and `:original_exception`) carry through unchanged.
- Middleware::Versioner::Base: 7-field Options (adds `content_types:` /
  `format:` so the mixin's accessor reads land cleanly). `version_options:`
  defaults to `Grape::DSL::VersionOptions.new`. The four
  `def_delegators :version_options, :cascade, :parameter, :strict, :vendor`
  stay; `mount_path` / `pattern` / `prefix` / `version_options` are now
  delegated via `def_delegators :options, ...`.

With every PrecomputedContentTypes consumer now using an Options Data
class, switch the mixin to accessor reads:

    options.content_types  # was options[:content_types]
    options.format         # was options[:format]

…and delete `Grape::Middleware::OptionsCompat` entirely.

Two supporting tweaks:

- `Middleware::Base#build_options` switches `const_defined?(:Options,
  false)` → `const_defined?(:Options)` so Versioner subclasses
  (`Path`, `Header`, `Param`, `AcceptVersionHeader`) inherit
  `Versioner::Base::Options` without redeclaring it.
- `Middleware::Formatter#read_rack_input` switches `options[:parsers]`
  to the existing `parsers` delegator.

`Filter` and `Auth::Base` / `Auth::*` remain on the legacy
`... (continued)
Pull Request #2718: [DRAFT] Generalize middleware options to per-class Data value objects

1088 of 1173 branches covered (92.75%)

Branch coverage included in aggregate %.

34 of 34 new or added lines in 5 files covered. (100.0%)

9 existing lines in 3 files now uncovered.

3509 of 3568 relevant lines covered (98.35%)

31482.79 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
93.75
-0.58% lib/grape/middleware/error.rb
2
92.31
0.64% lib/grape/middleware/base.rb
1
97.48
-0.06% lib/grape/middleware/formatter.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rack_3_1.gemfile - 25973916459.1 16 May 2026 09:53PM UTC 163
95.67
GitHub Action Run
2 run-3.2-gemfiles/rack_3_0.gemfile - 25973916459.2 16 May 2026 09:53PM UTC 163
95.71
GitHub Action Run
3 run-3.3-gemfiles/rails_8_1.gemfile - 25973916459.3 16 May 2026 09:53PM UTC 164
95.67
GitHub Action Run
4 run-3.2-gemfiles/rack_3_2.gemfile - 25973916459.4 16 May 2026 09:53PM UTC 163
95.71
GitHub Action Run
5 run-3.4-gemfiles/rack_3_2.gemfile - 25973916459.5 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
6 run-3.4-gemfiles/rack_3_0.gemfile - 25973916459.6 16 May 2026 09:53PM UTC 163
95.67
GitHub Action Run
7 run-3.2-gemfiles/rails_8_1.gemfile - 25973916459.7 16 May 2026 09:53PM UTC 164
95.72
GitHub Action Run
8 run-4.0-gemfiles/grape_entity.gemfile - 25973916459.8 16 May 2026 09:54PM UTC 163
50.05
GitHub Action Run
9 run-4.0-gemfiles/rack_3_1.gemfile - 25973916459.9 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
10 run-3.2-gemfiles/rack_3_1.gemfile - 25973916459.10 16 May 2026 09:53PM UTC 163
95.71
GitHub Action Run
11 run-4.0-gemfiles/grape_swagger.gemfile - 25973916459.11 16 May 2026 09:53PM UTC 163
55.04
GitHub Action Run
12 run-3.4-gemfiles/rails_8_1.gemfile - 25973916459.12 16 May 2026 09:54PM UTC 164
95.67
GitHub Action Run
13 run-4.0-gemfiles/rack_3_2.gemfile - 25973916459.13 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
14 run-3.3-gemfiles/rails_7_2.gemfile - 25973916459.14 16 May 2026 09:54PM UTC 164
95.67
GitHub Action Run
15 run-4.0-Gemfile - 25973916459.15 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
16 run-3.2-gemfiles/rails_8_0.gemfile - 25973916459.16 16 May 2026 09:53PM UTC 164
95.72
GitHub Action Run
17 run-3.2-Gemfile - 25973916459.17 16 May 2026 09:53PM UTC 163
95.71
GitHub Action Run
18 run-3.3-gemfiles/rack_3_1.gemfile - 25973916459.18 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
19 run-4.0-gemfiles/dry_validation.gemfile - 25973916459.19 16 May 2026 09:54PM UTC 163
58.1
GitHub Action Run
20 run-4.0-gemfiles/rack_3_0.gemfile - 25973916459.20 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
21 run-3.3-gemfiles/rack_3_2.gemfile - 25973916459.21 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
22 run-4.0-gemfiles/multi_json.gemfile - 25973916459.22 16 May 2026 09:54PM UTC 163
36.81
GitHub Action Run
23 run-4.0-gemfiles/rails_8_0.gemfile - 25973916459.23 16 May 2026 09:54PM UTC 164
95.67
GitHub Action Run
24 run-4.0-gemfiles/rails_8_1.gemfile - 25973916459.24 16 May 2026 09:54PM UTC 164
95.67
GitHub Action Run
25 run-3.3-gemfiles/rack_3_0.gemfile - 25973916459.25 16 May 2026 09:54PM UTC 163
95.67
GitHub Action Run
26 run-4.0-gemfiles/hashie.gemfile - 25973916459.26 16 May 2026 09:54PM UTC 163
62.33
GitHub Action Run
27 run-4.0-gemfiles/multi_xml.gemfile - 25973916459.27 16 May 2026 09:54PM UTC 163
36.81
GitHub Action Run
28 run-3.4-gemfiles/rack_2_2.gemfile - 25973916459.28 16 May 2026 09:54PM UTC 163
95.63
GitHub Action Run
29 run-4.0-gemfiles/rails_7_2.gemfile - 25973916459.29 16 May 2026 09:54PM UTC 164
95.67
GitHub Action Run
30 run-3.4-gemfiles/rails_8_0.gemfile - 25973916459.30 16 May 2026 09:53PM UTC 164
95.67
GitHub Action Run
31 run-3.2-gemfiles/rack_2_2.gemfile - 25973916459.31 16 May 2026 09:53PM UTC 163
95.67
GitHub Action Run
32 run-3.3-gemfiles/rails_8_0.gemfile - 25973916459.32 16 May 2026 09:53PM UTC 164
95.67
GitHub Action Run
33 run-3.4-Gemfile - 25973916459.33 16 May 2026 09:53PM UTC 163
95.67
GitHub Action Run
34 run-3.3-Gemfile - 25973916459.34 16 May 2026 09:53PM UTC 163
95.67
GitHub Action Run
35 run-3.3-gemfiles/rack_2_2.gemfile - 25973916459.35 16 May 2026 09:53PM UTC 163
95.63
GitHub Action Run
36 run-3.2-gemfiles/rails_7_2.gemfile - 25973916459.36 16 May 2026 09:53PM UTC 164
95.72
GitHub Action Run
37 run-3.4-gemfiles/rails_7_2.gemfile - 25973916459.37 16 May 2026 09:53PM UTC 164
95.67
GitHub Action Run
38 run-4.0-gemfiles/rack_2_2.gemfile - 25973916459.38 16 May 2026 09:53PM UTC 163
95.63
GitHub Action Run
Source Files on build 25973916459
  • Tree
  • List 164
  • Changed 7
  • Source Changed 5
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25973916459
  • Pull Request #2718
  • PR Base - master (#25973819196)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc