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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 14 May 2026 02:05PM UTC
Jobs 36
Files 0
Run time –
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

pending completion
25864552952

Pull #2716

github

ericproulx
Refactor DSL::Routing#version: guard clause, kwargs, value object

Three changes that touch the same method:

1. Lift the body out of `if args.any? ... end` into a
   `return @versions&.last if args.empty?` guard.

2. Replace `**options` with explicit kwargs (`using:`, `cascade:`,
   `parameter:`, `strict:`, `vendor:`) and bake the defaults into the
   signature. The per-call `reverse_merge(using: :path)` is gone.

3. Introduce `Grape::DSL::VersionOptions` (built on `Data.define`)
   as the canonical representation of resolved version options.
   Threaded end-to-end:
   - `#version` builds and stores a `VersionOptions` on
     `inheritable_setting.namespace_inheritable[:version_options]`.
   - `Path#uses_path_versioning?`, `Endpoint#build_stack`, and
     `API::Instance#cascade?` read fields via accessors instead of
     `[:key]`.
   - The versioner middleware (`Versioner::Base`) now takes a
     `VersionOptions` directly, not a Hash. `Forwardable.def_delegators`
     forwards `cascade`/`parameter`/`strict`/`vendor` to it; the four
     ivars and per-call assignments are dropped. `DEFAULT_OPTIONS`
     stores a `VersionOptions.new(...)` so direct-mount callers still
     get safe defaults.

Public `.version` DSL surface unchanged — still accepts kwargs the same
way; the value object is an internal-only representation.

`version_options` is read for exactly these five keys across the
codebase: `:using` (`endpoint.rb`, `path.rb`), and `:cascade` /
`:parameter` / `:strict` / `:vendor` (`Versioner::Base`, plus
`:cascade` in `API::Instance#cascade?`). Any other kwarg passed to
`.version` was previously swallowed by the splat with no effect.

Spec fixtures updated:

- `spec/shared/versioning_examples.rb` (14 sites): `**macro_options`
  -> `**macro_options.except(:format)`. The `:format` key stays in
  the macro hash so the test helper (`versioned_helpers.rb`) can still
  build the `HTTP_ACCEPT` header.
- `spec/grape/exceptions/invalid_accept_header_spec.rb`... (continued)
Pull Request #2716: Refactor DSL::Routing#version: guard clause, explicit kwargs, value object
Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rails_8_1.gemfile - 25864552952.1 14 May 2026 02:06PM UTC 160
95.72
GitHub Action Run
2 run-3.4-gemfiles/rails_8_0.gemfile - 25864552952.2 14 May 2026 02:05PM UTC 160
95.74
GitHub Action Run
3 run-3.3-gemfiles/rack_3_2.gemfile - 25864552952.3 14 May 2026 02:05PM UTC 159
95.72
GitHub Action Run
4 run-4.0-Gemfile - 25864552952.4 14 May 2026 02:06PM UTC 159
95.74
GitHub Action Run
5 run-3.2-Gemfile - 25864552952.5 14 May 2026 02:05PM UTC 159
95.76
GitHub Action Run
6 run-3.2-gemfiles/rack_3_1.gemfile - 25864552952.6 14 May 2026 02:05PM UTC 159
95.76
GitHub Action Run
7 run-3.3-Gemfile - 25864552952.7 14 May 2026 02:06PM UTC 159
95.72
GitHub Action Run
8 run-4.0-gemfiles/hashie.gemfile - 25864552952.8 14 May 2026 02:05PM UTC 159
62.83
GitHub Action Run
9 run-3.2-gemfiles/rack_3_0.gemfile - 25864552952.9 14 May 2026 02:06PM UTC 159
95.76
GitHub Action Run
10 run-4.0-gemfiles/rails_8_0.gemfile - 25864552952.10 14 May 2026 02:06PM UTC 160
95.74
GitHub Action Run
11 run-3.2-gemfiles/rack_2_2.gemfile - 25864552952.11 14 May 2026 02:06PM UTC 159
95.72
GitHub Action Run
12 run-3.2-gemfiles/rails_8_0.gemfile - 25864552952.12 14 May 2026 02:05PM UTC 160
95.77
GitHub Action Run
13 run-3.4-gemfiles/rack_3_0.gemfile - 25864552952.13 14 May 2026 02:06PM UTC 159
95.74
GitHub Action Run
14 run-3.3-gemfiles/rack_3_0.gemfile - 25864552952.14 14 May 2026 02:05PM UTC 159
95.72
GitHub Action Run
15 run-3.2-gemfiles/rack_3_2.gemfile - 25864552952.15 14 May 2026 02:09PM UTC 159
95.76
GitHub Action Run
16 run-4.0-gemfiles/rack_3_0.gemfile - 25864552952.16 14 May 2026 02:06PM UTC 159
95.74
GitHub Action Run
17 run-4.0-gemfiles/multi_json.gemfile - 25864552952.17 14 May 2026 02:06PM UTC 159
36.39
GitHub Action Run
18 run-4.0-gemfiles/rails_7_2.gemfile - 25864552952.18 14 May 2026 02:06PM UTC 160
95.74
GitHub Action Run
19 run-4.0-gemfiles/rack_3_2.gemfile - 25864552952.19 14 May 2026 02:06PM UTC 159
95.74
GitHub Action Run
20 run-3.3-gemfiles/rails_8_0.gemfile - 25864552952.20 14 May 2026 02:07PM UTC 160
95.72
GitHub Action Run
21 run-4.0-gemfiles/rails_8_1.gemfile - 25864552952.21 14 May 2026 02:06PM UTC 160
95.74
GitHub Action Run
22 run-4.0-gemfiles/rack_3_1.gemfile - 25864552952.22 14 May 2026 02:06PM UTC 159
95.74
GitHub Action Run
23 run-3.4-gemfiles/rack_2_2.gemfile - 25864552952.23 14 May 2026 02:05PM UTC 159
95.7
GitHub Action Run
24 run-4.0-gemfiles/dry_validation.gemfile - 25864552952.24 14 May 2026 02:06PM UTC 159
58.34
GitHub Action Run
25 run-4.0-gemfiles/grape_entity.gemfile - 25864552952.25 14 May 2026 02:06PM UTC 159
50.25
GitHub Action Run
26 run-3.4-gemfiles/rails_7_2.gemfile - 25864552952.26 14 May 2026 02:06PM UTC 160
95.74
GitHub Action Run
27 run-3.3-gemfiles/rack_2_2.gemfile - 25864552952.27 14 May 2026 02:05PM UTC 159
95.68
GitHub Action Run
28 run-3.4-gemfiles/rails_8_1.gemfile - 25864552952.28 14 May 2026 02:06PM UTC 160
95.74
GitHub Action Run
29 run-4.0-gemfiles/rack_2_2.gemfile - 25864552952.29 14 May 2026 02:06PM UTC 159
95.7
GitHub Action Run
30 run-3.4-gemfiles/rack_3_1.gemfile - 25864552952.30 14 May 2026 02:06PM UTC 159
95.74
GitHub Action Run
31 run-3.3-gemfiles/rails_7_2.gemfile - 25864552952.31 14 May 2026 02:06PM UTC 160
95.72
GitHub Action Run
32 run-4.0-gemfiles/multi_xml.gemfile - 25864552952.32 14 May 2026 02:06PM UTC 159
36.39
GitHub Action Run
33 run-3.2-gemfiles/rails_8_1.gemfile - 25864552952.33 14 May 2026 02:06PM UTC 160
95.77
GitHub Action Run
34 run-3.4-gemfiles/rack_3_2.gemfile - 25864552952.34 14 May 2026 02:05PM UTC 159
95.74
GitHub Action Run
35 run-3.4-Gemfile - 25864552952.35 14 May 2026 02:06PM UTC 159
95.74
GitHub Action Run
36 run-3.2-gemfiles/rails_7_2.gemfile - 25864552952.36 14 May 2026 02:06PM UTC 160
95.77
GitHub Action Run
Source Files on build 25864552952
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #25864552952
  • Pull Request #2716
  • PR Base - master (#25854383996)
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